|
|
|
@ -3,6 +3,7 @@ package com.qhclh.ytzh.index; |
|
|
|
import android.support.v7.widget.Toolbar; |
|
|
|
import android.view.View; |
|
|
|
import android.widget.ImageView; |
|
|
|
import android.widget.LinearLayout; |
|
|
|
import android.widget.TextView; |
|
|
|
|
|
|
|
import com.qhclh.ytzh.R; |
|
|
|
@ -14,6 +15,7 @@ import org.litepal.crud.DataSupport; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import butterknife.BindView; |
|
|
|
import butterknife.OnClick; |
|
|
|
|
|
|
|
/** |
|
|
|
* Created by 青花瓷 on 2017/12/25. |
|
|
|
@ -32,6 +34,7 @@ public class JPInfoActivity extends BaseActivity { |
|
|
|
TextView system_time; |
|
|
|
@BindView(R.id.system_red) |
|
|
|
TextView system_red; |
|
|
|
|
|
|
|
@BindView(R.id.warninginfo_pic) |
|
|
|
ImageView warninginfo_pic; |
|
|
|
@BindView(R.id.warninginfo_title) |
|
|
|
@ -43,7 +46,41 @@ public class JPInfoActivity extends BaseActivity { |
|
|
|
@BindView(R.id.warninginfo_red) |
|
|
|
TextView warninginfo_red; |
|
|
|
|
|
|
|
private List<NewsBean> newsBeanList; |
|
|
|
@BindView(R.id.chickscan_pic) |
|
|
|
ImageView chickscan_pic; |
|
|
|
@BindView(R.id.chickscan_title) |
|
|
|
TextView chickscan_title; |
|
|
|
@BindView(R.id.chickscan_content) |
|
|
|
TextView chickscan_content; |
|
|
|
@BindView(R.id.chickscan_time) |
|
|
|
TextView chickscan_time; |
|
|
|
@BindView(R.id.chickscan_red) |
|
|
|
TextView chickscan_red; |
|
|
|
|
|
|
|
@BindView(R.id.killc_pic) |
|
|
|
ImageView killc_pic; |
|
|
|
@BindView(R.id.killc_title) |
|
|
|
TextView killc_title; |
|
|
|
@BindView(R.id.killc_content) |
|
|
|
TextView killc_content; |
|
|
|
@BindView(R.id.killc_time) |
|
|
|
TextView killc_time; |
|
|
|
@BindView(R.id.killc_red) |
|
|
|
TextView killc_red; |
|
|
|
|
|
|
|
@BindView(R.id.system_ll) |
|
|
|
LinearLayout system_ll; |
|
|
|
@BindView(R.id.warninginfo_ll) |
|
|
|
LinearLayout warninginfo_ll; |
|
|
|
@BindView(R.id.chickscan_ll) |
|
|
|
LinearLayout chickscan_ll; |
|
|
|
@BindView(R.id.killc_ll) |
|
|
|
LinearLayout killc_ll; |
|
|
|
|
|
|
|
private List<NewsBean> newsBeanListsystem; |
|
|
|
private List<NewsBean> newsBeanListwarning; |
|
|
|
private List<NewsBean> newsBeanListchick; |
|
|
|
private List<NewsBean> newsBeanListkillc; |
|
|
|
|
|
|
|
@Override |
|
|
|
protected int setLayoutId() { |
|
|
|
@ -62,11 +99,41 @@ public class JPInfoActivity extends BaseActivity { |
|
|
|
|
|
|
|
@Override |
|
|
|
protected void initData() { |
|
|
|
newsBeanList = DataSupport.select("id", "url", "title", "content", "time", "type").order("time desc").find(NewsBean.class); |
|
|
|
newsBeanListsystem = DataSupport.select("id", "url", "title", "content", "time", "type","red").where("type = ?","01").order("time desc").find(NewsBean.class); |
|
|
|
newsBeanListwarning = DataSupport.select("id", "url", "title", "content", "time", "type","red").where("type = ?","02").order("time desc").find(NewsBean.class); |
|
|
|
newsBeanListchick = DataSupport.select("id", "url", "title", "content", "time", "type","red").where("type = ?","03").order("time desc").find(NewsBean.class); |
|
|
|
newsBeanListkillc = DataSupport.select("id", "url", "title", "content", "time", "type","red").where("type = ?","04").order("time desc").find(NewsBean.class); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
protected void initOper() { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@OnClick({R.id.system_ll, R.id.warninginfo_ll, R.id.chickscan_ll,R.id.killc_ll}) |
|
|
|
public void onClick(View view) { |
|
|
|
switch (view.getId()) { |
|
|
|
///< 系统消息 |
|
|
|
case R.id.system_ll: { |
|
|
|
|
|
|
|
break; |
|
|
|
} |
|
|
|
///< 预警消息 |
|
|
|
case R.id.warninginfo_ll: { |
|
|
|
|
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
///< 扫描消息 |
|
|
|
case R.id.chickscan_ll: { |
|
|
|
|
|
|
|
break; |
|
|
|
} |
|
|
|
///< 屠宰消息 |
|
|
|
case R.id.killc_ll: { |
|
|
|
|
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |