Browse Source

no message

master
lh 8 years ago
parent
commit
d0c2aaa4e1
2 changed files with 37 additions and 8 deletions
  1. +33
    -0
      app/src/main/java/com/qhclh/ytzh/index/JPInfoActivity.java
  2. +4
    -8
      app/src/main/res/layout/act_jpinfo.xml

+ 33
- 0
app/src/main/java/com/qhclh/ytzh/index/JPInfoActivity.java View File

@ -6,6 +6,7 @@ import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.qhclh.ytzh.R;
import com.qhclh.ytzh.base.BaseActivity;
import com.qhclh.ytzh.bean.NewsBean;
@ -107,6 +108,38 @@ public class JPInfoActivity extends BaseActivity {
System.out.println("aaa22++++++"+newsBeanListwarning.toString());
System.out.println("aaa33++++++"+newsBeanListchick.toString());
System.out.println("aaa44++++++"+newsBeanListkillc.toString());
Glide.with(this).load(newsBeanListsystem.get(0).getUrl()).placeholder(R.mipmap.ic_launcher_round).error(R.mipmap.ic_launcher_round).into(system_pic);
system_title.setText("系统提示");
system_content.setText(newsBeanListsystem.get(0).getContent());
system_time.setText(newsBeanListsystem.get(0).getTime());
if (newsBeanListsystem.get(0).getRed()==1){
system_red.setVisibility(View.VISIBLE);
}
Glide.with(this).load(newsBeanListwarning.get(0).getUrl()).placeholder(R.mipmap.ic_launcher_round).error(R.mipmap.ic_launcher_round).into(warninginfo_pic);
warninginfo_title.setText("预警提示");
warninginfo_content.setText(newsBeanListwarning.get(0).getContent());
warninginfo_time.setText(newsBeanListwarning.get(0).getTime());
if (newsBeanListwarning.get(0).getRed()==1){
warninginfo_red.setVisibility(View.VISIBLE);
}
Glide.with(this).load(newsBeanListchick.get(0).getUrl()).placeholder(R.mipmap.ic_launcher_round).error(R.mipmap.ic_launcher_round).into(chickscan_pic);
chickscan_title.setText("鸡苗扫码推送");
chickscan_content.setText(newsBeanListchick.get(0).getContent());
chickscan_time.setText(newsBeanListchick.get(0).getTime());
if (newsBeanListchick.get(0).getRed()==1){
chickscan_red.setVisibility(View.VISIBLE);
}
Glide.with(this).load(newsBeanListkillc.get(0).getUrl()).placeholder(R.mipmap.ic_launcher_round).error(R.mipmap.ic_launcher_round).into(killc_pic);
killc_title.setText("屠宰单");
killc_content.setText(newsBeanListkillc.get(0).getContent());
killc_time.setText(newsBeanListkillc.get(0).getTime());
if (newsBeanListkillc.get(0).getRed()==1){
killc_red.setVisibility(View.VISIBLE);
}
}
@Override


+ 4
- 8
app/src/main/res/layout/act_jpinfo.xml View File

@ -41,7 +41,7 @@
android:id="@+id/system_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_5"
android:layout_marginTop="@dimen/dp_10"
android:ellipsize="end"
android:maxEms="6"
android:maxLines="1"
@ -69,7 +69,6 @@
android:layout_height="@dimen/dp_8"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/dp_5"
android:layout_marginRight="@dimen/dp_5"
android:background="@drawable/shape_red"
android:visibility="invisible" />
@ -112,7 +111,7 @@
android:id="@+id/warninginfo_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_5"
android:layout_marginTop="@dimen/dp_10"
android:ellipsize="end"
android:maxEms="6"
android:maxLines="1"
@ -140,7 +139,6 @@
android:layout_height="@dimen/dp_8"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/dp_5"
android:layout_marginRight="@dimen/dp_5"
android:background="@drawable/shape_red"
android:visibility="invisible" />
@ -184,7 +182,7 @@
android:id="@+id/chickscan_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_5"
android:layout_marginTop="@dimen/dp_10"
android:ellipsize="end"
android:maxEms="6"
android:maxLines="1"
@ -212,7 +210,6 @@
android:layout_height="@dimen/dp_8"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/dp_5"
android:layout_marginRight="@dimen/dp_5"
android:background="@drawable/shape_red"
android:visibility="invisible" />
@ -256,7 +253,7 @@
android:id="@+id/killc_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_5"
android:layout_marginTop="@dimen/dp_10"
android:ellipsize="end"
android:maxEms="6"
android:maxLines="1"
@ -284,7 +281,6 @@
android:layout_height="@dimen/dp_8"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/dp_5"
android:layout_marginRight="@dimen/dp_5"
android:background="@drawable/shape_red"
android:visibility="invisible" />


Loading…
Cancel
Save