From 1699427dec8cd0006c7ea5388efa1c62cd1edc1b Mon Sep 17 00:00:00 2001
From: maning <154292322@qq.com>
Date: Thu, 15 Oct 2020 17:42:54 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=9E=83=E5=9C=BE=E5=88=86?=
=?UTF-8?q?=E7=B1=BB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/src/main/AndroidManifest.xml | 48 ++---
.../bean/rolltools/DictionaryResultBean.java | 124 +++++++++++
.../bean/rolltools/RubbishTypeResultBean.java | 78 +++++++
.../com/maning/gankmm/constant/Constants.java | 2 +
.../http/rolltools/APIRolltoolsService.java | 35 ++-
.../gankmm/http/rolltools/RolltoolsApi.java | 22 ++
.../ui/activity/mob/HealthActivity.java | 199 ------------------
.../{mob => tools}/BankCardActivity.java | 2 +-
.../{mob => tools}/CarDetailActivity.java | 2 +-
.../{mob => tools}/CarItemsActivity.java | 2 +-
.../{mob => tools}/CarListActivity.java | 2 +-
.../ChineseCalendarActivity.java | 42 ++--
.../{mob => tools}/CookDetailsActivity.java | 2 +-
.../{mob => tools}/CookListActivity.java | 2 +-
.../{mob => tools}/CookMenuActivity.java | 2 +-
.../{mob => tools}/DictionaryActivity.java | 43 ++--
.../{mob => tools}/FlightActivity.java | 2 +-
.../{mob => tools}/FlightListActivity.java | 2 +-
.../{mob => tools}/HistoryTodayActivity.java | 4 +-
.../{mob => tools}/IDCardQueryActivity.java | 2 +-
.../{mob => tools}/IPQueryActivity.java | 2 +-
.../{mob => tools}/IdiomActivity.java | 2 +-
.../LotteryCategoryActivity.java | 2 +-
.../{mob => tools}/LotteryDetailActivity.java | 2 +-
.../{mob => tools}/OilPriceActivity.java | 2 +-
.../{mob => tools}/PhoneAddressActivity.java | 2 +-
.../{mob => tools}/PostCodeActivity.java | 2 +-
.../ui/activity/tools/RubbishActivity.java | 140 ++++++++++++
.../{mob => tools}/TrainActivity.java | 2 +-
.../{mob => tools}/TrainListActivity.java | 2 +-
.../{mob => tools}/WXArticleActivity.java | 2 +-
.../ui/adapter/RecycleMobQueryAdapter.java | 8 -
.../gankmm/ui/adapter/RecycleMoreAdapter.java | 57 +++--
.../ui/adapter/RecycleMoreItemAdapter.java | 2 +
...dapter.java => RecycleRubbishAdapter.java} | 28 ++-
.../ui/adapter/RecycleTrainAdapter.java | 7 +-
.../adapter/RecycleTrainDetailsAdapter.java | 11 -
.../gank_icon_tools_rubbish.png | Bin 0 -> 3064 bytes
.../main/res/layout/activity_dictionary.xml | 2 +-
...tivity_health.xml => activity_rubbish.xml} | 24 +--
app/src/main/res/layout/item_health.xml | 35 ++-
.../main/res/layout/item_history_today.xml | 2 +
42 files changed, 542 insertions(+), 411 deletions(-)
create mode 100644 app/src/main/java/com/maning/gankmm/bean/rolltools/DictionaryResultBean.java
create mode 100644 app/src/main/java/com/maning/gankmm/bean/rolltools/RubbishTypeResultBean.java
delete mode 100644 app/src/main/java/com/maning/gankmm/ui/activity/mob/HealthActivity.java
rename app/src/main/java/com/maning/gankmm/ui/activity/{mob => tools}/BankCardActivity.java (98%)
rename app/src/main/java/com/maning/gankmm/ui/activity/{mob => tools}/CarDetailActivity.java (99%)
rename app/src/main/java/com/maning/gankmm/ui/activity/{mob => tools}/CarItemsActivity.java (98%)
rename app/src/main/java/com/maning/gankmm/ui/activity/{mob => tools}/CarListActivity.java (99%)
rename app/src/main/java/com/maning/gankmm/ui/activity/{mob => tools}/ChineseCalendarActivity.java (67%)
rename app/src/main/java/com/maning/gankmm/ui/activity/{mob => tools}/CookDetailsActivity.java (98%)
rename app/src/main/java/com/maning/gankmm/ui/activity/{mob => tools}/CookListActivity.java (99%)
rename app/src/main/java/com/maning/gankmm/ui/activity/{mob => tools}/CookMenuActivity.java (99%)
rename app/src/main/java/com/maning/gankmm/ui/activity/{mob => tools}/DictionaryActivity.java (71%)
rename app/src/main/java/com/maning/gankmm/ui/activity/{mob => tools}/FlightActivity.java (99%)
rename app/src/main/java/com/maning/gankmm/ui/activity/{mob => tools}/FlightListActivity.java (99%)
rename app/src/main/java/com/maning/gankmm/ui/activity/{mob => tools}/HistoryTodayActivity.java (97%)
rename app/src/main/java/com/maning/gankmm/ui/activity/{mob => tools}/IDCardQueryActivity.java (98%)
rename app/src/main/java/com/maning/gankmm/ui/activity/{mob => tools}/IPQueryActivity.java (98%)
rename app/src/main/java/com/maning/gankmm/ui/activity/{mob => tools}/IdiomActivity.java (98%)
rename app/src/main/java/com/maning/gankmm/ui/activity/{mob => tools}/LotteryCategoryActivity.java (98%)
rename app/src/main/java/com/maning/gankmm/ui/activity/{mob => tools}/LotteryDetailActivity.java (99%)
rename app/src/main/java/com/maning/gankmm/ui/activity/{mob => tools}/OilPriceActivity.java (98%)
rename app/src/main/java/com/maning/gankmm/ui/activity/{mob => tools}/PhoneAddressActivity.java (99%)
rename app/src/main/java/com/maning/gankmm/ui/activity/{mob => tools}/PostCodeActivity.java (98%)
create mode 100644 app/src/main/java/com/maning/gankmm/ui/activity/tools/RubbishActivity.java
rename app/src/main/java/com/maning/gankmm/ui/activity/{mob => tools}/TrainActivity.java (99%)
rename app/src/main/java/com/maning/gankmm/ui/activity/{mob => tools}/TrainListActivity.java (99%)
rename app/src/main/java/com/maning/gankmm/ui/activity/{mob => tools}/WXArticleActivity.java (99%)
rename app/src/main/java/com/maning/gankmm/ui/adapter/{RecycleHealthAdapter.java => RecycleRubbishAdapter.java} (63%)
create mode 100644 app/src/main/res/drawable-xxhdpi/gank_icon_tools_rubbish.png
rename app/src/main/res/layout/{activity_health.xml => activity_rubbish.xml} (69%)
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 436a1c7..f481f5c 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -243,41 +243,41 @@
android:name=".ui.activity.SupportPayActivity"
android:screenOrientation="portrait"/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/app/src/main/java/com/maning/gankmm/bean/rolltools/DictionaryResultBean.java b/app/src/main/java/com/maning/gankmm/bean/rolltools/DictionaryResultBean.java
new file mode 100644
index 0000000..f5a04c5
--- /dev/null
+++ b/app/src/main/java/com/maning/gankmm/bean/rolltools/DictionaryResultBean.java
@@ -0,0 +1,124 @@
+package com.maning.gankmm.bean.rolltools;
+
+import java.util.List;
+
+/**
+ * @author : maning
+ * @date : 2020-10-15
+ * @desc :
+ */
+public class DictionaryResultBean extends RollToolsBaseBean {
+
+
+ private List data;
+
+ public List getData() {
+ return data;
+ }
+
+ public void setData(List data) {
+ this.data = data;
+ }
+
+ public static class DataEntity {
+ /**
+ * word : 穆
+ * traditional : 穆
+ * pinyin : mù
+ * radicals : 禾
+ * explanation : 穆
+
+ (形声。本义禾名)
+
+ 同本义
+
+ 穆,禾也。--《说文》。段玉裁注盖禾有名穆者也。”
+
+ 古时宗庙制度,父居左为昭,子居右为穆。参见昭穆”
+
+ 辩庙祧之昭穆。--《周礼·小宗伯》。注父曰昭,子曰穆。”
+
+ 代指右边
+
+ 只见贾府人分了昭穆,排班立定。--《红楼梦》
+
+ 又如昭穆(左边和右边)
+
+ 姓
+
+ 穆
+
+ 恭敬
+
+ 于穆清庙。--《诗·周颂·清庙》
+
+ 穆穆皇皇。--《诗·大雅·假乐》
+
+ 我其为王穆卜。--《书·金滕》。传
+
+ 穆mù
+
+ ⒈和畅,美好~如清风。
+
+ ⒉和睦不~。
+
+ ⒊恭敬,严肃静~。肃~。~ ~皇皇(皇皇美好的样子)。
+ * strokes : 16
+ */
+
+ private String word;
+ private String traditional;
+ private String pinyin;
+ private String radicals;
+ private String explanation;
+ private int strokes;
+
+ public String getWord() {
+ return word;
+ }
+
+ public void setWord(String word) {
+ this.word = word;
+ }
+
+ public String getTraditional() {
+ return traditional;
+ }
+
+ public void setTraditional(String traditional) {
+ this.traditional = traditional;
+ }
+
+ public String getPinyin() {
+ return pinyin;
+ }
+
+ public void setPinyin(String pinyin) {
+ this.pinyin = pinyin;
+ }
+
+ public String getRadicals() {
+ return radicals;
+ }
+
+ public void setRadicals(String radicals) {
+ this.radicals = radicals;
+ }
+
+ public String getExplanation() {
+ return explanation;
+ }
+
+ public void setExplanation(String explanation) {
+ this.explanation = explanation;
+ }
+
+ public int getStrokes() {
+ return strokes;
+ }
+
+ public void setStrokes(int strokes) {
+ this.strokes = strokes;
+ }
+ }
+}
diff --git a/app/src/main/java/com/maning/gankmm/bean/rolltools/RubbishTypeResultBean.java b/app/src/main/java/com/maning/gankmm/bean/rolltools/RubbishTypeResultBean.java
new file mode 100644
index 0000000..21b826a
--- /dev/null
+++ b/app/src/main/java/com/maning/gankmm/bean/rolltools/RubbishTypeResultBean.java
@@ -0,0 +1,78 @@
+package com.maning.gankmm.bean.rolltools;
+
+import java.util.List;
+
+/**
+ * @author : maning
+ * @date : 2020-10-15
+ * @desc :
+ */
+public class RubbishTypeResultBean extends RollToolsBaseBean {
+
+
+ /**
+ * data : {"aim":{"goodsName":"西瓜","goodsType":"湿垃圾"},"recommendList":[{"goodsName":"西瓜霜含片塑料铝箔包装","goodsType":"有害垃圾"}]}
+ */
+
+ private DataEntity data;
+
+ public DataEntity getData() {
+ return data;
+ }
+
+ public void setData(DataEntity data) {
+ this.data = data;
+ }
+
+ public static class DataEntity {
+ /**
+ * aim : {"goodsName":"西瓜","goodsType":"湿垃圾"}
+ * recommendList : [{"goodsName":"西瓜霜含片塑料铝箔包装","goodsType":"有害垃圾"}]
+ */
+
+ private AimEntity aim;
+ private List recommendList;
+
+ public AimEntity getAim() {
+ return aim;
+ }
+
+ public void setAim(AimEntity aim) {
+ this.aim = aim;
+ }
+
+ public List getRecommendList() {
+ return recommendList;
+ }
+
+ public void setRecommendList(List recommendList) {
+ this.recommendList = recommendList;
+ }
+
+ public static class AimEntity {
+ /**
+ * goodsName : 西瓜
+ * goodsType : 湿垃圾
+ */
+
+ private String goodsName;
+ private String goodsType;
+
+ public String getGoodsName() {
+ return goodsName;
+ }
+
+ public void setGoodsName(String goodsName) {
+ this.goodsName = goodsName;
+ }
+
+ public String getGoodsType() {
+ return goodsType;
+ }
+
+ public void setGoodsType(String goodsType) {
+ this.goodsType = goodsType;
+ }
+ }
+ }
+}
diff --git a/app/src/main/java/com/maning/gankmm/constant/Constants.java b/app/src/main/java/com/maning/gankmm/constant/Constants.java
index 48f0c73..d779c49 100644
--- a/app/src/main/java/com/maning/gankmm/constant/Constants.java
+++ b/app/src/main/java/com/maning/gankmm/constant/Constants.java
@@ -22,6 +22,8 @@ public class Constants {
//开源API:https://github.com/MZCretin/RollToolsApi
public static final String BASEURL_ROLL_TOOLS = "https://www.mxnzp.com/api/";
+ public static final String ROLL_TOOLS_APP_ID = "olkgphoyitdqikvi";
+ public static final String ROLL_TOOLS_APP_SECRET = "SFdTdFB5aGVoamlXU2dZblpPZTRjQT09";
//干活历史日期
public static final String URL_HistoryDate = "http://gank.io/api/day/history";
diff --git a/app/src/main/java/com/maning/gankmm/http/rolltools/APIRolltoolsService.java b/app/src/main/java/com/maning/gankmm/http/rolltools/APIRolltoolsService.java
index c362ec6..31814ae 100644
--- a/app/src/main/java/com/maning/gankmm/http/rolltools/APIRolltoolsService.java
+++ b/app/src/main/java/com/maning/gankmm/http/rolltools/APIRolltoolsService.java
@@ -1,13 +1,17 @@
package com.maning.gankmm.http.rolltools;
+import com.maning.gankmm.bean.rolltools.DictionaryResultBean;
import com.maning.gankmm.bean.rolltools.HistoryTodayBean;
import com.maning.gankmm.bean.rolltools.HolidaySingleResultBean;
+import com.maning.gankmm.bean.rolltools.RubbishTypeResultBean;
import com.maning.gankmm.bean.rolltools.WeatherFuturedaysResultBean;
+import com.maning.gankmm.constant.Constants;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.Path;
+import retrofit2.http.Query;
/**
@@ -17,8 +21,8 @@ public interface APIRolltoolsService {
@Headers({
- "app_id:olkgphoyitdqikvi",
- "app_secret:SFdTdFB5aGVoamlXU2dZblpPZTRjQT09"
+ "app_id:" + Constants.ROLL_TOOLS_APP_ID,
+ "app_secret:" + Constants.ROLL_TOOLS_APP_SECRET
})
@GET("holiday/single/{date}")
Call getHolidaySingle(
@@ -27,8 +31,8 @@ Call getHolidaySingle(
@Headers({
- "app_id:olkgphoyitdqikvi",
- "app_secret:SFdTdFB5aGVoamlXU2dZblpPZTRjQT09"
+ "app_id:" + Constants.ROLL_TOOLS_APP_ID,
+ "app_secret:" + Constants.ROLL_TOOLS_APP_SECRET
})
@GET("weather/forecast/{cityName}")
Call getCityWeatherFutureDays(
@@ -36,10 +40,29 @@ Call getCityWeatherFutureDays(
);
@Headers({
- "app_id:olkgphoyitdqikvi",
- "app_secret:SFdTdFB5aGVoamlXU2dZblpPZTRjQT09"
+ "app_id:" + Constants.ROLL_TOOLS_APP_ID,
+ "app_secret:" + Constants.ROLL_TOOLS_APP_SECRET
})
@GET("history/today?type=1")
Call getHistoryToday();
+
+ @Headers({
+ "app_id:" + Constants.ROLL_TOOLS_APP_ID,
+ "app_secret:" + Constants.ROLL_TOOLS_APP_SECRET
+ })
+ @GET("convert/dictionary")
+ Call convertDictionary(
+ @Query("content") String content
+ );
+
+ @Headers({
+ "app_id:" + Constants.ROLL_TOOLS_APP_ID,
+ "app_secret:" + Constants.ROLL_TOOLS_APP_SECRET
+ })
+ @GET("rubbish/type")
+ Call getRubbishType(
+ @Query("name") String name
+ );
+
}
diff --git a/app/src/main/java/com/maning/gankmm/http/rolltools/RolltoolsApi.java b/app/src/main/java/com/maning/gankmm/http/rolltools/RolltoolsApi.java
index 9dd918d..2e8626e 100644
--- a/app/src/main/java/com/maning/gankmm/http/rolltools/RolltoolsApi.java
+++ b/app/src/main/java/com/maning/gankmm/http/rolltools/RolltoolsApi.java
@@ -1,7 +1,9 @@
package com.maning.gankmm.http.rolltools;
+import com.maning.gankmm.bean.rolltools.DictionaryResultBean;
import com.maning.gankmm.bean.rolltools.HistoryTodayBean;
import com.maning.gankmm.bean.rolltools.HolidaySingleResultBean;
+import com.maning.gankmm.bean.rolltools.RubbishTypeResultBean;
import com.maning.gankmm.bean.rolltools.WeatherFuturedaysResultBean;
import com.maning.gankmm.http.BuildApi;
import com.maning.gankmm.http.callback.CommonHttpCallback;
@@ -35,11 +37,31 @@ public static void getCityWeatherFutureDays(String cityName, CommonHttpCallback<
/**
* 历史上的今天
+ *
* @param httpCallback
*/
public static void getHistoryToday(CommonHttpCallback httpCallback) {
BuildApi.getRooltoolsAPIService().getHistoryToday().enqueue(httpCallback);
}
+ /**
+ * 查询单个汉字的读音和含义。
+ *
+ * @param content
+ * @param httpCallback
+ */
+ public static void convertDictionary(String content, CommonHttpCallback httpCallback) {
+ BuildApi.getRooltoolsAPIService().convertDictionary(content).enqueue(httpCallback);
+ }
+
+ /**
+ * 垃圾分类
+ * @param content
+ * @param httpCallback
+ */
+ public static void getRubbishType(String content, CommonHttpCallback httpCallback) {
+ BuildApi.getRooltoolsAPIService().getRubbishType(content).enqueue(httpCallback);
+ }
+
}
diff --git a/app/src/main/java/com/maning/gankmm/ui/activity/mob/HealthActivity.java b/app/src/main/java/com/maning/gankmm/ui/activity/mob/HealthActivity.java
deleted file mode 100644
index 37de2c5..0000000
--- a/app/src/main/java/com/maning/gankmm/ui/activity/mob/HealthActivity.java
+++ /dev/null
@@ -1,199 +0,0 @@
-package com.maning.gankmm.ui.activity.mob;
-
-import android.graphics.Color;
-import android.os.Bundle;
-import android.support.v7.widget.DefaultItemAnimator;
-import android.support.v7.widget.LinearLayoutManager;
-import android.support.v7.widget.RecyclerView;
-import android.support.v7.widget.Toolbar;
-import android.text.TextUtils;
-import android.view.MenuItem;
-
-import com.aspsine.swipetoloadlayout.OnLoadMoreListener;
-import com.aspsine.swipetoloadlayout.OnRefreshListener;
-import com.aspsine.swipetoloadlayout.SwipeToLoadLayout;
-import com.maning.gankmm.R;
-import com.maning.gankmm.bean.mob.MobHealthEntity;
-import com.maning.gankmm.http.mob.MobApi;
-import com.maning.gankmm.http.callback.MyCallBack;
-import com.maning.gankmm.skin.SkinManager;
-import com.maning.gankmm.ui.adapter.RecycleHealthAdapter;
-import com.maning.gankmm.ui.base.BaseActivity;
-import com.maning.gankmm.ui.view.MClearEditText;
-import com.maning.gankmm.utils.KeyboardUtils;
-import com.maning.gankmm.utils.MySnackbar;
-import com.yqritc.recyclerviewflexibledivider.HorizontalDividerItemDecoration;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import butterknife.Bind;
-import butterknife.ButterKnife;
-import butterknife.OnClick;
-
-/**
- * 健康知识
- */
-public class HealthActivity extends BaseActivity implements OnRefreshListener, OnLoadMoreListener {
-
- @Bind(R.id.toolbar)
- Toolbar toolbar;
- @Bind(R.id.editText)
- MClearEditText editText;
- @Bind(R.id.swipe_target)
- RecyclerView recyclerView;
- @Bind(R.id.swipeToLoadLayout)
- SwipeToLoadLayout swipeToLoadLayout;
-
-
- private int pageIndex = 1;
- private int pageSize = 20;
-
- private ArrayList mDatas = new ArrayList<>();
- private RecycleHealthAdapter recycleHealthAdapter;
- private String keyWord;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_health);
- ButterKnife.bind(this);
-
-
- initMyToolBar();
-
- initRecyclerView();
-
- }
-
- private void initRecyclerView() {
- LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false);
- recyclerView.setLayoutManager(linearLayoutManager);
- recyclerView.setItemAnimator(new DefaultItemAnimator());
- recyclerView.addItemDecoration(new HorizontalDividerItemDecoration.Builder(this).color(Color.LTGRAY).build());
- recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
- @Override
- public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
- if (Math.abs(dy) > 20) {
- KeyboardUtils.hideSoftInput(HealthActivity.this);
- }
- super.onScrolled(recyclerView, dx, dy);
- }
- });
-
- swipeToLoadLayout.setOnRefreshListener(this);
- swipeToLoadLayout.setOnLoadMoreListener(this);
- swipeToLoadLayout.setRefreshEnabled(false);
- swipeToLoadLayout.setLoadMoreEnabled(false);
- }
-
- private void initMyToolBar() {
- int currentSkinType = SkinManager.getCurrentSkinType(this);
- if (SkinManager.THEME_DAY == currentSkinType) {
- initToolBar(toolbar, "健康知识", R.drawable.gank_ic_back_white);
- } else {
- initToolBar(toolbar, "健康知识", R.drawable.gank_ic_back_night);
- }
- }
-
- @Override
- public boolean onOptionsItemSelected(MenuItem item) {
- switch (item.getItemId()) {
- case android.R.id.home:
- this.finish();
- return true;
- }
- return super.onOptionsItemSelected(item);
- }
-
-
- @OnClick(R.id.btn_query)
- public void btnQuery() {
- showProgressDialog("查询中...");
- //获取关键字
- keyWord = editText.getText().toString();
- if (TextUtils.isEmpty(keyWord)) {
- MySnackbar.makeSnackBarBlack(toolbar, "查询内容不能为空");
- dissmissProgressDialog();
- return;
- }
- KeyboardUtils.hideSoftInput(this);
- //查询
- onRefresh();
- }
-
- private void queryDatas(int what) {
- MobApi.queryHealth(keyWord, pageIndex, pageSize, what, httpCallBack);
- }
-
-
- private void initAdapter() {
- if (recycleHealthAdapter == null) {
- recycleHealthAdapter = new RecycleHealthAdapter(this, mDatas);
- recyclerView.setAdapter(recycleHealthAdapter);
- } else {
- recycleHealthAdapter.upddateDatas(mDatas);
- }
- }
-
-
- private MyCallBack httpCallBack = new MyCallBack() {
- @Override
- public void onSuccess(int what, Object result) {
- dissmissProgressDialog();
- MobHealthEntity mobHealthEntity = (MobHealthEntity) result;
- if (mobHealthEntity != null) {
- List list = mobHealthEntity.getList();
- if (what == 0x001) {
- mDatas = (ArrayList) list;
- } else {
- mDatas.addAll(list);
- }
- initAdapter();
-
- if (mDatas.size() < pageIndex * pageSize) {
- swipeToLoadLayout.setLoadMoreEnabled(false);
- } else {
- swipeToLoadLayout.setLoadMoreEnabled(true);
- }
-
- if (mDatas.size() > 0) {
- swipeToLoadLayout.setRefreshEnabled(true);
- } else {
- swipeToLoadLayout.setRefreshEnabled(false);
- }
- pageIndex++;
- overRefresh();
- }
- }
-
- @Override
- public void onSuccessList(int what, List results) {
-
- }
-
- @Override
- public void onFail(int what, String result) {
- dissmissProgressDialog();
- MySnackbar.makeSnackBarRed(toolbar, result);
- overRefresh();
- }
- };
-
- private void overRefresh() {
- swipeToLoadLayout.setRefreshing(false);
- swipeToLoadLayout.setLoadingMore(false);
- }
-
- @Override
- public void onRefresh() {
- pageIndex = 1;
- queryDatas(0x001);
- }
-
- @Override
- public void onLoadMore() {
- queryDatas(0x002);
- }
-}
-
diff --git a/app/src/main/java/com/maning/gankmm/ui/activity/mob/BankCardActivity.java b/app/src/main/java/com/maning/gankmm/ui/activity/tools/BankCardActivity.java
similarity index 98%
rename from app/src/main/java/com/maning/gankmm/ui/activity/mob/BankCardActivity.java
rename to app/src/main/java/com/maning/gankmm/ui/activity/tools/BankCardActivity.java
index 666616c..786e6b8 100644
--- a/app/src/main/java/com/maning/gankmm/ui/activity/mob/BankCardActivity.java
+++ b/app/src/main/java/com/maning/gankmm/ui/activity/tools/BankCardActivity.java
@@ -1,4 +1,4 @@
-package com.maning.gankmm.ui.activity.mob;
+package com.maning.gankmm.ui.activity.tools;
import android.os.Bundle;
import android.support.v7.widget.DefaultItemAnimator;
diff --git a/app/src/main/java/com/maning/gankmm/ui/activity/mob/CarDetailActivity.java b/app/src/main/java/com/maning/gankmm/ui/activity/tools/CarDetailActivity.java
similarity index 99%
rename from app/src/main/java/com/maning/gankmm/ui/activity/mob/CarDetailActivity.java
rename to app/src/main/java/com/maning/gankmm/ui/activity/tools/CarDetailActivity.java
index 836f65a..e1b8c95 100644
--- a/app/src/main/java/com/maning/gankmm/ui/activity/mob/CarDetailActivity.java
+++ b/app/src/main/java/com/maning/gankmm/ui/activity/tools/CarDetailActivity.java
@@ -1,4 +1,4 @@
-package com.maning.gankmm.ui.activity.mob;
+package com.maning.gankmm.ui.activity.tools;
import android.os.Bundle;
import android.support.v7.widget.DefaultItemAnimator;
diff --git a/app/src/main/java/com/maning/gankmm/ui/activity/mob/CarItemsActivity.java b/app/src/main/java/com/maning/gankmm/ui/activity/tools/CarItemsActivity.java
similarity index 98%
rename from app/src/main/java/com/maning/gankmm/ui/activity/mob/CarItemsActivity.java
rename to app/src/main/java/com/maning/gankmm/ui/activity/tools/CarItemsActivity.java
index 3030190..e9ea660 100644
--- a/app/src/main/java/com/maning/gankmm/ui/activity/mob/CarItemsActivity.java
+++ b/app/src/main/java/com/maning/gankmm/ui/activity/tools/CarItemsActivity.java
@@ -1,4 +1,4 @@
-package com.maning.gankmm.ui.activity.mob;
+package com.maning.gankmm.ui.activity.tools;
import android.content.Intent;
import android.os.Bundle;
diff --git a/app/src/main/java/com/maning/gankmm/ui/activity/mob/CarListActivity.java b/app/src/main/java/com/maning/gankmm/ui/activity/tools/CarListActivity.java
similarity index 99%
rename from app/src/main/java/com/maning/gankmm/ui/activity/mob/CarListActivity.java
rename to app/src/main/java/com/maning/gankmm/ui/activity/tools/CarListActivity.java
index c8b3a47..b1a39f2 100644
--- a/app/src/main/java/com/maning/gankmm/ui/activity/mob/CarListActivity.java
+++ b/app/src/main/java/com/maning/gankmm/ui/activity/tools/CarListActivity.java
@@ -1,4 +1,4 @@
-package com.maning.gankmm.ui.activity.mob;
+package com.maning.gankmm.ui.activity.tools;
import android.content.Intent;
import android.os.Bundle;
diff --git a/app/src/main/java/com/maning/gankmm/ui/activity/mob/ChineseCalendarActivity.java b/app/src/main/java/com/maning/gankmm/ui/activity/tools/ChineseCalendarActivity.java
similarity index 67%
rename from app/src/main/java/com/maning/gankmm/ui/activity/mob/ChineseCalendarActivity.java
rename to app/src/main/java/com/maning/gankmm/ui/activity/tools/ChineseCalendarActivity.java
index f00835d..c55fa31 100644
--- a/app/src/main/java/com/maning/gankmm/ui/activity/mob/ChineseCalendarActivity.java
+++ b/app/src/main/java/com/maning/gankmm/ui/activity/tools/ChineseCalendarActivity.java
@@ -1,4 +1,4 @@
-package com.maning.gankmm.ui.activity.mob;
+package com.maning.gankmm.ui.activity.tools;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
@@ -6,16 +6,16 @@
import android.widget.TextView;
import com.maning.gankmm.R;
-import com.maning.gankmm.bean.mob.CalendarInfoEntity;
-import com.maning.gankmm.http.callback.MyCallBack;
-import com.maning.gankmm.http.mob.MobApi;
+import com.maning.gankmm.bean.rolltools.HolidayBean;
+import com.maning.gankmm.bean.rolltools.HolidaySingleResultBean;
+import com.maning.gankmm.http.callback.CommonHttpCallback;
+import com.maning.gankmm.http.rolltools.RolltoolsApi;
import com.maning.gankmm.skin.SkinManager;
import com.maning.gankmm.ui.base.BaseActivity;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
-import java.util.List;
import butterknife.Bind;
import butterknife.ButterKnife;
@@ -23,6 +23,7 @@
/**
* 老黄历页面
+ * TODO:添加一个日历控件黄历显示在下面
*/
public class ChineseCalendarActivity extends BaseActivity {
@@ -40,7 +41,7 @@ public class ChineseCalendarActivity extends BaseActivity {
TextView tv05;
private Calendar calendar = Calendar.getInstance();
- private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ private SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -59,33 +60,28 @@ private void queryData(Date date) {
showProgressDialog("正在查询...");
//获取当天日期
String dateString = sdf.format(date);
- MobApi.getCalendarInfo(dateString, 0x001, new MyCallBack() {
+ RolltoolsApi.getHolidaySingle(dateString, new CommonHttpCallback() {
@Override
- public void onSuccess(int what, Object result) {
+ public void onSuccess(HolidaySingleResultBean result) {
dissmissProgressDialog();
- CalendarInfoEntity calendarInfoEntity = (CalendarInfoEntity) result;
- RefreshView(calendarInfoEntity);
+ HolidayBean holidayBean = result.getData();
+ refreshView(holidayBean);
}
@Override
- public void onSuccessList(int what, List results) {
-
- }
-
- @Override
- public void onFail(int what, String result) {
+ public void onFail(int code, String message) {
dissmissProgressDialog();
}
});
}
- private void RefreshView(CalendarInfoEntity calendarInfoEntity) {
- if (calendarInfoEntity != null) {
- tv01.setText(calendarInfoEntity.getDate());
- tv02.setText(calendarInfoEntity.getLunar());
- tv03.setText(calendarInfoEntity.getLunarYear() + " (" + calendarInfoEntity.getZodiac() + ") " + calendarInfoEntity.getWeekday());
- tv04.setText(calendarInfoEntity.getSuit());
- tv05.setText(calendarInfoEntity.getAvoid());
+ private void refreshView(HolidayBean holidayBean) {
+ if (holidayBean != null) {
+ tv01.setText(holidayBean.getDate());
+ tv02.setText(holidayBean.getLunarCalendar());
+ tv03.setText(holidayBean.getYearTips() + " (" + holidayBean.getChineseZodiac() + ") - " + holidayBean.getSolarTerms());
+ tv04.setText(holidayBean.getSuit());
+ tv05.setText(holidayBean.getAvoid());
}
}
diff --git a/app/src/main/java/com/maning/gankmm/ui/activity/mob/CookDetailsActivity.java b/app/src/main/java/com/maning/gankmm/ui/activity/tools/CookDetailsActivity.java
similarity index 98%
rename from app/src/main/java/com/maning/gankmm/ui/activity/mob/CookDetailsActivity.java
rename to app/src/main/java/com/maning/gankmm/ui/activity/tools/CookDetailsActivity.java
index a8e653a..3ec611e 100644
--- a/app/src/main/java/com/maning/gankmm/ui/activity/mob/CookDetailsActivity.java
+++ b/app/src/main/java/com/maning/gankmm/ui/activity/tools/CookDetailsActivity.java
@@ -1,4 +1,4 @@
-package com.maning.gankmm.ui.activity.mob;
+package com.maning.gankmm.ui.activity.tools;
import android.os.Bundle;
import android.support.v7.widget.DefaultItemAnimator;
diff --git a/app/src/main/java/com/maning/gankmm/ui/activity/mob/CookListActivity.java b/app/src/main/java/com/maning/gankmm/ui/activity/tools/CookListActivity.java
similarity index 99%
rename from app/src/main/java/com/maning/gankmm/ui/activity/mob/CookListActivity.java
rename to app/src/main/java/com/maning/gankmm/ui/activity/tools/CookListActivity.java
index a2145cf..389239a 100644
--- a/app/src/main/java/com/maning/gankmm/ui/activity/mob/CookListActivity.java
+++ b/app/src/main/java/com/maning/gankmm/ui/activity/tools/CookListActivity.java
@@ -1,4 +1,4 @@
-package com.maning.gankmm.ui.activity.mob;
+package com.maning.gankmm.ui.activity.tools;
import android.content.Intent;
import android.os.Bundle;
diff --git a/app/src/main/java/com/maning/gankmm/ui/activity/mob/CookMenuActivity.java b/app/src/main/java/com/maning/gankmm/ui/activity/tools/CookMenuActivity.java
similarity index 99%
rename from app/src/main/java/com/maning/gankmm/ui/activity/mob/CookMenuActivity.java
rename to app/src/main/java/com/maning/gankmm/ui/activity/tools/CookMenuActivity.java
index a91508c..9bed8fc 100644
--- a/app/src/main/java/com/maning/gankmm/ui/activity/mob/CookMenuActivity.java
+++ b/app/src/main/java/com/maning/gankmm/ui/activity/tools/CookMenuActivity.java
@@ -1,4 +1,4 @@
-package com.maning.gankmm.ui.activity.mob;
+package com.maning.gankmm.ui.activity.tools;
import android.content.Intent;
import android.os.Bundle;
diff --git a/app/src/main/java/com/maning/gankmm/ui/activity/mob/DictionaryActivity.java b/app/src/main/java/com/maning/gankmm/ui/activity/tools/DictionaryActivity.java
similarity index 71%
rename from app/src/main/java/com/maning/gankmm/ui/activity/mob/DictionaryActivity.java
rename to app/src/main/java/com/maning/gankmm/ui/activity/tools/DictionaryActivity.java
index e2a4606..e4cf991 100644
--- a/app/src/main/java/com/maning/gankmm/ui/activity/mob/DictionaryActivity.java
+++ b/app/src/main/java/com/maning/gankmm/ui/activity/tools/DictionaryActivity.java
@@ -1,4 +1,4 @@
-package com.maning.gankmm.ui.activity.mob;
+package com.maning.gankmm.ui.activity.tools;
import android.os.Bundle;
import android.support.v7.widget.DefaultItemAnimator;
@@ -9,10 +9,10 @@
import android.view.MenuItem;
import com.maning.gankmm.R;
-import com.maning.gankmm.bean.mob.MobDictEntity;
import com.maning.gankmm.bean.mob.MobItemEntity;
-import com.maning.gankmm.http.mob.MobApi;
-import com.maning.gankmm.http.callback.MyCallBack;
+import com.maning.gankmm.bean.rolltools.DictionaryResultBean;
+import com.maning.gankmm.http.callback.CommonHttpCallback;
+import com.maning.gankmm.http.rolltools.RolltoolsApi;
import com.maning.gankmm.skin.SkinManager;
import com.maning.gankmm.ui.adapter.RecycleMobQueryAdapter;
import com.maning.gankmm.ui.base.BaseActivity;
@@ -21,7 +21,6 @@
import com.maning.gankmm.utils.MySnackbar;
import java.util.HashMap;
-import java.util.List;
import butterknife.Bind;
import butterknife.ButterKnife;
@@ -92,39 +91,31 @@ public void btnQuery() {
}
showProgressDialog("正在查询...");
- MobApi.queryDict(content, 0x001, new MyCallBack() {
+ RolltoolsApi.convertDictionary(content, new CommonHttpCallback() {
@Override
- public void onSuccess(int what, Object object) {
+ public void onSuccess(DictionaryResultBean result) {
dissmissProgressDialog();
- if (object != null) {
- MobDictEntity result = (MobDictEntity) object;
- initAdapter(result);
- }
+ DictionaryResultBean.DataEntity dataEntity = result.getData().get(0);
+ initAdapter(dataEntity);
}
@Override
- public void onSuccessList(int what, List results) {
-
- }
-
- @Override
- public void onFail(int what, String result) {
+ public void onFail(int code, String message) {
dissmissProgressDialog();
- MySnackbar.makeSnackBarRed(toolbar, result);
+ MySnackbar.makeSnackBarRed(toolbar, message);
}
});
}
- private void initAdapter(MobDictEntity result) {
-
+ private void initAdapter(DictionaryResultBean.DataEntity dataEntity) {
HashMap mDatas = new HashMap<>();
- mDatas.put("0", new MobItemEntity("拼音:", result.getPinyin()));
- mDatas.put("1", new MobItemEntity("简介:", result.getBrief()));
- mDatas.put("2", new MobItemEntity("明细:", result.getDetail()));
- mDatas.put("3", new MobItemEntity("部首:", result.getBushou()));
- mDatas.put("4", new MobItemEntity("笔画数:", String.valueOf(result.getBihua())));
- mDatas.put("5", new MobItemEntity("五笔:", result.getWubi()));
+ mDatas.put("0", new MobItemEntity("原内容:", dataEntity.getWord()));
+ mDatas.put("1", new MobItemEntity("繁体:", dataEntity.getTraditional()));
+ mDatas.put("2", new MobItemEntity("拼音:", dataEntity.getPinyin()));
+ mDatas.put("3", new MobItemEntity("偏旁部首:", dataEntity.getRadicals()));
+ mDatas.put("4", new MobItemEntity("汉字释义:", dataEntity.getExplanation()));
+ mDatas.put("5", new MobItemEntity("汉字笔画数:", String.valueOf(dataEntity.getStrokes())));
if (recycleMobQueryAdapter == null) {
recycleMobQueryAdapter = new RecycleMobQueryAdapter(this, mDatas);
diff --git a/app/src/main/java/com/maning/gankmm/ui/activity/mob/FlightActivity.java b/app/src/main/java/com/maning/gankmm/ui/activity/tools/FlightActivity.java
similarity index 99%
rename from app/src/main/java/com/maning/gankmm/ui/activity/mob/FlightActivity.java
rename to app/src/main/java/com/maning/gankmm/ui/activity/tools/FlightActivity.java
index 0f80c83..b71ce95 100644
--- a/app/src/main/java/com/maning/gankmm/ui/activity/mob/FlightActivity.java
+++ b/app/src/main/java/com/maning/gankmm/ui/activity/tools/FlightActivity.java
@@ -1,4 +1,4 @@
-package com.maning.gankmm.ui.activity.mob;
+package com.maning.gankmm.ui.activity.tools;
import android.content.Intent;
import android.os.Bundle;
diff --git a/app/src/main/java/com/maning/gankmm/ui/activity/mob/FlightListActivity.java b/app/src/main/java/com/maning/gankmm/ui/activity/tools/FlightListActivity.java
similarity index 99%
rename from app/src/main/java/com/maning/gankmm/ui/activity/mob/FlightListActivity.java
rename to app/src/main/java/com/maning/gankmm/ui/activity/tools/FlightListActivity.java
index 24c7f1a..42f62bb 100644
--- a/app/src/main/java/com/maning/gankmm/ui/activity/mob/FlightListActivity.java
+++ b/app/src/main/java/com/maning/gankmm/ui/activity/tools/FlightListActivity.java
@@ -1,4 +1,4 @@
-package com.maning.gankmm.ui.activity.mob;
+package com.maning.gankmm.ui.activity.tools;
import android.graphics.Color;
import android.os.Bundle;
diff --git a/app/src/main/java/com/maning/gankmm/ui/activity/mob/HistoryTodayActivity.java b/app/src/main/java/com/maning/gankmm/ui/activity/tools/HistoryTodayActivity.java
similarity index 97%
rename from app/src/main/java/com/maning/gankmm/ui/activity/mob/HistoryTodayActivity.java
rename to app/src/main/java/com/maning/gankmm/ui/activity/tools/HistoryTodayActivity.java
index 5131ad2..32f32ed 100644
--- a/app/src/main/java/com/maning/gankmm/ui/activity/mob/HistoryTodayActivity.java
+++ b/app/src/main/java/com/maning/gankmm/ui/activity/tools/HistoryTodayActivity.java
@@ -1,4 +1,4 @@
-package com.maning.gankmm.ui.activity.mob;
+package com.maning.gankmm.ui.activity.tools;
import android.graphics.Color;
import android.os.Bundle;
@@ -18,9 +18,7 @@
import com.maning.gankmm.utils.MySnackbar;
import com.yqritc.recyclerviewflexibledivider.HorizontalDividerItemDecoration;
-import java.text.SimpleDateFormat;
import java.util.ArrayList;
-import java.util.Date;
import butterknife.Bind;
import butterknife.ButterKnife;
diff --git a/app/src/main/java/com/maning/gankmm/ui/activity/mob/IDCardQueryActivity.java b/app/src/main/java/com/maning/gankmm/ui/activity/tools/IDCardQueryActivity.java
similarity index 98%
rename from app/src/main/java/com/maning/gankmm/ui/activity/mob/IDCardQueryActivity.java
rename to app/src/main/java/com/maning/gankmm/ui/activity/tools/IDCardQueryActivity.java
index 3a4cc24..b3c1e3e 100644
--- a/app/src/main/java/com/maning/gankmm/ui/activity/mob/IDCardQueryActivity.java
+++ b/app/src/main/java/com/maning/gankmm/ui/activity/tools/IDCardQueryActivity.java
@@ -1,4 +1,4 @@
-package com.maning.gankmm.ui.activity.mob;
+package com.maning.gankmm.ui.activity.tools;
import android.os.Bundle;
import android.support.v7.widget.DefaultItemAnimator;
diff --git a/app/src/main/java/com/maning/gankmm/ui/activity/mob/IPQueryActivity.java b/app/src/main/java/com/maning/gankmm/ui/activity/tools/IPQueryActivity.java
similarity index 98%
rename from app/src/main/java/com/maning/gankmm/ui/activity/mob/IPQueryActivity.java
rename to app/src/main/java/com/maning/gankmm/ui/activity/tools/IPQueryActivity.java
index 6e1534f..9dd0511 100644
--- a/app/src/main/java/com/maning/gankmm/ui/activity/mob/IPQueryActivity.java
+++ b/app/src/main/java/com/maning/gankmm/ui/activity/tools/IPQueryActivity.java
@@ -1,4 +1,4 @@
-package com.maning.gankmm.ui.activity.mob;
+package com.maning.gankmm.ui.activity.tools;
import android.os.Bundle;
import android.support.v7.widget.DefaultItemAnimator;
diff --git a/app/src/main/java/com/maning/gankmm/ui/activity/mob/IdiomActivity.java b/app/src/main/java/com/maning/gankmm/ui/activity/tools/IdiomActivity.java
similarity index 98%
rename from app/src/main/java/com/maning/gankmm/ui/activity/mob/IdiomActivity.java
rename to app/src/main/java/com/maning/gankmm/ui/activity/tools/IdiomActivity.java
index 766522d..c59c0ce 100644
--- a/app/src/main/java/com/maning/gankmm/ui/activity/mob/IdiomActivity.java
+++ b/app/src/main/java/com/maning/gankmm/ui/activity/tools/IdiomActivity.java
@@ -1,4 +1,4 @@
-package com.maning.gankmm.ui.activity.mob;
+package com.maning.gankmm.ui.activity.tools;
import android.os.Bundle;
import android.support.v7.widget.DefaultItemAnimator;
diff --git a/app/src/main/java/com/maning/gankmm/ui/activity/mob/LotteryCategoryActivity.java b/app/src/main/java/com/maning/gankmm/ui/activity/tools/LotteryCategoryActivity.java
similarity index 98%
rename from app/src/main/java/com/maning/gankmm/ui/activity/mob/LotteryCategoryActivity.java
rename to app/src/main/java/com/maning/gankmm/ui/activity/tools/LotteryCategoryActivity.java
index c4b9447..b6189a9 100644
--- a/app/src/main/java/com/maning/gankmm/ui/activity/mob/LotteryCategoryActivity.java
+++ b/app/src/main/java/com/maning/gankmm/ui/activity/tools/LotteryCategoryActivity.java
@@ -1,4 +1,4 @@
-package com.maning.gankmm.ui.activity.mob;
+package com.maning.gankmm.ui.activity.tools;
import android.content.Intent;
import android.os.Bundle;
diff --git a/app/src/main/java/com/maning/gankmm/ui/activity/mob/LotteryDetailActivity.java b/app/src/main/java/com/maning/gankmm/ui/activity/tools/LotteryDetailActivity.java
similarity index 99%
rename from app/src/main/java/com/maning/gankmm/ui/activity/mob/LotteryDetailActivity.java
rename to app/src/main/java/com/maning/gankmm/ui/activity/tools/LotteryDetailActivity.java
index e45b03e..6022578 100644
--- a/app/src/main/java/com/maning/gankmm/ui/activity/mob/LotteryDetailActivity.java
+++ b/app/src/main/java/com/maning/gankmm/ui/activity/tools/LotteryDetailActivity.java
@@ -1,4 +1,4 @@
-package com.maning.gankmm.ui.activity.mob;
+package com.maning.gankmm.ui.activity.tools;
import android.os.Bundle;
import android.support.v7.widget.DefaultItemAnimator;
diff --git a/app/src/main/java/com/maning/gankmm/ui/activity/mob/OilPriceActivity.java b/app/src/main/java/com/maning/gankmm/ui/activity/tools/OilPriceActivity.java
similarity index 98%
rename from app/src/main/java/com/maning/gankmm/ui/activity/mob/OilPriceActivity.java
rename to app/src/main/java/com/maning/gankmm/ui/activity/tools/OilPriceActivity.java
index f780a47..1d60ad3 100644
--- a/app/src/main/java/com/maning/gankmm/ui/activity/mob/OilPriceActivity.java
+++ b/app/src/main/java/com/maning/gankmm/ui/activity/tools/OilPriceActivity.java
@@ -1,4 +1,4 @@
-package com.maning.gankmm.ui.activity.mob;
+package com.maning.gankmm.ui.activity.tools;
import android.annotation.SuppressLint;
import android.os.Bundle;
diff --git a/app/src/main/java/com/maning/gankmm/ui/activity/mob/PhoneAddressActivity.java b/app/src/main/java/com/maning/gankmm/ui/activity/tools/PhoneAddressActivity.java
similarity index 99%
rename from app/src/main/java/com/maning/gankmm/ui/activity/mob/PhoneAddressActivity.java
rename to app/src/main/java/com/maning/gankmm/ui/activity/tools/PhoneAddressActivity.java
index 8428c40..6ffc9e6 100644
--- a/app/src/main/java/com/maning/gankmm/ui/activity/mob/PhoneAddressActivity.java
+++ b/app/src/main/java/com/maning/gankmm/ui/activity/tools/PhoneAddressActivity.java
@@ -1,4 +1,4 @@
-package com.maning.gankmm.ui.activity.mob;
+package com.maning.gankmm.ui.activity.tools;
import android.os.Bundle;
import android.support.v7.widget.DefaultItemAnimator;
diff --git a/app/src/main/java/com/maning/gankmm/ui/activity/mob/PostCodeActivity.java b/app/src/main/java/com/maning/gankmm/ui/activity/tools/PostCodeActivity.java
similarity index 98%
rename from app/src/main/java/com/maning/gankmm/ui/activity/mob/PostCodeActivity.java
rename to app/src/main/java/com/maning/gankmm/ui/activity/tools/PostCodeActivity.java
index 9db60e4..f563b9b 100644
--- a/app/src/main/java/com/maning/gankmm/ui/activity/mob/PostCodeActivity.java
+++ b/app/src/main/java/com/maning/gankmm/ui/activity/tools/PostCodeActivity.java
@@ -1,4 +1,4 @@
-package com.maning.gankmm.ui.activity.mob;
+package com.maning.gankmm.ui.activity.tools;
import android.os.Bundle;
import android.support.v7.widget.DefaultItemAnimator;
diff --git a/app/src/main/java/com/maning/gankmm/ui/activity/tools/RubbishActivity.java b/app/src/main/java/com/maning/gankmm/ui/activity/tools/RubbishActivity.java
new file mode 100644
index 0000000..81860fe
--- /dev/null
+++ b/app/src/main/java/com/maning/gankmm/ui/activity/tools/RubbishActivity.java
@@ -0,0 +1,140 @@
+package com.maning.gankmm.ui.activity.tools;
+
+import android.graphics.Color;
+import android.os.Bundle;
+import android.support.v7.widget.DefaultItemAnimator;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.support.v7.widget.Toolbar;
+import android.text.TextUtils;
+import android.view.MenuItem;
+
+import com.maning.gankmm.R;
+import com.maning.gankmm.bean.rolltools.RubbishTypeResultBean;
+import com.maning.gankmm.http.callback.CommonHttpCallback;
+import com.maning.gankmm.http.rolltools.RolltoolsApi;
+import com.maning.gankmm.skin.SkinManager;
+import com.maning.gankmm.ui.adapter.RecycleRubbishAdapter;
+import com.maning.gankmm.ui.base.BaseActivity;
+import com.maning.gankmm.ui.view.MClearEditText;
+import com.maning.gankmm.utils.KeyboardUtils;
+import com.maning.gankmm.utils.MySnackbar;
+import com.yqritc.recyclerviewflexibledivider.HorizontalDividerItemDecoration;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import butterknife.Bind;
+import butterknife.ButterKnife;
+import butterknife.OnClick;
+
+/**
+ * 垃圾分类
+ */
+public class RubbishActivity extends BaseActivity {
+
+ @Bind(R.id.toolbar)
+ Toolbar toolbar;
+ @Bind(R.id.editText)
+ MClearEditText editText;
+ @Bind(R.id.swipe_target)
+ RecyclerView recyclerView;
+
+
+ private ArrayList mDatas = new ArrayList<>();
+ private RecycleRubbishAdapter recycleRubbishAdapter;
+ private String keyWord;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_rubbish);
+ ButterKnife.bind(this);
+
+
+ initMyToolBar();
+
+ initRecyclerView();
+
+ }
+
+ private void initRecyclerView() {
+ LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false);
+ recyclerView.setLayoutManager(linearLayoutManager);
+ recyclerView.setItemAnimator(new DefaultItemAnimator());
+ recyclerView.addItemDecoration(new HorizontalDividerItemDecoration.Builder(this).color(Color.LTGRAY).build());
+ recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
+ @Override
+ public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
+ if (Math.abs(dy) > 20) {
+ KeyboardUtils.hideSoftInput(RubbishActivity.this);
+ }
+ super.onScrolled(recyclerView, dx, dy);
+ }
+ });
+ }
+
+ private void initMyToolBar() {
+ int currentSkinType = SkinManager.getCurrentSkinType(this);
+ if (SkinManager.THEME_DAY == currentSkinType) {
+ initToolBar(toolbar, "垃圾分类", R.drawable.gank_ic_back_white);
+ } else {
+ initToolBar(toolbar, "垃圾分类", R.drawable.gank_ic_back_night);
+ }
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ switch (item.getItemId()) {
+ case android.R.id.home:
+ this.finish();
+ return true;
+ }
+ return super.onOptionsItemSelected(item);
+ }
+
+
+ @OnClick(R.id.btn_query)
+ public void btnQuery() {
+ showProgressDialog("查询中...");
+ //获取关键字
+ keyWord = editText.getText().toString();
+ if (TextUtils.isEmpty(keyWord)) {
+ MySnackbar.makeSnackBarBlack(toolbar, "查询内容不能为空");
+ dissmissProgressDialog();
+ return;
+ }
+ KeyboardUtils.hideSoftInput(this);
+ //查询
+ showProgressDialog("查询中...");
+ RolltoolsApi.getRubbishType(keyWord, new CommonHttpCallback() {
+ @Override
+ public void onSuccess(RubbishTypeResultBean result) {
+ dissmissProgressDialog();
+ RubbishTypeResultBean.DataEntity data = result.getData();
+ RubbishTypeResultBean.DataEntity.AimEntity aimEntity = data.getAim();
+ List recommendList = data.getRecommendList();
+ mDatas = new ArrayList<>();
+ mDatas.add(aimEntity);
+ mDatas.addAll(recommendList);
+ initAdapter();
+ }
+
+ @Override
+ public void onFail(int code, String message) {
+ dissmissProgressDialog();
+ MySnackbar.makeSnackBarRed(toolbar, message);
+ }
+ });
+ }
+
+ private void initAdapter() {
+ if (recycleRubbishAdapter == null) {
+ recycleRubbishAdapter = new RecycleRubbishAdapter(this, mDatas);
+ recyclerView.setAdapter(recycleRubbishAdapter);
+ } else {
+ recycleRubbishAdapter.upddateDatas(mDatas);
+ }
+ }
+}
+
diff --git a/app/src/main/java/com/maning/gankmm/ui/activity/mob/TrainActivity.java b/app/src/main/java/com/maning/gankmm/ui/activity/tools/TrainActivity.java
similarity index 99%
rename from app/src/main/java/com/maning/gankmm/ui/activity/mob/TrainActivity.java
rename to app/src/main/java/com/maning/gankmm/ui/activity/tools/TrainActivity.java
index 82576e5..30a87b6 100644
--- a/app/src/main/java/com/maning/gankmm/ui/activity/mob/TrainActivity.java
+++ b/app/src/main/java/com/maning/gankmm/ui/activity/tools/TrainActivity.java
@@ -1,4 +1,4 @@
-package com.maning.gankmm.ui.activity.mob;
+package com.maning.gankmm.ui.activity.tools;
import android.content.Intent;
import android.os.Bundle;
diff --git a/app/src/main/java/com/maning/gankmm/ui/activity/mob/TrainListActivity.java b/app/src/main/java/com/maning/gankmm/ui/activity/tools/TrainListActivity.java
similarity index 99%
rename from app/src/main/java/com/maning/gankmm/ui/activity/mob/TrainListActivity.java
rename to app/src/main/java/com/maning/gankmm/ui/activity/tools/TrainListActivity.java
index 7a4c21e..c839e58 100644
--- a/app/src/main/java/com/maning/gankmm/ui/activity/mob/TrainListActivity.java
+++ b/app/src/main/java/com/maning/gankmm/ui/activity/tools/TrainListActivity.java
@@ -1,4 +1,4 @@
-package com.maning.gankmm.ui.activity.mob;
+package com.maning.gankmm.ui.activity.tools;
import android.graphics.Color;
import android.os.Bundle;
diff --git a/app/src/main/java/com/maning/gankmm/ui/activity/mob/WXArticleActivity.java b/app/src/main/java/com/maning/gankmm/ui/activity/tools/WXArticleActivity.java
similarity index 99%
rename from app/src/main/java/com/maning/gankmm/ui/activity/mob/WXArticleActivity.java
rename to app/src/main/java/com/maning/gankmm/ui/activity/tools/WXArticleActivity.java
index 36c9de0..eec7952 100644
--- a/app/src/main/java/com/maning/gankmm/ui/activity/mob/WXArticleActivity.java
+++ b/app/src/main/java/com/maning/gankmm/ui/activity/tools/WXArticleActivity.java
@@ -1,4 +1,4 @@
-package com.maning.gankmm.ui.activity.mob;
+package com.maning.gankmm.ui.activity.tools;
import android.graphics.Color;
import android.os.Bundle;
diff --git a/app/src/main/java/com/maning/gankmm/ui/adapter/RecycleMobQueryAdapter.java b/app/src/main/java/com/maning/gankmm/ui/adapter/RecycleMobQueryAdapter.java
index 66004ea..38807cc 100644
--- a/app/src/main/java/com/maning/gankmm/ui/adapter/RecycleMobQueryAdapter.java
+++ b/app/src/main/java/com/maning/gankmm/ui/adapter/RecycleMobQueryAdapter.java
@@ -1,9 +1,6 @@
package com.maning.gankmm.ui.adapter;
import android.content.Context;
-import android.content.Intent;
-import android.support.v7.widget.DefaultItemAnimator;
-import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
@@ -12,13 +9,8 @@
import com.maning.gankmm.R;
import com.maning.gankmm.bean.mob.MobItemEntity;
-import com.maning.gankmm.listeners.OnItemClickListener;
-import com.maning.gankmm.ui.activity.mob.PhoneAddressActivity;
-import com.maning.gankmm.utils.MyToast;
-import java.util.ArrayList;
import java.util.HashMap;
-import java.util.List;
import butterknife.Bind;
import butterknife.ButterKnife;
diff --git a/app/src/main/java/com/maning/gankmm/ui/adapter/RecycleMoreAdapter.java b/app/src/main/java/com/maning/gankmm/ui/adapter/RecycleMoreAdapter.java
index f79f062..f46886e 100644
--- a/app/src/main/java/com/maning/gankmm/ui/adapter/RecycleMoreAdapter.java
+++ b/app/src/main/java/com/maning/gankmm/ui/adapter/RecycleMoreAdapter.java
@@ -12,23 +12,23 @@
import com.maning.gankmm.R;
import com.maning.gankmm.listeners.OnItemClickListener;
-import com.maning.gankmm.ui.activity.mob.BankCardActivity;
-import com.maning.gankmm.ui.activity.mob.CarListActivity;
-import com.maning.gankmm.ui.activity.mob.ChineseCalendarActivity;
-import com.maning.gankmm.ui.activity.mob.CookMenuActivity;
-import com.maning.gankmm.ui.activity.mob.DictionaryActivity;
-import com.maning.gankmm.ui.activity.mob.FlightActivity;
-import com.maning.gankmm.ui.activity.mob.HealthActivity;
-import com.maning.gankmm.ui.activity.mob.HistoryTodayActivity;
-import com.maning.gankmm.ui.activity.mob.IDCardQueryActivity;
-import com.maning.gankmm.ui.activity.mob.IPQueryActivity;
-import com.maning.gankmm.ui.activity.mob.IdiomActivity;
-import com.maning.gankmm.ui.activity.mob.LotteryCategoryActivity;
-import com.maning.gankmm.ui.activity.mob.OilPriceActivity;
-import com.maning.gankmm.ui.activity.mob.PhoneAddressActivity;
-import com.maning.gankmm.ui.activity.mob.PostCodeActivity;
-import com.maning.gankmm.ui.activity.mob.TrainActivity;
-import com.maning.gankmm.ui.activity.mob.WXArticleActivity;
+import com.maning.gankmm.ui.activity.tools.BankCardActivity;
+import com.maning.gankmm.ui.activity.tools.CarListActivity;
+import com.maning.gankmm.ui.activity.tools.ChineseCalendarActivity;
+import com.maning.gankmm.ui.activity.tools.CookMenuActivity;
+import com.maning.gankmm.ui.activity.tools.DictionaryActivity;
+import com.maning.gankmm.ui.activity.tools.FlightActivity;
+import com.maning.gankmm.ui.activity.tools.RubbishActivity;
+import com.maning.gankmm.ui.activity.tools.HistoryTodayActivity;
+import com.maning.gankmm.ui.activity.tools.IDCardQueryActivity;
+import com.maning.gankmm.ui.activity.tools.IPQueryActivity;
+import com.maning.gankmm.ui.activity.tools.IdiomActivity;
+import com.maning.gankmm.ui.activity.tools.LotteryCategoryActivity;
+import com.maning.gankmm.ui.activity.tools.OilPriceActivity;
+import com.maning.gankmm.ui.activity.tools.PhoneAddressActivity;
+import com.maning.gankmm.ui.activity.tools.PostCodeActivity;
+import com.maning.gankmm.ui.activity.tools.TrainActivity;
+import com.maning.gankmm.ui.activity.tools.WXArticleActivity;
import com.maning.gankmm.utils.IntentUtils;
import com.maning.gankmm.utils.MySnackbar;
@@ -80,7 +80,7 @@ public void onBindViewHolder(final RecyclerView.ViewHolder viewHolder, final int
mDatasItem.add("中国彩票开奖结果");
mDatasItem.add("微信精选");
} else if (position == 1) {
- mDatasItem.add("银行卡信息");
+// mDatasItem.add("银行卡信息");
mDatasItem.add("货币汇率");
// mDatasItem.add("黄金数据");
// mDatasItem.add("白银数据");
@@ -91,18 +91,17 @@ public void onBindViewHolder(final RecyclerView.ViewHolder viewHolder, final int
mDatasItem.add("婚姻匹配");
mDatasItem.add("八字算命");
mDatasItem.add("老黄历");
- mDatasItem.add("电影票房");
- mDatasItem.add("足球五大联赛");
- mDatasItem.add("火车票查询");
- mDatasItem.add("航班信息查询");
+// mDatasItem.add("电影票房");
+// mDatasItem.add("足球五大联赛");
+// mDatasItem.add("火车票查询");
+// mDatasItem.add("航班信息查询");
} else if (position == 3) {
- mDatasItem.add("健康知识");
+ mDatasItem.add("垃圾分类");
mDatasItem.add("历史上的今天");
- mDatasItem.add("成语大全");
mDatasItem.add("新华字典");
- mDatasItem.add("全国省市今日油价");
- mDatasItem.add("汽车信息查询");
- mDatasItem.add("驾考题库");
+// mDatasItem.add("全国省市今日油价");
+// mDatasItem.add("汽车信息查询");
+// mDatasItem.add("驾考题库");
}
final ArrayList mDatasTitle = mDatasItem;
@@ -160,8 +159,8 @@ public void onItemClick(View view, int position) {
MySnackbar.makeSnackBarGreen(myViewHolder.recyclerViewItem, "功能暂未开通,敬请期待");
}
- if (title.equals("健康知识")) {
- context.startActivity(new Intent(context, HealthActivity.class));
+ if (title.equals("垃圾分类")) {
+ context.startActivity(new Intent(context, RubbishActivity.class));
} else if (title.equals("历史上的今天")) {
context.startActivity(new Intent(context, HistoryTodayActivity.class));
} else if (title.equals("成语大全")) {
diff --git a/app/src/main/java/com/maning/gankmm/ui/adapter/RecycleMoreItemAdapter.java b/app/src/main/java/com/maning/gankmm/ui/adapter/RecycleMoreItemAdapter.java
index ce9365a..4928a12 100644
--- a/app/src/main/java/com/maning/gankmm/ui/adapter/RecycleMoreItemAdapter.java
+++ b/app/src/main/java/com/maning/gankmm/ui/adapter/RecycleMoreItemAdapter.java
@@ -120,6 +120,8 @@ public void onClick(View view) {
myViewHolder.iv_more_item.setImageResource(R.drawable.gank_icon_tools_car);
} else if (title.equals("驾考题库")) {
myViewHolder.iv_more_item.setImageResource(R.drawable.gank_icon_tools_tiku_car);
+ }else if (title.equals("垃圾分类")) {
+ myViewHolder.iv_more_item.setImageResource(R.drawable.gank_icon_tools_rubbish);
}
}
diff --git a/app/src/main/java/com/maning/gankmm/ui/adapter/RecycleHealthAdapter.java b/app/src/main/java/com/maning/gankmm/ui/adapter/RecycleRubbishAdapter.java
similarity index 63%
rename from app/src/main/java/com/maning/gankmm/ui/adapter/RecycleHealthAdapter.java
rename to app/src/main/java/com/maning/gankmm/ui/adapter/RecycleRubbishAdapter.java
index b2f4516..a3134d7 100644
--- a/app/src/main/java/com/maning/gankmm/ui/adapter/RecycleHealthAdapter.java
+++ b/app/src/main/java/com/maning/gankmm/ui/adapter/RecycleRubbishAdapter.java
@@ -7,9 +7,8 @@
import android.view.ViewGroup;
import android.widget.TextView;
-import com.ctetin.expandabletextviewlibrary.ExpandableTextView;
import com.maning.gankmm.R;
-import com.maning.gankmm.bean.mob.MobHealthEntity;
+import com.maning.gankmm.bean.rolltools.RubbishTypeResultBean;
import java.util.ArrayList;
@@ -17,21 +16,21 @@
import butterknife.ButterKnife;
/**
- * 健康知识
+ * 垃圾分类
*/
-public class RecycleHealthAdapter extends RecyclerView.Adapter {
+public class RecycleRubbishAdapter extends RecyclerView.Adapter {
private Context context;
- private ArrayList mDatas;
+ private ArrayList mDatas;
private LayoutInflater layoutInflater;
- public RecycleHealthAdapter(Context context, ArrayList mDatas) {
+ public RecycleRubbishAdapter(Context context, ArrayList mDatas) {
this.context = context;
this.mDatas = mDatas;
layoutInflater = LayoutInflater.from(this.context);
}
- public void upddateDatas(ArrayList mDatas) {
+ public void upddateDatas(ArrayList mDatas) {
this.mDatas = mDatas;
notifyDataSetChanged();
}
@@ -47,11 +46,10 @@ public void onBindViewHolder(final RecyclerView.ViewHolder viewHolder, final int
if (viewHolder instanceof MyViewHolder) {
MyViewHolder myViewHolder = (MyViewHolder) viewHolder;
- MobHealthEntity.ListBean mobHealth = mDatas.get(position);
+ RubbishTypeResultBean.DataEntity.AimEntity aimEntity = mDatas.get(position);
- myViewHolder.tv_title.setText(mobHealth.getTitle());
-
- myViewHolder.expand_text_view.setContent(mobHealth.getContent());
+ myViewHolder.tv_name.setText(aimEntity.getGoodsName());
+ myViewHolder.tv_type.setText(aimEntity.getGoodsType());
}
}
@@ -62,10 +60,10 @@ public int getItemCount() {
class MyViewHolder extends RecyclerView.ViewHolder {
- @Bind(R.id.tv_title)
- TextView tv_title;
- @Bind(R.id.expand_text_view)
- ExpandableTextView expand_text_view;
+ @Bind(R.id.tv_name)
+ TextView tv_name;
+ @Bind(R.id.tv_type)
+ TextView tv_type;
public MyViewHolder(View itemView) {
super(itemView);
diff --git a/app/src/main/java/com/maning/gankmm/ui/adapter/RecycleTrainAdapter.java b/app/src/main/java/com/maning/gankmm/ui/adapter/RecycleTrainAdapter.java
index 2e89f89..c6cb5b1 100644
--- a/app/src/main/java/com/maning/gankmm/ui/adapter/RecycleTrainAdapter.java
+++ b/app/src/main/java/com/maning/gankmm/ui/adapter/RecycleTrainAdapter.java
@@ -1,7 +1,6 @@
package com.maning.gankmm.ui.adapter;
import android.content.Context;
-import android.graphics.Color;
import android.support.v7.widget.DefaultItemAnimator;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
@@ -10,18 +9,14 @@
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
-import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
-import com.bumptech.glide.Glide;
import com.maning.gankmm.R;
import com.maning.gankmm.bean.mob.MobTrainEntity;
import com.maning.gankmm.bean.mob.MobTrainNoEntity;
-import com.maning.gankmm.bean.mob.MobWxArticleListEntity;
import com.maning.gankmm.listeners.OnItemClickListener;
-import com.maning.gankmm.ui.activity.mob.TrainListActivity;
-import com.yqritc.recyclerviewflexibledivider.HorizontalDividerItemDecoration;
+import com.maning.gankmm.ui.activity.tools.TrainListActivity;
import java.util.ArrayList;
diff --git a/app/src/main/java/com/maning/gankmm/ui/adapter/RecycleTrainDetailsAdapter.java b/app/src/main/java/com/maning/gankmm/ui/adapter/RecycleTrainDetailsAdapter.java
index bf7f089..988816a 100644
--- a/app/src/main/java/com/maning/gankmm/ui/adapter/RecycleTrainDetailsAdapter.java
+++ b/app/src/main/java/com/maning/gankmm/ui/adapter/RecycleTrainDetailsAdapter.java
@@ -1,25 +1,14 @@
package com.maning.gankmm.ui.adapter;
import android.content.Context;
-import android.graphics.Color;
-import android.support.v7.widget.DefaultItemAnimator;
-import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
-import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-import android.widget.RelativeLayout;
import android.widget.TextView;
import com.maning.gankmm.R;
-import com.maning.gankmm.bean.mob.MobTrainEntity;
import com.maning.gankmm.bean.mob.MobTrainNoEntity;
-import com.maning.gankmm.listeners.OnItemClickListener;
-import com.maning.gankmm.ui.activity.mob.TrainListActivity;
-import com.yqritc.recyclerviewflexibledivider.HorizontalDividerItemDecoration;
import java.util.ArrayList;
diff --git a/app/src/main/res/drawable-xxhdpi/gank_icon_tools_rubbish.png b/app/src/main/res/drawable-xxhdpi/gank_icon_tools_rubbish.png
new file mode 100644
index 0000000000000000000000000000000000000000..190abb8903724b66f2775ceed640987e9b60b820
GIT binary patch
literal 3064
zcmVd^n_EuB0O;I2TfFKD4(9s4#p!>1WXfyx>|8rUb=ydOW=fMNuI0PO5
z4}jwmaJ>880(b!2lR*36KdV5k=PQ7#gtQ8Pt3Wg!^}4&RNyAAC(D^jj1BCYr%0@gK
zZNJ=d2?93(=nwt`fHk3_9fQC*0RDb3SPu!lO_y`uaNk0jbst84z^(=NAAxgIM@26$DlR
z@a)sKO+x&vtR#T5QLnqk)??+-^p~sN%cFE1k!5*wd#zD7q#=-K=h8r64FK&=-_`;|
z9-no8Y<45he$?yE^($6BJAPu%U*?UmC5Y>~knkgx0s?CQ$QV;)RI^Yf4ZySh`5OZI
zU8}OWhv*0Z|EU0y^$=JCKq(WQ(rg+4{`b@V;0pq*YeH~_MEe-vuy6{wWIlm40I=K)
zS%J$@uRG_QWk&wwX*dlhtqu6w_f^ed%34cc7XVoyT6slrg2UIVUibb>mkRvI)juYH
z(-Kz1N(ih1K*GB&Ru#dA(Yx;6UBR5`T5(=a8T$kyI8)e4fr1fIF
z`(kXWyVV2GADj@tY_-h)N=pEVwu%VwoX-MuZ+M?6v>^Q68Sj4mVvF&h{o`E{=&ZnyYMc;{f;=!Mu8%1E6S3
ztdf2k>-GTHsFfPqHr*fze(17M?8YHCw@Q%fDMZQKboxhJp=fmQhqCjnrAY8~8A
zr6wAx+XK*$;B9%W2f!9hG}I0cKtqDJ=Cz3b9&Nwm?Q^yL8g~L?AArNX8B4;o$)foe
zHL&<)1pq!6;PG@1h?GwtH`*MD%G?E@KVU_Dl#r2h
zk#N#_n%qVeXCCp1Vb<L7ov)W|4ftsI$Vl?J!?pMg
z&H@l$=ERpURQ4;f26GEisgNw6asog*Rqt$e768_Ig=t}zfOrfcje`JAvNm2OkFv>{
zj>WzTAJAmncW5FR#2P2C3IJH30JtxEv}$UHQnmvb-97YuUvOhsDeL6{(7Dk|Eb>bP
z+>urMT@|S<+w3>&O!52ItiAc2gY$ip!6grX834}0No!s89G$$`00Ep3(XQxdwxXTB
zDki}LQ2r#bT;;R34~S33z3$hfVx(^qMc5l{cR!?++UXCBq_a5>K*_W);R#yzw~!KU
zMwdMZ5-ya!V!tEHwa@1F!S9J%J{BO+Ql0>!
zrw4;$B>1J2G8)JRvT7Ef3xLRU#){>80`CuE5M|pa-z6MtIDLwTk<(B;0DAWdq`!XA
zm@a~(+`$x!=DO1#@FfmUw5@>a0BBCD7ViiY-0Gb^ZA{_%*DQUGN4@UTJ=%ciEJRNoIn!*mW{S6)q6MU)IEM#71AufEZIO^w;F>F2Fhz^M@Xf5toMH#^&%F0Hkqly$6R0x;
zBojYngscq!0O+P{cRqdl4G`G}$h|w!c>uH(h&a0)oT%c36dZ<=m7isonmHzc)cTB&
zxEmpdK<5Eq*;JSoR_5cse>NFU$g5EHt54S90jL>(*))x(Xi;21C5E57-vALm%6|18
zfYfJXzyjPL(GCU=*UZS=zM&Y$ABRL6=?tOH!Qed*@K~?&J4;V1bt=($#+p#Di6KDu
ziW!a5N>4+gEruX=UU^@mbc8XjsHU=kteOSH0F+u%)g4DQXCOKsobVYBKrEKB^LQNq
zOnkv*N$>#F1b~s$t+Lt{JnsRh34l0XfWyTqUjI!95wND0&xt%|WmU
zM7;Yqxm0@wh$kU@-xn|HoWCI;PB=C9^8n0bsgo0s7fgvQ%9C)?+K>(5=4mw^0(iwT
zH?FTth6kWh0A2&&FhJUp2?}K?FAneW&S3LD4?xub-0N&VoU}fuSOcCWP6^)Ygm)E4
zX(S=kJ|93QGdLmT#T-8IUISj#2|_r$`d9Z4k&+@)5AYf=*h%axQqZSb(Wa6?tOKB|
zhb;?$Ks~1fFvi)~t{u`-R-qjb8{f@0BA|n>_bHW#6u&mLFmtF
zG9d5(nAN3DZ3~B7q$?@ANcK?QV%~vu0F=!M(9uAX&&Xy2DLa7kojOCnJ<;Kr9)Kpb
zKfAT->s7DIISHA+&cXTTGCQB5!!9SSx1vQb4}j$WlwBWr=pGJ%!u{}nKOH4O@Bmm2
zKuOb|>fI9f0JdiCR>cV+{BgbAeIu&B?Bdv5of%itTW0~xdAwDr%y7Lq*+69vo{C!<
zZI`=x_iDC_I`#7a7}lq9bvXdU^M5{>O!tC{vyf<0bkg}f$C9wM{100bpp{Q`SRc
z4=4bT)y6n@wgy1FYYEbuS@Qa39RNl>-^R2m|6-M7kgQtSGQi`%+F94zEENDUXX?p|
z*Zz{S$skqr#5xPW9d%_G5Zz%=m7=riwGsesY?J^IwkkgPt8Q^Wye|Yg&YPaq)iP@V
zs7nB@zsCdMH~}624}jwmaJ>880(bx%mw@Bl_ZGl$0R9i2ADG(*a)rbI0000
+ android:layout_marginTop="10dp" />
diff --git a/app/src/main/res/layout/activity_health.xml b/app/src/main/res/layout/activity_rubbish.xml
similarity index 69%
rename from app/src/main/res/layout/activity_health.xml
rename to app/src/main/res/layout/activity_rubbish.xml
index 9bffab4..80660d9 100644
--- a/app/src/main/res/layout/activity_health.xml
+++ b/app/src/main/res/layout/activity_rubbish.xml
@@ -38,7 +38,7 @@
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="@null"
- android:hint="输入关键字(如:香蕉,水)"
+ android:hint="输入垃圾名字(如:香蕉皮,骨头)"
android:imeOptions="actionDone"
android:inputType="text"
android:maxLines="1"
@@ -48,26 +48,10 @@
-
-
-
-
-
-
-
-
+ android:background="@color/white" />
diff --git a/app/src/main/res/layout/item_health.xml b/app/src/main/res/layout/item_health.xml
index 5057a65..f8b1332 100644
--- a/app/src/main/res/layout/item_health.xml
+++ b/app/src/main/res/layout/item_health.xml
@@ -1,6 +1,4 @@
-
-
+ android:layout_alignParentRight="true"
+ android:maxLines="2"
+ android:text="干垃圾"
+ android:textColor="@color/black_text1_color"
+ android:textSize="16sp"
+ android:textStyle="bold" />
-
+
diff --git a/app/src/main/res/layout/item_history_today.xml b/app/src/main/res/layout/item_history_today.xml
index 4bec565..7b0366d 100644
--- a/app/src/main/res/layout/item_history_today.xml
+++ b/app/src/main/res/layout/item_history_today.xml
@@ -31,6 +31,8 @@
android:lineSpacingExtra="4dp"
android:textColor="@color/black_text3_color"
android:textSize="14sp"
+ app:ep_contract_color="@color/main_color"
+ app:ep_expand_color="@color/main_color"
app:ep_expand_text="展开"
app:ep_max_line="4"
app:ep_need_always_showright="true"