Commit 9a1babae by konghaorui

统一样式

parent 6299145f
......@@ -37,7 +37,7 @@ android {
}
flavorDimensions "versionCode"//Flavor 维度信息
vectorDrawables.useSupportLibrary = true
}
buildTypes {
......
......@@ -282,7 +282,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene
members_top_user_focus_iv.setVisibility(View.VISIBLE);
if ("1".equals(is_focused)) {//关注:1已关注,2未关注
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());
members_top_user_focus_ortion_tv.setCompoundDrawablePadding(20);
members_top_user_focus_ortion_tv.setCompoundDrawables(null, null, drawable, null);
......@@ -460,7 +460,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene
fans_count = (fans_counti + 1) + "";
members_top_user_fensi_num_tv.setText("粉丝 " + fans_count);
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());
members_top_user_focus_ortion_tv.setCompoundDrawablePadding(20);
members_top_user_focus_ortion_tv.setCompoundDrawables(null, null, drawable, null);
......@@ -552,7 +552,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene
members_top_user_focus_iv.setVisibility(View.VISIBLE);
if ("1".equals(focus_state)) {//关注:1已关注,2未关注
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());
members_top_user_focus_ortion_tv.setCompoundDrawablePadding(20);
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 @@
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:text="查看8条评论"
android:textColor="@color/dynamic_text_user" />
android:textColor="@color/platform_main_theme" />
</RelativeLayout>
<View
......@@ -202,7 +202,7 @@
android:layout_marginLeft="15dp"
android:ellipsize="end"
android:textSize="14sp"
android:textColor="@color/dynamic_text_user"
android:textColor="@color/platform_main_theme"
android:layout_below="@+id/item_recommend_trend_img_rel"
tools:text="#表白话题#"/>
......
......@@ -146,7 +146,7 @@
android:layout_marginLeft="15dp"
android:ellipsize="end"
android:textSize="14sp"
android:textColor="@color/dynamic_text_user"
android:textColor="@color/platform_main_theme"
android:layout_below="@+id/item_recommend_trend_ad_rel"
tools:text="#表白话题#"/>
......
......@@ -182,7 +182,7 @@
android:layout_height="wrap_content"
android:layout_gravity="right"
android:text="全部"
android:textColor="@color/dynamic_text_user"
android:textColor="@color/platform_main_theme"
android:visibility="gone"
tools:visibility="visible" />
</LinearLayout>
......
......@@ -41,7 +41,7 @@
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:text="查看8条评论"
android:textColor="@color/dynamic_text_user"
android:textColor="@color/platform_main_theme"
android:visibility="gone" />
</RelativeLayout>
......@@ -185,7 +185,7 @@
android:ellipsize="end"
android:gravity="center_vertical"
android:maxLines="1"
android:textColor="@color/dynamic_text_user"
android:textColor="@color/platform_main_theme"
android:textSize="14sp"
tools:text="#表白话题#" />
......
......@@ -170,6 +170,7 @@ class HomePresenterImpl: BaseHomePresenterImpl<IHomeContract.View, IHomeContract
.subscribeOn(Schedulers.newThread())
.observeOn(AndroidSchedulers.mainThread())
.doOnComplete {
if (homeList.size == mergeArrays.size){
ThreadUtils.doOnThread(object : ThreadUtils.ThreadTask{
override fun doOnThread() {
SharedPreferencesEditor.putString(CACHE_HOME_PAGER_DATA, Gson().toJson(homeList))
......@@ -180,12 +181,19 @@ class HomePresenterImpl: BaseHomePresenterImpl<IHomeContract.View, IHomeContract
}
})
}
}
.subscribe(Consumer {}, object : ThrowableConsumer() {
override fun accept(msg: String) {
mView.homeDataFail(msg)
mHomeDisposable?.dispose()
}
}, Action {
LogUtil.i("homeList Size:"+homeList.size+" - "+mergeArrays.size)
if (homeList.size != mergeArrays.size){
mView.homeDataFail("")
return@Action
}
if (HomeViewConfig.getOrder().buttonIndex != null){
homeList.add(HomePagerDataBean(HomeViewConfig.getOrder().buttonIndex!!))
}
......
......@@ -45,13 +45,13 @@ public class MoonUtil {
public static void SetTrendContent(Context context,TextView textView, String value,String topic,String allContent,int align){
// viewSetText(textView, mSpannableString);
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);
SpannableString mSpannableString = makeSpannableStringTags(context, value, DEF_SCALE, align);
textView.append(mSpannableString);
if(!"".equals(allContent)&&allContent!=null){
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.setMovementMethod(LinkMovementMethod.getInstance());
......@@ -95,14 +95,14 @@ public class MoonUtil {
textView.setText("回复");
String reply_user_name=reply_username+":";
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);
SpannableString mSpannableString = makeSpannableStringTags2(context, value, 0.45f, align);
textView.append(mSpannableString);
}else {
String usernamed=username+":";
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);
SpannableString mSpannableString = makeSpannableStringTags2(context, value, 0.45f, align);
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