Commit 9a1babae by konghaorui

统一样式

parent 6299145f
...@@ -37,7 +37,7 @@ android { ...@@ -37,7 +37,7 @@ android {
} }
flavorDimensions "versionCode"//Flavor 维度信息 flavorDimensions "versionCode"//Flavor 维度信息
vectorDrawables.useSupportLibrary = true
} }
buildTypes { buildTypes {
......
...@@ -282,7 +282,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene ...@@ -282,7 +282,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene
members_top_user_focus_iv.setVisibility(View.VISIBLE); members_top_user_focus_iv.setVisibility(View.VISIBLE);
if ("1".equals(is_focused)) {//关注:1已关注,2未关注 if ("1".equals(is_focused)) {//关注:1已关注,2未关注
members_top_user_focus_ortion_rel.setBackgroundResource(R.drawable.dynamic_has_focus_bg); members_top_user_focus_ortion_rel.setBackgroundResource(R.drawable.dynamic_has_focus_bg);
Drawable drawable = getResources().getDrawable(R.drawable.dynamic_has_focus_down); Drawable drawable = getResources().getDrawable(R.drawable.dynamic_ic_expand);
drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight()); drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight());
members_top_user_focus_ortion_tv.setCompoundDrawablePadding(20); members_top_user_focus_ortion_tv.setCompoundDrawablePadding(20);
members_top_user_focus_ortion_tv.setCompoundDrawables(null, null, drawable, null); members_top_user_focus_ortion_tv.setCompoundDrawables(null, null, drawable, null);
...@@ -460,7 +460,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene ...@@ -460,7 +460,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene
fans_count = (fans_counti + 1) + ""; fans_count = (fans_counti + 1) + "";
members_top_user_fensi_num_tv.setText("粉丝 " + fans_count); members_top_user_fensi_num_tv.setText("粉丝 " + fans_count);
focus_state = "1"; focus_state = "1";
Drawable drawable = getResources().getDrawable(R.drawable.dynamic_has_focus_down); Drawable drawable = getResources().getDrawable(R.drawable.dynamic_ic_expand);
drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight()); drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight());
members_top_user_focus_ortion_tv.setCompoundDrawablePadding(20); members_top_user_focus_ortion_tv.setCompoundDrawablePadding(20);
members_top_user_focus_ortion_tv.setCompoundDrawables(null, null, drawable, null); members_top_user_focus_ortion_tv.setCompoundDrawables(null, null, drawable, null);
...@@ -552,7 +552,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene ...@@ -552,7 +552,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene
members_top_user_focus_iv.setVisibility(View.VISIBLE); members_top_user_focus_iv.setVisibility(View.VISIBLE);
if ("1".equals(focus_state)) {//关注:1已关注,2未关注 if ("1".equals(focus_state)) {//关注:1已关注,2未关注
members_top_user_focus_ortion_rel.setBackgroundResource(R.drawable.dynamic_has_focus_bg); members_top_user_focus_ortion_rel.setBackgroundResource(R.drawable.dynamic_has_focus_bg);
Drawable drawable = getResources().getDrawable(R.drawable.dynamic_has_focus_down); Drawable drawable = getResources().getDrawable(R.drawable.dynamic_ic_expand);
drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight()); drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight());
members_top_user_focus_ortion_tv.setCompoundDrawablePadding(20); members_top_user_focus_ortion_tv.setCompoundDrawablePadding(20);
members_top_user_focus_ortion_tv.setCompoundDrawables(null, null, drawable, null); members_top_user_focus_ortion_tv.setCompoundDrawables(null, null, drawable, null);
......
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:width="22dp"
android:height="22dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
tools:ignore="MissingDefaultResource">
<path
android:fillColor="@color/platform_main_theme"
android:pathData="M16.59,8.59L12,13.17 7.41,8.59 6,10l6,6 6,-6z" />
</vector>
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
android:layout_marginLeft="15dp" android:layout_marginLeft="15dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:text="查看8条评论" android:text="查看8条评论"
android:textColor="@color/dynamic_text_user" /> android:textColor="@color/platform_main_theme" />
</RelativeLayout> </RelativeLayout>
<View <View
...@@ -202,7 +202,7 @@ ...@@ -202,7 +202,7 @@
android:layout_marginLeft="15dp" android:layout_marginLeft="15dp"
android:ellipsize="end" android:ellipsize="end"
android:textSize="14sp" android:textSize="14sp"
android:textColor="@color/dynamic_text_user" android:textColor="@color/platform_main_theme"
android:layout_below="@+id/item_recommend_trend_img_rel" android:layout_below="@+id/item_recommend_trend_img_rel"
tools:text="#表白话题#"/> tools:text="#表白话题#"/>
......
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
android:layout_marginLeft="15dp" android:layout_marginLeft="15dp"
android:ellipsize="end" android:ellipsize="end"
android:textSize="14sp" android:textSize="14sp"
android:textColor="@color/dynamic_text_user" android:textColor="@color/platform_main_theme"
android:layout_below="@+id/item_recommend_trend_ad_rel" android:layout_below="@+id/item_recommend_trend_ad_rel"
tools:text="#表白话题#"/> tools:text="#表白话题#"/>
......
...@@ -182,7 +182,7 @@ ...@@ -182,7 +182,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="right" android:layout_gravity="right"
android:text="全部" android:text="全部"
android:textColor="@color/dynamic_text_user" android:textColor="@color/platform_main_theme"
android:visibility="gone" android:visibility="gone"
tools:visibility="visible" /> tools:visibility="visible" />
</LinearLayout> </LinearLayout>
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
android:layout_marginLeft="15dp" android:layout_marginLeft="15dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:text="查看8条评论" android:text="查看8条评论"
android:textColor="@color/dynamic_text_user" android:textColor="@color/platform_main_theme"
android:visibility="gone" /> android:visibility="gone" />
</RelativeLayout> </RelativeLayout>
...@@ -185,7 +185,7 @@ ...@@ -185,7 +185,7 @@
android:ellipsize="end" android:ellipsize="end"
android:gravity="center_vertical" android:gravity="center_vertical"
android:maxLines="1" android:maxLines="1"
android:textColor="@color/dynamic_text_user" android:textColor="@color/platform_main_theme"
android:textSize="14sp" android:textSize="14sp"
tools:text="#表白话题#" /> tools:text="#表白话题#" />
......
...@@ -170,6 +170,7 @@ class HomePresenterImpl: BaseHomePresenterImpl<IHomeContract.View, IHomeContract ...@@ -170,6 +170,7 @@ class HomePresenterImpl: BaseHomePresenterImpl<IHomeContract.View, IHomeContract
.subscribeOn(Schedulers.newThread()) .subscribeOn(Schedulers.newThread())
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.doOnComplete { .doOnComplete {
if (homeList.size == mergeArrays.size){
ThreadUtils.doOnThread(object : ThreadUtils.ThreadTask{ ThreadUtils.doOnThread(object : ThreadUtils.ThreadTask{
override fun doOnThread() { override fun doOnThread() {
SharedPreferencesEditor.putString(CACHE_HOME_PAGER_DATA, Gson().toJson(homeList)) SharedPreferencesEditor.putString(CACHE_HOME_PAGER_DATA, Gson().toJson(homeList))
...@@ -180,12 +181,19 @@ class HomePresenterImpl: BaseHomePresenterImpl<IHomeContract.View, IHomeContract ...@@ -180,12 +181,19 @@ class HomePresenterImpl: BaseHomePresenterImpl<IHomeContract.View, IHomeContract
} }
}) })
} }
}
.subscribe(Consumer {}, object : ThrowableConsumer() { .subscribe(Consumer {}, object : ThrowableConsumer() {
override fun accept(msg: String) { override fun accept(msg: String) {
mView.homeDataFail(msg) mView.homeDataFail(msg)
mHomeDisposable?.dispose() mHomeDisposable?.dispose()
} }
}, Action { }, Action {
LogUtil.i("homeList Size:"+homeList.size+" - "+mergeArrays.size)
if (homeList.size != mergeArrays.size){
mView.homeDataFail("")
return@Action
}
if (HomeViewConfig.getOrder().buttonIndex != null){ if (HomeViewConfig.getOrder().buttonIndex != null){
homeList.add(HomePagerDataBean(HomeViewConfig.getOrder().buttonIndex!!)) homeList.add(HomePagerDataBean(HomeViewConfig.getOrder().buttonIndex!!))
} }
......
...@@ -45,13 +45,13 @@ public class MoonUtil { ...@@ -45,13 +45,13 @@ public class MoonUtil {
public static void SetTrendContent(Context context,TextView textView, String value,String topic,String allContent,int align){ public static void SetTrendContent(Context context,TextView textView, String value,String topic,String allContent,int align){
// viewSetText(textView, mSpannableString); // viewSetText(textView, mSpannableString);
SpannableString spantopic = new SpannableString(topic); SpannableString spantopic = new SpannableString(topic);
spantopic.setSpan(new ForegroundColorSpan(context.getResources().getColor(R.color.platform_text_user)), 0, topic.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); spantopic.setSpan(new ForegroundColorSpan(context.getResources().getColor(R.color.platform_main_theme)), 0, topic.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
textView.setText(spantopic); textView.setText(spantopic);
SpannableString mSpannableString = makeSpannableStringTags(context, value, DEF_SCALE, align); SpannableString mSpannableString = makeSpannableStringTags(context, value, DEF_SCALE, align);
textView.append(mSpannableString); textView.append(mSpannableString);
if(!"".equals(allContent)&&allContent!=null){ if(!"".equals(allContent)&&allContent!=null){
SpannableString spanallContent = new SpannableString(allContent); SpannableString spanallContent = new SpannableString(allContent);
spanallContent.setSpan(new ForegroundColorSpan(context.getResources().getColor(R.color.platform_text_user)), 0, allContent.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); spanallContent.setSpan(new ForegroundColorSpan(context.getResources().getColor(R.color.platform_main_theme)), 0, allContent.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
textView.append(spanallContent); textView.append(spanallContent);
} }
// textView.setMovementMethod(LinkMovementMethod.getInstance()); // textView.setMovementMethod(LinkMovementMethod.getInstance());
...@@ -95,14 +95,14 @@ public class MoonUtil { ...@@ -95,14 +95,14 @@ public class MoonUtil {
textView.setText("回复"); textView.setText("回复");
String reply_user_name=reply_username+":"; String reply_user_name=reply_username+":";
SpannableString spantreplyuser = new SpannableString(reply_user_name); SpannableString spantreplyuser = new SpannableString(reply_user_name);
spantreplyuser.setSpan(new ForegroundColorSpan(context.getResources().getColor(R.color.platform_text_user)), 0, reply_user_name.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); spantreplyuser.setSpan(new ForegroundColorSpan(context.getResources().getColor(R.color.platform_main_theme)), 0, reply_user_name.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
textView.append(spantreplyuser); textView.append(spantreplyuser);
SpannableString mSpannableString = makeSpannableStringTags2(context, value, 0.45f, align); SpannableString mSpannableString = makeSpannableStringTags2(context, value, 0.45f, align);
textView.append(mSpannableString); textView.append(mSpannableString);
}else { }else {
String usernamed=username+":"; String usernamed=username+":";
SpannableString spantuser = new SpannableString(usernamed); SpannableString spantuser = new SpannableString(usernamed);
spantuser.setSpan(new ForegroundColorSpan(context.getResources().getColor(R.color.platform_text_user)), 0, usernamed.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); spantuser.setSpan(new ForegroundColorSpan(context.getResources().getColor(R.color.platform_main_theme)), 0, usernamed.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
textView.setText(spantuser); textView.setText(spantuser);
SpannableString mSpannableString = makeSpannableStringTags2(context, value, 0.45f, align); SpannableString mSpannableString = makeSpannableStringTags2(context, value, 0.45f, align);
textView.append(mSpannableString); textView.append(mSpannableString);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment