Browse Source

穿透

master
lh 8 years ago
parent
commit
c869a18576
5 changed files with 96 additions and 38 deletions
  1. +3
    -0
      app/src/main/java/com/qhclh/ytzh/home/RpcUrl.java
  2. +26
    -1
      app/src/main/java/com/qhclh/ytzh/index/shangpin/PianquinfosActivity.java
  3. +39
    -12
      app/src/main/res/layout/act_pianquinfos.xml
  4. +28
    -0
      app/src/main/res/layout/item_pianquinfos.xml
  5. +0
    -25
      app/src/main/res/layout/pianqu_footer.xml

+ 3
- 0
app/src/main/java/com/qhclh/ytzh/home/RpcUrl.java View File

@ -79,4 +79,7 @@ public class RpcUrl {
public static String BreedReportRpcAreaCountInfo ="/MainSystem/B3_ZhongHui/Rpcs/BreedReportRpc/AreaCountInfo";
public static String BreedReportRpcAreaCountInfo_fanhui ="/MainSystem/B3_ZhongHui/Rpcs/BreedFactoryAreaCountInfo";
public static String BreedFactoryDetails ="/MainSystem/B3_ZhongHui/Rpcs/BreedReportRpc/BreedFactoryDetails";
public static String BreedFactoryDetails_fanhui ="/MainSystem/B3_ZhongHui/Rpcs/BreedFactoryInfo";
}

+ 26
- 1
app/src/main/java/com/qhclh/ytzh/index/shangpin/PianquinfosActivity.java View File

@ -1,7 +1,9 @@
package com.qhclh.ytzh.index.shangpin;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.qhclh.ytzh.R;
@ -18,9 +20,13 @@ public class PianquinfosActivity extends BaseActivity {
Toolbar mToolbar;
@BindView(R.id.tv_toolbar_title)
TextView tv_toolbar_title;
private long id;
private String name;
@BindView(R.id.ll_cunlan)
LinearLayout ll_cunlan;
@BindView(R.id.ll_konglan)
LinearLayout ll_konglan;
@Override
protected int setLayoutId() {
return R.layout.act_pianquinfos;
@ -34,6 +40,7 @@ public class PianquinfosActivity extends BaseActivity {
finish();
}
});
}
@Override
@ -41,6 +48,24 @@ public class PianquinfosActivity extends BaseActivity {
id = getIntent().getLongExtra("id",0);
name = getIntent().getStringExtra("name");
tv_toolbar_title.setText(name+"片区详细");
for (int i=0;i<25;i++){
View view = LayoutInflater.from(PianquinfosActivity.this).inflate(R.layout.item_pianquinfos,null);
TextView pianqu_name = view.findViewById(R.id.pianqu_name);
TextView pianqu_content = view.findViewById(R.id.pianqu_content);
pianqu_name.setText("aaaa++++++++++"+i);
pianqu_content.setText("bbb+++"+i);
ll_cunlan.addView(view);
}
for (int i=0;i<25;i++){
View view = LayoutInflater.from(PianquinfosActivity.this).inflate(R.layout.item_pianquinfos,null);
TextView pianqu_name = view.findViewById(R.id.pianqu_name);
TextView pianqu_content = view.findViewById(R.id.pianqu_content);
pianqu_name.setText("aaaa++++++++++"+i);
pianqu_content.setText("bbb+++"+i);
ll_konglan.addView(view);
}
}
@Override


+ 39
- 12
app/src/main/res/layout/act_pianquinfos.xml View File

@ -7,20 +7,47 @@
<include layout="@layout/include_tool_bar"></include>
<TextView
<ScrollView
android:scrollbars="none"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/dp_5"
android:text="存栏场"
android:textSize="@dimen/text_size_16" />
android:layout_height="wrap_content">
<ListView
android:id="@+id/lv_pianqu_cunlan"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/dp_5"
android:scrollbars="none">
</ListView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/dp_5"
android:text="存栏场"
android:textSize="@dimen/text_size_16" />
<LinearLayout
android:id="@+id/ll_cunlan"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/dp_5"
android:text="空栏场"
android:textSize="@dimen/text_size_16" />
<LinearLayout
android:id="@+id/ll_konglan"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>

+ 28
- 0
app/src/main/res/layout/item_pianquinfos.xml View File

@ -0,0 +1,28 @@
<?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="wrap_content"
android:orientation="vertical"
android:padding="@dimen/dp_5">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/pianqu_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/text_size_16" />
<TextView
android:id="@+id/pianqu_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/text_size_16" />
</LinearLayout>
<include layout="@layout/include_line" />
</LinearLayout>

+ 0
- 25
app/src/main/res/layout/pianqu_footer.xml View File

@ -1,25 +0,0 @@
<?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="@color/greyf4f4f4"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/dp_5"
android:text="空栏场"
android:textSize="@dimen/text_size_16" />
<ListView
android:id="@+id/lv_pianqu_konglan"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/dp_5"
android:scrollbars="none">
</ListView>
</LinearLayout>

Loading…
Cancel
Save