浏览代码

修改UI细节

316044749 7 年之前
父节点
当前提交
50c7677117

+ 1 - 0
app/src/main/java/com/ynstkz/shitu/android/activity/MineCollectActivity.java

@@ -198,6 +198,7 @@ public class MineCollectActivity extends TitleBarActivity implements PullToRefre
 
             @Override
             public void onError(Call call, Exception e, int id) {
+                pullToRefresh.onRefreshComplete();
                 STSign.getInstance().tonkenError(MineCollectActivity.this, e);
             }
 

+ 1 - 1
app/src/main/java/com/ynstkz/shitu/android/application/STSign.java

@@ -189,7 +189,7 @@ public class STSign {
      * @param context
      */
     public void tonkenError(Context context, Exception e){
-        tonkenError(context, e, false);
+        tonkenError(context, e, true);
     }
 
     public void tonkenError(Context context, Exception e, boolean isLogin){

+ 12 - 2
app/src/main/java/com/ynstkz/shitu/android/fragment/HomeFragment.java

@@ -402,8 +402,18 @@ public class HomeFragment extends BaseFragment implements PullToRefreshBase.OnRe
             }
             tv_memberName.setText(orgItemBean.getMemberName());
             rb_score.setProgress((int)orgItemBean.getScore());
-            tv_regaddress.setText(orgItemBean.getAddress());
-            tvviewcount.setText(orgItemBean.getScoreCount() + "条评论");
+            if(!TextUtils.isEmpty(orgItemBean.getAddress())) {
+                tv_regaddress.setVisibility(View.VISIBLE);
+                tv_regaddress.setText(orgItemBean.getAddress());
+            } else {
+                tv_regaddress.setVisibility(View.GONE);
+            }
+            if(!TextUtils.isEmpty(orgItemBean.getScoreCount())){
+                tvviewcount.setVisibility(View.VISIBLE);
+                tvviewcount.setText(orgItemBean.getScoreCount() + "条评论");
+            } else {
+                tvviewcount.setVisibility(View.GONE);
+            }
 
             //加载课程数据
             final LinearLayout llCourseMain = view.findViewById(R.id.ll_course_main);

+ 2 - 1
app/src/main/res/layout/item_org_list.xml

@@ -67,7 +67,8 @@
                 <TextView
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:text="英语"/>
+                    android:text="英语"
+                    android:visibility="gone"/>
 
                 <TextView
                     android:id="@+id/tv_regaddress"

+ 2 - 1
app/src/main/res/layout/item_org_recommend_list.xml

@@ -68,7 +68,8 @@
                 <TextView
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:text="英语"/>
+                    android:text="英语"
+                    android:visibility="gone"/>
 
                 <TextView
                     android:id="@+id/tv_regaddress"