Browse Source

load

master
lh 7 years ago
parent
commit
b49310750a
2 changed files with 51 additions and 4 deletions
  1. +31
    -0
      app/src/main/java/com/qhclh/ytzh/work/weighingsingle/WeightInfoActivity.java
  2. +20
    -4
      app/src/main/res/layout/act_weightinfos.xml

+ 31
- 0
app/src/main/java/com/qhclh/ytzh/work/weighingsingle/WeightInfoActivity.java View File

@ -2,10 +2,17 @@ package com.qhclh.ytzh.work.weighingsingle;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import com.qhclh.ytzh.R;
import com.qhclh.ytzh.base.BaseActivity;
import com.qhclh.ytzh.home.RpcUrl;
import com.qhclh.ytzh.tasks.ViewOnClickTask;
import org.forks.jsonrpc.JsonRpcResult;
import org.forks.jsonrpc.RpcFacade;
import org.forks.jsonrpc.RpcObject;
import butterknife.BindView;
@ -18,6 +25,12 @@ public class WeightInfoActivity extends BaseActivity {
Toolbar mToolbar;
@BindView(R.id.tv_toolbar_title)
TextView tv_toolbar_title;
@BindView(R.id.et_grossweight)
EditText et_grossweight;
@BindView(R.id.et_tare)
EditText et_tare;
@BindView(R.id.tv_commit_check)
TextView tv_commit_check;
private long id;
@Override
@ -48,6 +61,24 @@ public class WeightInfoActivity extends BaseActivity {
@Override
protected void onResume() {
super.onResume();
load();
}
private void load() {
ViewOnClickTask loadTask = new ViewOnClickTask(this,"加载中...") {
RpcObject rpcObj;
@Override
protected void successUI() {
System.out.println("aaa+++++load++++"+rpcObj);
}
@Override
public Object call() throws Exception {
JsonRpcResult result = RpcFacade.rpcCall(RpcUrl.WeighRpc_load,id);
rpcObj = result.getRpcObject(RpcUrl.WeightAppList_fanhui);
return null;
}
};
loadTask.execute();
}
}

+ 20
- 4
app/src/main/res/layout/act_weightinfos.xml View File

@ -7,13 +7,21 @@
<include layout="@layout/include_tool_bar" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_30"
android:text="毛重"
android:textColor="@color/colorAccent" />
<EditText
android:id="@+id/et_grossweight"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_30"
android:background="@drawable/shape_bg"
android:gravity="center_horizontal"
android:hint="请输入毛重"
@ -21,13 +29,21 @@
android:maxLines="1"
android:padding="@dimen/dp_12" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_40"
android:text="皮重"
android:textColor="@color/colorAccent" />
<EditText
android:id="@+id/et_tare"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_40"
android:background="@drawable/shape_bg"
android:gravity="center_horizontal"
android:hint="请输入皮重"
@ -48,7 +64,7 @@
android:gravity="center_horizontal"
android:padding="@dimen/dp_12"
android:text="提交审核"
android:textSize="@dimen/text_size_18"
android:textColor="@color/white" />
android:textColor="@color/white"
android:textSize="@dimen/text_size_18" />
</LinearLayout>

Loading…
Cancel
Save