iis服务器助手广告广告
返回顶部
首页 > 资讯 > 移动开发 >Android实现仿excel数据表格效果
  • 366
分享到

Android实现仿excel数据表格效果

表格Android 2022-06-06 07:06:05 366人浏览 泡泡鱼
摘要

在没给大家分享代码之前,先给大家展示下效果图: 1.activity public class PurchaseRequiReactivity extends Base

在没给大家分享代码之前,先给大家展示下效果图:

1.activity


 
public class PurchaseRequiReactivity extends BaseActivity implements PurchaseRequireView { 
@Bind(R.id.appTitle) 
TextView appTitle; 
@Bind(R.id.scrollLinearLayout) 
LinearLayout titleLinearLayout; 
@Bind(R.id.scroll_list) 
ListView mListView; 
@Bind(R.id.item_scroll_title) 
CHTableScrollView headerScroll; 
public HorizontalScrollView mTouchView; 
private List<CHTableScrollView> mHScrollViews = new ArrayList<>();// 装入所有的 HScrollView 
private HashMap<String, TextView> mColumnControls = new HashMap<>(); 
private PPOrderRequirePresenter presenter; 
@Override 
protected void onCreate(Bundle savedInstanceState) { 
super.onCreate(savedInstanceState); 
try { 
setContentView(R.layout.activity_purchase_require); 
ButterKnife.bind(this); 
init();// 初始化 
} catch (Exception e) { 
e.printStackTrace(); 
} 
} 
 
private void init() { 
presenter = new PPOrderRequirePresenter(this, this); 
presenter.GetToday(); 
} 
@OnClick({R.id.backRLot}) 
public void onClick(View view) { 
switch (view.getId()) { 
case R.id.backRLot: 
finish(); 
break; 
} 
} 
public void scrollTo_0_0() {// 全部列表滑动到开始位置 
for (final CHTableScrollView hScrollView : mHScrollViews) { 
mListView.post(new Runnable() { 
@Override 
public void run() { 
//当listView刷新完成之后,把该条移动到最终位置 
hScrollView.scrollTo(0, 0); 
} 
}); 
} 
} 
public void onScrollChanged(int l, int t) { 
for (CHTableScrollView scrollView : mHScrollViews) { 
if (mTouchView != scrollView) 
scrollView.smoothScrollTo(l, t);//防止重复滑动 
} 
} 
public void onClickText(String str, int position) {// 点击的事件 
System.out.println(str + "-" + position); 
} 
@Override 
public void refreshLV(List<PPOrderRequireMobModel> newList) { 
list.clear(); 
list.addAll(newList); 
} 
@Override 
public void initViews(String[] cols, List<Map<String, String>> datas) { 
// 全部列表滑动到开始位置 
scrollTo_0_0(); 
// 清空所有的view 
titleLinearLayout.removeAllViews(); 
//Table Title 
for (int i = 0; i < cols.length; i++) { 
if (i != 0) { 
View linearLay = presenter.newView(PurchaseRequireActivity.this, R.layout.row_title_edit_view, cols[i]); 
TextView et = (TextView) linearLay.findViewById(R.id.tevEditView); 
if (cols[i].contains("-")) {// setTextColor 
if (cols[i].substring(cols[i].length() - 1, cols[i].length()).equals("2")) {// 2专柜:红色,1买断:黑色 
et.setTextColor(Color.RED); 
} else { 
et.setTextColor(Color.DKGRAY); 
} 
} else { 
et.setTextColor(Color.DKGRAY); 
} 
et.setText(cols[i].substring(0, cols[i].length() - 2));//设置每一列顶表格数据 
titleLinearLayout.addView(linearLay); 
} 
} 
// 添加头滑动事件,先清空列表 
mHScrollViews.clear(); 
mHScrollViews.add(headerScroll); 
mListView.setDividerHeight(0);//设置分割线高度 
mColumnControls.clear(); 
for (int i = 0; i < cols.length; i++) {// 门店名称+现金 or 门店名称+外欠 
if (i != 0) {//预留第一列 
EditText etItem1 = new EditText(PurchaseRequireActivity.this); 
etItem1.setWidth(50);// 设置宽度 
etItem1.setTextColor(Color.DKGRAY); 
etItem1.setGravity(Gravity.CENTER); 
mColumnControls.put(cols[i], etItem1); 
} 
} 
BaseAdapter adapter = new PurchaseRequireAdapter(this, datas, R.layout.row_item_edit, cols, mColumnControls, mHScrollViews, mListView); 
mListView.setAdapter(adapter); 
} 
}

2.view


 
public interface PurchaseRequireView { 
void refreshLV(List<PPOrderRequireMobModel> newList); 
void initViews(String[] cols, List<Map<String, String>> datas); 
}

3.PPOrderRequirePresenter


 
public class PPOrderRequirePresenter { 
private PurchaseRequireView view; 
private Context context; 
public PPOrderRequirePresenter(Context context, PurchaseRequireView view) { 
this.context = context; 
this.view = view; 
} 
 
public void GetToday() { 
String billDate = getStartBillDate();//FreshRoadUtil.getTodayDate_nORMal().substring(0, 10); 
int dimen = Integer.parseInt(getDimen());// 默认条件:日期=当天 、维度=按门店 
String url = InterfaceNameUtil.PPOrderRequireGetRequire(billDate, dimen); 
Log.e("url", url); 
final SweetAlertDialog dialog = AppUtil.showLoading(context, "正在发送请求,请稍后..."); 
apiListTRequest<PPOrderRequireMobModel> request = new APIListTRequest<>( 
url, null, PPOrderRequireMobModel.class, new Response.Listener<List<PPOrderRequireMobModel>>() { 
@Override 
public void onResponse(List<PPOrderRequireMobModel> list) { 
if (list != null) {// && list.size() > 0 
view.refreshLV(list); 
doSomethingFroList(list); 
view.refreshVerticalLV(getPNameFromDB(list));// 刷新一下导航条 
} 
dialog.dismiss(); 
} 
}, new Response.ErrorListener() { 
@Override 
public void onErrorResponse(VolleyError error) { 
AppUtil.toError(dialog, error); 
} 
}); 
request.setAddTokenToHeader(false); 
VolleyUtil.start(context, request); 
} 
 
public void doSomethingFroList(List<PPOrderRequireMobModel> newList) { 
ArrayList<String> nameList = new ArrayList<>();// 货物 
ArrayList<Long> CarGoIDList = new ArrayList<>();// 货物ID 
ArrayList<String> colsList = new ArrayList<>();// 门店名称-现金 or 门店名称-外欠 
for (PPOrderRequireMobModel bean : newList) { 
String cargoName = bean.getCargoName(); 
if (bean.getCargoName().length() > 6) 
cargoName = cargoName.substring(0, 6); 
nameList.add(cargoName + "\n存:" + FreshRoadUtil.doubleTrans(bean.getQtyInventory()) + ",需:" + FreshRoadUtil.doubleTrans(bean.getQtyRequire())); 
CargoIDList.add(bean.getCargoID()); 
for (PPOrderRequireItemMobModel itemBean : bean.getItems()) { 
if (!isHave(colsList, itemBean.getName(), itemBean.getNatureType())) { 
colsList.add(itemBean.getName() + "-" + itemBean.getNatureType()); 
} 
} 
} 
// 排序,先1.买断、再2.专柜 
Collections.sort(colsList, new Comparator<String>() { 
@Override 
public int compare(String left, String right) { 
return (left.substring(left.length() - 1, left.length())).compareTo(right.substring(right.length() - 1, right.length())); 
//return (right.substring(right.length() - 1, right.length())).compareTo(left.substring(left.length() - 1, left.length())); 
} 
}); 
colsList.add(0, "品名规格/店名");// excel控件的位于首位置的“提示”单元格文本 
//Column 
String[] cols = colsList.toArray(new String[colsList.size()]); 
String[] name = nameList.toArray(new String[nameList.size()]); 
List<Map<String, String>> datas = new ArrayList<>(); 
Map<String, String> data; 
for (int i = 0; i < name.length; i++) { 
data = new HashMap<>(); 
data.put(cols[0], name[i]);//设置每一行头表格数据 
for (int j = 1; j < cols.length; j++) { 
data.put(cols[j], getShowText(newList, CargoIDList.get(i), colsList.get(j))); 
} 
datas.add(data); 
} 
view.initViews(cols, datas); 
} 
 
public boolean isHave(ArrayList<String> colsList, String name, int NatureType) { 
for (String itemStr : colsList) { 
if (itemStr.equals(name + "-" + NatureType)) { 
return true; 
} 
} 
return false; 
} 
 
public String getShowText(List<PPOrderRequireMobModel> list, long CargoID, String name) { 
for (PPOrderRequireMobModel bean : list) { 
for (PPOrderRequireItemMobModel itemBean : bean.getItems()) { 
if (bean.getCargoID() == CargoID && (itemBean.getName() + "-" + itemBean.getNatureType()).equals(name)) { 
return FreshRoadUtil.doubleTrans(itemBean.getQtyRequire()); 
} 
} 
} 
return " "; 
} 
 
public View newView(Context context, int res_id, String tag_name) { 
View itemView = LayoutInflater.from(context).inflate(res_id, null); 
itemView.setTag(tag_name); 
return itemView; 
} 
}

4.PurchaseRequireAdapter


 
public class PurchaseRequireAdapter extends BaseAdapter { 
private List<? extends Map<String, ?>> datas; 
private int res; 
private String[] from; 
private Context context; 
protected List<CHTableScrollView> mHScrollViews = new ArrayList<>(); 
private HashMap<String, TextView> mColumnControls; 
private ListView mListView; 
public PurchaseRequireAdapter(Context context, List<? extends Map<String, ?>> data, int resource, String[] from, 
HashMap<String, TextView> mColumnControls, List<CHTableScrollView> mHScrollViews, ListView mListView) { 
this.context = context; 
this.datas = data; 
this.res = resource; 
this.from = from; 
this.mColumnControls = mColumnControls; 
this.mHScrollViews = mHScrollViews; 
this.mListView = mListView; 
} 
@Override 
public int getCount() { 
return datas.size(); 
} 
@Override 
public Object getItem(int position) { 
return datas.get(position); 
} 
@Override 
public long getItemId(int position) { 
return position; 
} 
@Override 
public View getView(int position, View convertView, ViewGroup parent) { 
View v = convertView; 
if (v == null) { 
v = LayoutInflater.from(context).inflate(res, null); 
//第一次初始化的时候装进来 
mColumnControls.put("title", (TextView) v.findViewById(R.id.item_title)); 
View chsv = v.findViewById(R.id.item_scroll); 
LinearLayout ll = (LinearLayout) chsv.findViewById(R.id.item_scroll_layout); 
View[] views = new View[from.length]; 
for (int i = 0; i < from.length; i++) { 
if (i == 0) { 
views[0] = v.findViewById(R.id.item_title); 
continue; 
} 
View linearLay = newView(context, R.layout.row_item_edit_view, from[i]); 
TextView td = (TextView) linearLay.findViewById(R.id.ievEditView); 
td.setTag(position); 
td.setOnClickListener(clickListener);// 文本的点击事件 
ll.addView(linearLay); 
views[i] = td; 
} 
v.setTag(views); 
addHViews((CHTableScrollView) chsv); 
} 
View[] holders = (View[]) v.getTag(); 
int len = holders.length; 
for (int i = 0; i < len; i++) { 
if (i == 0) { 
String oldStr = this.datas.get(position).get(from[i]).toString();// 西瓜\n存:12,需:32 
String cargoStr = oldStr.substring(0, oldStr.indexOf("\n"));// 西瓜 
String numberStr_1 = oldStr.substring(oldStr.indexOf(":") + 1, oldStr.indexOf(","));// 12 
String numberStr_2 = oldStr.substring(oldStr.lastIndexOf(":") + 1, oldStr.length());// 32 
String sText = "<font color=\"#000000\">" + cargoStr + "</font>" 
+ "<br>" 
+ "<font color=\"#999999\">存:</font> " 
+ "<font color=\"#000000\">" + numberStr_1 + "</font> " 
+ "<font color=\"#999999\">,需:</font> " 
+ "<font color=\"#000000\">" + numberStr_2 + "</font> "; 
((TextView) holders[i]).setText(html.fromHtml(sText)); 
} else { 
((TextView) holders[i]).setText(this.datas.get(position).get(from[i]).toString()); 
//((TextView) holders[i]).setTextColor(Color.parseColor("#FFA500")); 
} 
} 
return v; 
} 
private View newView(Context context, int res_id, String tag_name) { 
View itemView = LayoutInflater.from(context).inflate(res_id, null); 
itemView.setTag(tag_name); 
return itemView; 
} 
public void addHViews(final CHTableScrollView hScrollView) { 
if (!mHScrollViews.isEmpty()) { 
int size = mHScrollViews.size(); 
CHTableScrollView scrollView = mHScrollViews.get(size - 1); 
final int scrollX = scrollView.getScrollX(); 
//第一次满屏后,向下滑动,有一条数据在开始时未加入 
if (scrollX != 0) { 
mListView.post(new Runnable() { 
@Override 
public void run() { 
//当listView刷新完成之后,把该条移动到最终位置 
hScrollView.scrollTo(scrollX, 0); 
} 
}); 
} 
} 
mHScrollViews.add(hScrollView); 
} 
// 点击的事件 
private View.OnClickListener clickListener = new View.OnClickListener() { 
@Override 
public void onClick(View v) { 
((PurchaseRequireActivity) context).onClickText(((TextView) v).getText().toString(), (int) v.getTag()); 
} 
}; 
}

5.CHTableScrollView


 
public class CHTableScrollView extends HorizontalScrollView { 
PurchaseRequireActivity activity; 
public CHTableScrollView(Context context, AttributeSet attrs, int defStyle) { 
super(context, attrs, defStyle); 
activity = (PurchaseRequireActivity) context; 
} 
public CHTableScrollView(Context context, AttributeSet attrs) { 
super(context, attrs); 
activity = (PurchaseRequireActivity) context; 
} 
public CHTableScrollView(Context context) { 
super(context); 
activity = (PurchaseRequireActivity) context; 
} 
@Override 
public boolean onTouchEvent(MotionEvent ev) { 
//进行触摸赋值 
activity.mTouchView = this; 
return super.onTouchEvent(ev); 
} 
@Override 
protected void onScrollChanged(int l, int t, int oldl, int oldt) { 
//当当前的CHScrollView被触摸时,滑动其它 
if (activity.mTouchView == this) { 
activity.onScrollChanged(l, t); 
} else { 
super.onScrollChanged(l, t, oldl, oldt); 
} 
} 
}

6.activity_purchase_require


<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:Android="Http://schemas.android.com/apk/res/android" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:background="#FFFFFF" 
android:orientation="vertical"> 
<include layout="@layout/default_app_head3" /> 
<LinearLayout 
android:layout_width="match_parent" 
android:layout_height="wrap_content" 
android:background="@color/bg_light_gray" 
android:baselineAligned="false" 
android:orientation="horizontal"> 
<RelativeLayout 
android:id="@+id/shop_mission_ll" 
android:layout_width="0dp" 
android:layout_height="wrap_content" 
android:layout_weight="2"> 
<RelativeLayout 
android:id="@+id/shop_mission_delete_ll" 
android:layout_width="50dp" 
android:layout_height="35dp" 
android:layout_alignParentRight="true"> 
<ImageView 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:layout_centerInParent="true" 
android:layout_marginRight="15dp" 
android:contentDescription="@string/app_name" 
android:src="@drawable/x_clear_icon" /> 
</RelativeLayout> 
<TextView 
android:id="@+id/shop_mission_search_tv" 
android:layout_width="match_parent" 
android:layout_height="35dp" 
android:layout_toLeftOf="@id/shop_mission_delete_ll" 
android:gravity="center" 
android:text="点击这里,设置查询条件" 
android:textColor="@color/black_text" 
android:textColorHint="@color/light_gray_text" 
android:textSize="@dimen/font_small" /> 
</RelativeLayout> 
<RelativeLayout 
android:layout_width="0dp" 
android:layout_height="match_parent" 
android:layout_weight="1"> 
<TextView 
android:id="@+id/purchase_select_tv" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:layout_centerVertical="true" 
android:singleLine="true" 
android:text="" 
android:textSize="12sp" /> 
<RelativeLayout 
android:id="@+id/purchase_tv_delete_ll" 
android:layout_width="45dp" 
android:layout_height="35dp" 
android:layout_alignParentRight="true"> 
<ImageView 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:layout_centerInParent="true" 
android:layout_marginRight="15dp" 
android:contentDescription="@string/app_name" 
android:src="@drawable/x_clear_icon" /> 
</RelativeLayout> 
</RelativeLayout> 
</LinearLayout> 
<RelativeLayout 
android:layout_width="match_parent" 
android:layout_height="match_parent"> 
<ListView 
android:id="@+id/order_vertical_lv" 
android:layout_width="35dp" 
android:layout_height="wrap_content" 
android:layout_alignParentRight="true" 
android:layout_centerVertical="true" 
android:divider="@null" 
android:scrollbars="none" /> 
<LinearLayout 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:layout_toLeftOf="@id/order_vertical_lv" 
android:orientation="vertical"> 
<LinearLayout 
android:layout_width="match_parent" 
android:layout_height="wrap_content" 
android:gravity="fill_vertical" 
android:minHeight="40dip" 
android:orientation="horizontal"> 
<TextView 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:layout_weight="3" 
android:background="@drawable/bg_edittext_normal_s" 
android:enabled="false" 
android:gravity="center" 
android:maxLines="1" 
android:maxWidth="@dimen/scroll_tab_column_width" 
android:minWidth="@dimen/scroll_tab_column_width" 
android:singleLine="true" 
android:text="品名规格/店名" 
android:textColor="@android:color/black" 
android:textSize="12sp" /> 
<com.co_insight.freshroad.business.widget.CHTableScrollView 
android:id="@+id/item_scroll_title" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:layout_weight="1" 
android:scrollbars="none"> 
<LinearLayout 
android:id="@+id/scrollLinearLayout" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:orientation="horizontal" /> 
</com.co_insight.freshroad.business.widget.CHTableScrollView> 
</LinearLayout> 
<ListView 
android:id="@+id/scroll_list" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:cacheColorHint="@android:color/transparent" 
android:scrollbars="none" /> 
</LinearLayout> 
<com.co_insight.freshroad.views.widgets.HorizontalListView 
android:id="@+id/shop_mission_item_hlv" 
android:layout_width="60dp" 
android:layout_height="40dp" 
android:layout_centerHorizontal="true" 
android:layout_marginTop="40dp" 
android:background="@drawable/fresh_road_bg_button_normal" 
android:visibility="gone" /> 
</RelativeLayout> 
</LinearLayout>

7.row_title_edit_view


<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="@dimen/scroll_tab_column_width" 
android:layout_height="match_parent" 
android:minHeight="50dip" 
android:orientation="vertical"> 
<TextView 
android:id="@+id/tevEditView" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:layout_weight="1" 
android:background="@drawable/bg_edittext_normal_title" 
android:editable="false" 
android:enabled="false" 
android:gravity="center" 
android:maxLines="2" 
android:maxWidth="@dimen/scroll_tab_column_width" 
android:minWidth="@dimen/scroll_tab_column_width" 
android:paddingLeft="3Dp" 
android:paddingRight="3dp" 
android:textColor="@android:color/black" 
android:textSize="12sp" /> 
</LinearLayout> 
8.row_item_edit_view
[html] view plain copy 在CODE上查看代码片派生到我的代码片
<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="@dimen/scroll_tab_column_width" 
android:layout_height="match_parent" 
android:minHeight="50dip" 
android:orientation="vertical"> 
<TextView 
android:id="@+id/ievEditView" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:layout_weight="1" 
android:background="@drawable/bg_edittext" 
android:gravity="center" 
android:maxLines="2" 
android:maxWidth="@dimen/scroll_tab_column_width" 
android:minWidth="@dimen/scroll_tab_column_width" 
android:textSize="12sp" 
android:textColor="@android:color/black" /> 
</LinearLayout>

9.row_item_edit


<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="match_parent" 
android:layout_height="20dp" 
android:maxHeight="20dp" 
android:minHeight="20dp" 
android:orientation="horizontal"> 
<TextView 
android:id="@+id/item_title" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:layout_weight="3" 
android:background="@drawable/bg_edittext_normal_s" 
android:enabled="false" 
android:gravity="center" 
android:maxLines="2" 
android:maxWidth="@dimen/scroll_tab_column_width" 
android:minWidth="@dimen/scroll_tab_column_width" 
android:text="测试" 
android:textColor="@android:color/black" 
android:textSize="12sp" /> 
<com.co_insight.freshroad.business.widget.CHTableScrollView 
android:id="@+id/item_scroll" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:layout_weight="1" 
android:scrollbars="none"> 
<LinearLayout 
android:id="@+id/item_scroll_layout" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:orientation="horizontal" /> 
</com.co_insight.freshroad.business.widget.CHTableScrollView> 
</LinearLayout>

10.bg_edittext


<?xml version="1.0" encoding="utf-8"?> 
<selector xmlns:android="http://schemas.android.com/apk/res/android"> 
<item android:drawable="@drawable/bg_edittext_normal" android:state_window_focused="false"/> 
<item android:drawable="@drawable/bg_edittext_focused" android:state_focused="true"/> 
</selector> 
11.bg_edittext_focused
[html] view plain copy 在CODE上查看代码片派生到我的代码片
<?xml version="1.0" encoding="utf-8"?> 
<shape xmlns:android="http://schemas.android.com/apk/res/android" > 
<solid android:color="#FFFFFF" /> 
<corners android:radius="0dip" /> 
<stroke 
android:width="0.1dp" 
android:color="@color/nav_selected" /> 
</shape>

12.bg_edittext_normal


<?xml version="1.0" encoding="utf-8"?> 
<shape xmlns:android="http://schemas.android.com/apk/res/android" > 
<solid android:color="#FFFFFF" /> 
<corners android:radius="0dip" /> 
<stroke 
android:width="0.1dp" 
android:color="@color/nav_selected" /> 
</shape> 

13.bg_edittext_normal_title


<?xml version="1.0" encoding="utf-8"?> 
<shape xmlns:android="http://schemas.android.com/apk/res/android" > 
 <!--北京填充色--> 
 <solid android:color="#00FFFFFF" /> 
 <!--角的度数--> 
 <corners android:radius="0dip" /> 
 <!-- 边框 --> 
 <stroke 
  android:width="0.1dp" 
  android:color="@color/nav_selected" /> 

14.PPOrderRequireMobModel


package com.co_insight.freshroad.business.bean; 
import java.util.ArrayList; 
import java.util.List; 
 
public class PPOrderRequireMobModel { 
private long CargoID;// 货物ID 
private String CargoName;// 货物名称 
private long UnitID;// 单位ID 
private String UnitName;// 单位 
private long PNameID;// 小类 
private long CategoryID;// 品名属性ID 
private String CategoryName;// 品名属性 
private double QtyRequire;// 需求量 
private double QtyInventory;// 库存量 
private long ID; 
private String CreateDate; 
private String UpdateDate; 
private List<PPOrderRequireItemMobModel> Items = new ArrayList<>();// 需求明细 
public long getCargoID() { 
return CargoID; 
} 
public void setCargoID(long CargoID) { 
this.CargoID = CargoID; 
} 
public String getCargoName() { 
return CargoName; 
} 
public void setCargoName(String CargoName) { 
this.CargoName = CargoName; 
} 
public long getUnitID() { 
return UnitID; 
} 
public void setUnitID(long UnitID) { 
this.UnitID = UnitID; 
} 
public String getUnitName() { 
return UnitName; 
} 
public void setUnitName(String UnitName) { 
this.UnitName = UnitName; 
} 
public long getPNameID() { 
return PNameID; 
} 
public void setPNameID(long PNameID) { 
this.PNameID = PNameID; 
} 
public long getCategoryID() { 
return CategoryID; 
} 
public void setCategoryID(long CategoryID) { 
this.CategoryID = CategoryID; 
} 
public String getCategoryName() { 
return CategoryName; 
} 
public void setCategoryName(String CategoryName) { 
this.CategoryName = CategoryName; 
} 
public double getQtyRequire() { 
return QtyRequire; 
} 
public void setQtyRequire(double QtyRequire) { 
this.QtyRequire = QtyRequire; 
} 
public double getQtyInventory() { 
return QtyInventory; 
} 
public void setQtyInventory(double QtyInventory) { 
this.QtyInventory = QtyInventory; 
} 
public long getID() { 
return ID; 
} 
public void setID(long ID) { 
this.ID = ID; 
} 
public String getCreateDate() { 
return CreateDate; 
} 
public void setCreateDate(String CreateDate) { 
this.CreateDate = CreateDate; 
} 
public String getUpdateDate() { 
return UpdateDate; 
} 
public void setUpdateDate(String UpdateDate) { 
this.UpdateDate = UpdateDate; 
} 
public List<PPOrderRequireItemMobModel> getItems() { 
return Items; 
} 
public void setItems(List<PPOrderRequireItemMobModel> items) { 
Items = items; 
} 
}

好了,代码到此结束。如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对编程网网站的支持!

您可能感兴趣的文章:Android应用读取Excel文件的方法Android 中读取Excel文件实例详解Android操作Excel文件的功能实现android通过jxl读excel存入sqlite3数据库Android开发实现生成excel的方法详解android读取assets中Excel表格并显示Android开发实现的导出数据库到Excel表格功能【附源码下载】Android 操作excel功能实例代码Android开发实现读取excel数据并保存为xml的方法Android多国语言转换Excel及Excel转换为string详解


--结束END--

本文标题: Android实现仿excel数据表格效果

本文链接: https://www.lsjlt.com/news/23562.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • jQuery实现表格行数据滚动效果
    本文实例为大家分享了jQuery实现表格行数据滚动效果的具体代码,供大家参考,具体内容如下 HTML代码: <div class="box"> <div c...
    99+
    2024-04-02
  • Android模仿Toast实现提示框效果
    本文实例为大家分享了Android模仿Toast实现提示框效果的具体代码,供大家参考,具体内容如下 Toast提示只要提示的时间够长,就可以浮动到其他任何界面之上,所以我们可以模仿T...
    99+
    2022-11-13
    Android Toast 提示框
  • 如何实现Excel表格数据求和
    这篇文章给大家分享的是有关如何实现Excel表格数据求和的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。 一、替换求和法打开需要求和的Excel表格,选中需要求和的数据,按快捷键【Ctrl+H】,把数据单...
    99+
    2023-06-04
  • jQuery怎么实现表格行数据滚动效果
    这篇文章主要讲解了“jQuery怎么实现表格行数据滚动效果”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“jQuery怎么实现表格行数据滚动效果”吧!HTML代码:<div c...
    99+
    2023-06-20
  • JS前端模拟Excel条件格式实现数据条效果
    目录需求背景需求分析实现逻辑完整代码实现template 部分style 部分script 部分最终实现效果需求背景 最近业务中遇到一个有意思的需求,是要在现有的表格中实现类似 E...
    99+
    2023-02-28
    JS模拟Excel数据条 JS Excel条件格式数据条
  • Android RecyclerView实现九宫格效果
    RecyclerView更加优化的复用机制和方便实现UI效果,几乎替代Listview和GridView的使用。但是分割线的实现,需要自己继承ItemDecoration来绘制。 效...
    99+
    2024-04-02
  • Android实现仪表盘效果
    本文实例为大家分享了Android实现仪表盘效果的具体代码,供大家参考,具体内容如下 仪表盘效果,圆弧可变色,效果图如下: 通过自定义view实现,代码如下: public c...
    99+
    2024-04-02
  • Android如何实现仿简书搜索框效果
    这篇文章给大家分享的是有关Android如何实现仿简书搜索框效果的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。直接上图:Activity 布局:<xml version="1.0&quo...
    99+
    2023-05-30
    android
  • Android Flutter怎么实现仿闲鱼动画效果
    这篇文章主要讲解了“Android Flutter怎么实现仿闲鱼动画效果”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“Android Flutter怎么实现仿闲鱼动画效果...
    99+
    2023-07-05
  • Android仿腾讯视频实现悬浮窗效果
    前言 相信大家对Android悬浮窗应该是很熟悉了,比如说腾讯视频、爱奇艺等APP都有悬浮窗功能。在你打游戏的同时还可以看视频,充分利用屏幕空间。还有微信,360手机卫士等APP也有...
    99+
    2024-04-02
  • JS前端怎么模拟Excel条件格式实现数据条效果
    这篇文章主要介绍“JS前端怎么模拟Excel条件格式实现数据条效果”的相关知识,小编通过实际案例向大家展示操作过程,操作方法简单快捷,实用性强,希望这篇“JS前端怎么模拟Excel条件格式实现数据条效果”文章能帮助大家解决问题。需求背景最近...
    99+
    2023-07-05
  • JavaScript实现动态表格效果
    本文实例为大家分享了JavaScript实现动态表格效果的具体代码,供大家参考,具体内容如下 代码: <!DOCTYPE html> <html lang="...
    99+
    2024-04-02
  • Android实现仿微软系统加载动画效果
    目录效果图:实现步骤:具体代码实现:1、创建Circle对象2、自定义MinSoftLoadingView实现代码3、布局文件中使用效果图: 实现步骤: 初始化五个圆球分...
    99+
    2024-04-02
  • Android实现仿iOS菊花加载圈动画效果
    目录常见的实现方式效果图:完整代码布局代码 常见的实现方式 切图,做旋转动画 自定义View,绘制效果 gif图 1、切图会增加体积,但相对简单,不过在换...
    99+
    2024-04-02
  • Android仿微信输入框效果的实现代码
    仿微信输入框效果图:输入框:<EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:layout...
    99+
    2023-05-31
    android 输入框
  • Android 实现仿QQ拖拽气泡效果的示例
    目录效果图:一、实现思路二、功能实现三、全屏拖拽效果实现源码地址:效果图: 一、实现思路 在列表中默认使用自定义的TextView控件来展示消息气泡,在自定义的TextView控件...
    99+
    2024-04-02
  • Android实现仿今日头条点赞动画效果实例
    目录一、前言二、需求拆分三、实现方案1、点赞控件触摸事件处理2、点赞动画的实现2.1、点赞效果图片的获取和存储管理2.2、点赞表情图标动画实现2.3、点赞次数和点赞文案的绘制3、存放...
    99+
    2024-04-02
  • Angular实现表格自滚动效果
    目录表格自滚动效果图实现原理具体实现:表格自滚动效果图 实现原理 原理:每一次的滚动都是在其setInterval()定时器的作用下,每次将DOM.scrollTop++ 具体实现...
    99+
    2024-04-02
  • Android仿微信雷达扫描效果的实现方法
    本文主要给大家介绍的是关于Android实现微信雷达扫描效果的相关内容,分享出来供大家参考学习,下面来看看详细的介绍:废话不多说 先上图(用AS录制的 转换工具不是很好 所以看得效果不是很好)效果图示例代码Activity 代码public...
    99+
    2023-05-31
    android 雷达扫描
  • Android中怎么利用RecyclerView实现数据列表展示效果
    Android中怎么利用RecyclerView实现数据列表展示效果,相信很多没有经验的人对此束手无策,为此本文总结了问题出现的原因和解决方法,通过这篇文章希望你能解决这个问题。首先导入依赖: compile '...
    99+
    2023-05-30
    android recyclerview
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作