pref: 优化“关于”页面样式
This commit is contained in:
parent
9f5cb28f92
commit
150a0cce4e
|
|
@ -7,6 +7,7 @@ import android.os.Bundle;
|
|||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
|
|
@ -27,10 +28,12 @@ public class AboutActivity extends BaseActivity implements View.OnClickListener
|
|||
public static final int STATE_ERROR = 0;
|
||||
public static final int STATE_NO_UPDATE = 1;
|
||||
public static final int STATE_UPDATE = 2;
|
||||
public static final int STATE_LOADING = 3;
|
||||
private View updateTip;
|
||||
private TextView updateTipHeaderTv;
|
||||
private TextView updateTipTitleTv;
|
||||
private TextView updateTipContentTv;
|
||||
private ProgressBar updateTipProgress;
|
||||
private Button dismissBtn;
|
||||
private Button downloadBtn;
|
||||
|
||||
|
|
@ -51,14 +54,11 @@ public class AboutActivity extends BaseActivity implements View.OnClickListener
|
|||
RelativeLayout mainView = (RelativeLayout) findViewById(R.id.main);
|
||||
View headerView = View.inflate(this, R.layout.header_about, null);
|
||||
((ViewGroup) headerView).setLayoutTransition(new LayoutTransition());
|
||||
((ViewGroup) headerView).getLayoutTransition().enableTransitionType(LayoutTransition.CHANGING);
|
||||
ViewGroup tip = headerView.findViewById(R.id.header_update_tip);
|
||||
tip.setLayoutTransition(new LayoutTransition());
|
||||
tip.getLayoutTransition().enableTransitionType(LayoutTransition.CHANGING);
|
||||
updateTip = headerView.findViewById(R.id.header_update_tip_shadow);
|
||||
updateTip = headerView.findViewById(R.id.header_update_tip_card);
|
||||
updateTipHeaderTv = headerView.findViewById(R.id.header_update_tip_header_title);
|
||||
updateTipTitleTv = headerView.findViewById(R.id.header_update_tip_title);
|
||||
updateTipContentTv = headerView.findViewById(R.id.header_update_tip_content);
|
||||
updateTipProgress = headerView.findViewById(R.id.header_update_tip_progress);
|
||||
dismissBtn = headerView.findViewById(R.id.header_update_tip_button_dismiss);
|
||||
downloadBtn = headerView.findViewById(R.id.header_update_tip_button_download);
|
||||
navigationHelper = NavigationHelper.newInstance(this);
|
||||
|
|
@ -153,6 +153,8 @@ public class AboutActivity extends BaseActivity implements View.OnClickListener
|
|||
*/
|
||||
|
||||
private void checkUpdate() {
|
||||
updateState = STATE_LOADING;
|
||||
refreshUpdateTip();
|
||||
LiteApi.getInstance().newCheckUpdate(new CommonAPICallback<NewUpdateBean>() {
|
||||
@Override
|
||||
public void onSuccess(NewUpdateBean data) {
|
||||
|
|
@ -180,7 +182,10 @@ public class AboutActivity extends BaseActivity implements View.OnClickListener
|
|||
case STATE_NO_UPDATE:
|
||||
downloadBtn.setText(R.string.button_check_update);
|
||||
updateTip.setVisibility(View.VISIBLE);
|
||||
downloadBtn.setVisibility(View.VISIBLE);
|
||||
dismissBtn.setVisibility(View.GONE);
|
||||
updateTipProgress.setVisibility(View.GONE);
|
||||
updateTipContentTv.setVisibility(View.VISIBLE);
|
||||
updateTipHeaderTv.setText(getString(R.string.update_tip_no_header));
|
||||
updateTipTitleTv.setText(getString(R.string.update_tip_no_title));
|
||||
updateTipContentTv.setText(getString(R.string.update_tip_no_content));
|
||||
|
|
@ -189,6 +194,9 @@ public class AboutActivity extends BaseActivity implements View.OnClickListener
|
|||
if (resultBean != null) {
|
||||
downloadBtn.setText(R.string.button_go_to_download);
|
||||
updateTip.setVisibility(View.VISIBLE);
|
||||
downloadBtn.setVisibility(View.VISIBLE);
|
||||
updateTipProgress.setVisibility(View.GONE);
|
||||
updateTipContentTv.setVisibility(View.VISIBLE);
|
||||
boolean cancelable = resultBean.isCancelable();
|
||||
updateTipHeaderTv.setText(getString(R.string.update_tip_header, resultBean.getVersionType() == 0 ? getString(R.string.tip_release_version) : getString(R.string.tip_version_beta)));
|
||||
updateTipTitleTv.setText(getString(R.string.update_tip_title, resultBean.getVersionName(), String.valueOf(resultBean.getVersionCode())));
|
||||
|
|
@ -201,6 +209,16 @@ public class AboutActivity extends BaseActivity implements View.OnClickListener
|
|||
dismissBtn.setVisibility(cancelable ? View.VISIBLE : View.GONE);
|
||||
break;
|
||||
}
|
||||
case STATE_LOADING:
|
||||
updateTip.setVisibility(View.VISIBLE);
|
||||
downloadBtn.setVisibility(View.GONE);
|
||||
dismissBtn.setVisibility(View.GONE);
|
||||
updateTipContentTv.setVisibility(View.GONE);
|
||||
updateTipProgress.setVisibility(View.VISIBLE);
|
||||
updateTipHeaderTv.setText(getString(R.string.update_tip_no_header));
|
||||
updateTipTitleTv.setText(getString(R.string.update_tip_loading));
|
||||
updateTipContentTv.setText(null);
|
||||
break;
|
||||
default:
|
||||
updateTip.setVisibility(View.GONE);
|
||||
break;
|
||||
|
|
@ -211,13 +229,11 @@ public class AboutActivity extends BaseActivity implements View.OnClickListener
|
|||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.header_update_tip_button_download:
|
||||
if (resultBean == null) {
|
||||
if (updateState != STATE_NO_UPDATE) {
|
||||
checkUpdate();
|
||||
}
|
||||
return;
|
||||
if (updateState != STATE_UPDATE) {
|
||||
checkUpdate();
|
||||
} else {
|
||||
VersionUtil.showDownloadDialog(this, resultBean);
|
||||
}
|
||||
VersionUtil.showDownloadDialog(this, resultBean);
|
||||
break;
|
||||
case R.id.header_update_tip_button_dismiss:
|
||||
resultBean = null;
|
||||
|
|
|
|||
|
|
@ -1,71 +0,0 @@
|
|||
package com.huanchengfly.tieba.post.ui.about.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.huanchengfly.tieba.post.ui.about.AboutPage;
|
||||
import com.huanchengfly.tieba.post.ui.about.ViewHolder;
|
||||
import com.huanchengfly.tieba.post.ui.theme.utils.ThemeUtils;
|
||||
import com.huanchengfly.tieba.post.R;
|
||||
import com.huanchengfly.tieba.post.utils.DisplayUtil;
|
||||
|
||||
public class AboutPageAdapter extends BaseAdapter<AboutPage.Item> {
|
||||
public AboutPageAdapter(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public long getItemId(int position) {
|
||||
return position;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getItemLayoutId() {
|
||||
return R.layout.item_about;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(ViewHolder viewHolder, AboutPage.Item item, int position) {
|
||||
int textColor = ThemeUtils.getColorByAttr(mContext, R.attr.colorText);
|
||||
int secondaryTextColor = ThemeUtils.getColorByAttr(mContext, R.attr.colorTextSecondary);
|
||||
viewHolder.setOnClickListener(R.id.item_about_root, item.getOnClickListener());
|
||||
viewHolder.setVisibility(R.id.item_about_icon_holder, item.getIcon() == null ? item.getType() == AboutPage.Item.TYPE_TITLE ? View.GONE : View.INVISIBLE : View.VISIBLE);
|
||||
viewHolder.setVisibility(R.id.item_about_divider, item.getType() == AboutPage.Item.TYPE_TITLE && position > 0 ? View.VISIBLE : View.GONE);
|
||||
viewHolder.setVisibility(R.id.item_about_subtitle, item.getSubtitle() == null ? View.GONE : View.VISIBLE);
|
||||
viewHolder.setText(R.id.item_about_title, item.getTitle());
|
||||
viewHolder.setText(R.id.item_about_subtitle, item.getSubtitle());
|
||||
viewHolder.setTextColor(R.id.item_about_title, item.getTitleTextColor() != -1 ? item.getTitleTextColor() : textColor);
|
||||
viewHolder.setTextColor(R.id.item_about_subtitle, item.getSubtitleTextColor() != -1 ? item.getSubtitleTextColor() : secondaryTextColor);
|
||||
if (item.getType() == AboutPage.Item.TYPE_ITEM && item.getIcon() != null) {
|
||||
switch (item.getIcon().getType()) {
|
||||
case AboutPage.Icon.TYPE_DRAWABLE:
|
||||
ImageView iconView = viewHolder.getView(R.id.item_about_icon);
|
||||
iconView.setImageResource(item.getIcon().getDrawable());
|
||||
iconView.setImageTintList(ColorStateList.valueOf(item.getIcon().getIconTint()));
|
||||
RelativeLayout.LayoutParams iconLayoutParams = (RelativeLayout.LayoutParams) iconView.getLayoutParams();
|
||||
iconLayoutParams.width = iconLayoutParams.height = DisplayUtil.dp2px(mContext, 24);
|
||||
iconView.setLayoutParams(iconLayoutParams);
|
||||
break;
|
||||
case AboutPage.Icon.TYPE_URL:
|
||||
ImageView avatarView = viewHolder.getView(R.id.item_about_icon);
|
||||
Glide.with(mContext)
|
||||
.load(item.getIcon().getIconUrl())
|
||||
.apply(new RequestOptions()
|
||||
.placeholder(R.drawable.bg_placeholder_circle)
|
||||
.circleCrop())
|
||||
.transition(DrawableTransitionOptions.withCrossFade())
|
||||
.into(avatarView);
|
||||
avatarView.setImageTintList(null);
|
||||
RelativeLayout.LayoutParams avatarLayoutParams = (RelativeLayout.LayoutParams) avatarView.getLayoutParams();
|
||||
avatarLayoutParams.width = avatarLayoutParams.height = DisplayUtil.dp2px(mContext, 40);
|
||||
avatarView.setLayoutParams(avatarLayoutParams);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
package com.huanchengfly.tieba.post.ui.about.adapter
|
||||
|
||||
import android.content.Context
|
||||
import android.content.res.ColorStateList
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import android.widget.RelativeLayout
|
||||
import com.bumptech.glide.Glide
|
||||
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions
|
||||
import com.bumptech.glide.request.RequestOptions
|
||||
import com.huanchengfly.tieba.post.R
|
||||
import com.huanchengfly.tieba.post.dpToPxFloat
|
||||
import com.huanchengfly.tieba.post.ui.about.AboutPage
|
||||
import com.huanchengfly.tieba.post.ui.about.ViewHolder
|
||||
import com.huanchengfly.tieba.post.ui.theme.utils.ThemeUtils
|
||||
import com.huanchengfly.tieba.post.utils.DisplayUtil
|
||||
import com.huanchengfly.tieba.post.utils.getRadiusDrawable
|
||||
|
||||
class AboutPageAdapter(context: Context) : BaseAdapter<AboutPage.Item>(context) {
|
||||
override fun getItemId(position: Int): Long {
|
||||
return position.toLong()
|
||||
}
|
||||
|
||||
override fun getItemLayoutId(): Int {
|
||||
return R.layout.item_about
|
||||
}
|
||||
|
||||
protected override fun convert(viewHolder: ViewHolder, item: AboutPage.Item, position: Int) {
|
||||
val textColor = ThemeUtils.getColorByAttr(mContext, R.attr.colorText)
|
||||
val secondaryTextColor = ThemeUtils.getColorByAttr(mContext, R.attr.colorTextSecondary)
|
||||
viewHolder.setOnClickListener(R.id.item_about_root, item.onClickListener)
|
||||
viewHolder.setVisibility(R.id.item_about_icon_holder, if (item.icon == null) if (item.type == AboutPage.Item.TYPE_TITLE) View.GONE else View.INVISIBLE else View.VISIBLE)
|
||||
viewHolder.setVisibility(R.id.item_about_divider, if (item.type == AboutPage.Item.TYPE_TITLE && position > 0) View.VISIBLE else View.GONE)
|
||||
viewHolder.setVisibility(R.id.item_about_subtitle, if (item.subtitle == null) View.GONE else View.VISIBLE)
|
||||
viewHolder.setText(R.id.item_about_title, item.title)
|
||||
viewHolder.setText(R.id.item_about_subtitle, item.subtitle)
|
||||
viewHolder.setTextColor(R.id.item_about_title, if (item.titleTextColor != -1) item.titleTextColor else textColor)
|
||||
viewHolder.setTextColor(R.id.item_about_subtitle, if (item.subtitleTextColor != -1) item.subtitleTextColor else secondaryTextColor)
|
||||
if (item.type == AboutPage.Item.TYPE_ITEM && item.icon != null) {
|
||||
viewHolder.getView<View>(R.id.item_about_root).background = if (position >= itemList.size - 1) {
|
||||
getRadiusDrawable(
|
||||
bottomLeftPx = 10f.dpToPxFloat(),
|
||||
bottomRightPx = 10f.dpToPxFloat(),
|
||||
ripple = true
|
||||
)
|
||||
} else {
|
||||
getRadiusDrawable(ripple = true)
|
||||
}
|
||||
when (item.icon.type) {
|
||||
AboutPage.Icon.TYPE_DRAWABLE -> {
|
||||
val iconView = viewHolder.getView<ImageView>(R.id.item_about_icon)
|
||||
iconView.setImageResource(item.icon.drawable)
|
||||
iconView.imageTintList = ColorStateList.valueOf(item.icon.iconTint)
|
||||
val iconLayoutParams = iconView.layoutParams as RelativeLayout.LayoutParams
|
||||
run {
|
||||
iconLayoutParams.height = DisplayUtil.dp2px(mContext, 24f)
|
||||
iconLayoutParams.width = iconLayoutParams.height
|
||||
}
|
||||
iconView.layoutParams = iconLayoutParams
|
||||
}
|
||||
AboutPage.Icon.TYPE_URL -> {
|
||||
val avatarView = viewHolder.getView<ImageView>(R.id.item_about_icon)
|
||||
Glide.with(mContext)
|
||||
.load(item.icon.iconUrl)
|
||||
.apply(RequestOptions()
|
||||
.placeholder(R.drawable.bg_placeholder_circle)
|
||||
.circleCrop())
|
||||
.transition(DrawableTransitionOptions.withCrossFade())
|
||||
.into(avatarView)
|
||||
avatarView.imageTintList = null
|
||||
val avatarLayoutParams = avatarView.layoutParams as RelativeLayout.LayoutParams
|
||||
run {
|
||||
avatarLayoutParams.height = DisplayUtil.dp2px(mContext, 40f)
|
||||
avatarLayoutParams.width = avatarLayoutParams.height
|
||||
}
|
||||
avatarView.layoutParams = avatarLayoutParams
|
||||
}
|
||||
}
|
||||
} else if (item.type == AboutPage.Item.TYPE_TITLE) {
|
||||
viewHolder.getView<View>(R.id.item_about_root).apply {
|
||||
background = getRadiusDrawable(
|
||||
topLeftPx = 10f.dpToPxFloat(),
|
||||
topRightPx = 10f.dpToPxFloat()
|
||||
)
|
||||
if (layoutParams is ViewGroup.MarginLayoutParams) {
|
||||
(layoutParams as ViewGroup.MarginLayoutParams).topMargin = context.resources.getDimensionPixelSize(R.dimen.card_margin)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -6,6 +6,7 @@ import android.graphics.Color
|
|||
import android.graphics.drawable.Drawable
|
||||
import android.graphics.drawable.GradientDrawable
|
||||
import android.graphics.drawable.RippleDrawable
|
||||
import com.huanchengfly.tieba.post.BaseApplication
|
||||
import com.huanchengfly.tieba.post.R
|
||||
import com.huanchengfly.tieba.post.ui.theme.utils.ColorStateListUtils
|
||||
|
||||
|
|
@ -59,7 +60,7 @@ fun getRadiusDrawable(
|
|||
bottomRightPx: Float = 0f,
|
||||
ripple: Boolean = false
|
||||
): Drawable {
|
||||
return GradientDrawable().apply {
|
||||
val drawable = GradientDrawable().apply {
|
||||
color = ColorStateList.valueOf(Color.WHITE)
|
||||
cornerRadii = floatArrayOf(
|
||||
topLeftPx, topLeftPx,
|
||||
|
|
@ -68,6 +69,9 @@ fun getRadiusDrawable(
|
|||
bottomLeftPx, bottomLeftPx
|
||||
)
|
||||
}
|
||||
return if (ripple)
|
||||
wrapRipple(Util.getColorByAttr(BaseApplication.instance, R.attr.colorControlHighlight, R.color.transparent), drawable)
|
||||
else drawable
|
||||
}
|
||||
|
||||
fun wrapRipple(rippleColor: Int, drawable: Drawable): Drawable {
|
||||
|
|
|
|||
|
|
@ -3,13 +3,19 @@
|
|||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
app:backgroundTint="@color/default_color_window_background"
|
||||
android:id="@+id/background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".activities.AboutActivity">
|
||||
<include
|
||||
layout="@layout/layout_appbar" />
|
||||
|
||||
<RelativeLayout
|
||||
android:paddingStart="@dimen/card_margin"
|
||||
android:paddingEnd="@dimen/card_margin"
|
||||
android:paddingBottom="@dimen/card_margin"
|
||||
android:clipToPadding="false"
|
||||
android:animateLayoutChanges="true"
|
||||
android:id="@+id/main"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
|||
|
|
@ -5,108 +5,121 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.huanchengfly.tieba.post.widgets.ShadowLayout
|
||||
android:id="@+id/header_update_tip_shadow"
|
||||
<com.huanchengfly.tieba.post.widgets.theme.TintMaterialCardView
|
||||
android:visibility="gone"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
app:shadow_layout_color="?attr/shadow_color"
|
||||
app:shadow_layout_blur="8dp"
|
||||
app:shadow_layout_radius="8dp"
|
||||
app:shadow_layout_offsetY="4dp"
|
||||
app:cardElevation="0dp"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:contentPadding="16dp"
|
||||
app:strokeWidth="0dp"
|
||||
tools:paddingStart="@dimen/card_margin"
|
||||
tools:paddingEnd="@dimen/card_margin"
|
||||
android:layout_marginTop="@dimen/card_margin"
|
||||
android:id="@+id/header_update_tip_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<com.huanchengfly.tieba.post.widgets.theme.TintMaterialCardView
|
||||
app:cardElevation="0dp"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:contentPadding="16dp"
|
||||
app:strokeWidth="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
tools:visibility="visible">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/header_update_tip"
|
||||
android:animateLayoutChanges="true"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/header_update_tip"
|
||||
android:animateLayoutChanges="true"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:id="@+id/header_update_tip_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.huanchengfly.tieba.post.widgets.theme.TintImageView
|
||||
app:tint="@color/default_color_primary"
|
||||
android:layout_centerVertical="true"
|
||||
app:srcCompat="@drawable/ic_ribbon"
|
||||
android:id="@+id/header_update_tip_icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<com.huanchengfly.tieba.post.widgets.theme.TintTextView
|
||||
app:tint="@color/default_color_primary"
|
||||
tools:text="更新 · 正式版"
|
||||
android:id="@+id/header_update_tip_header_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_toEndOf="@id/header_update_tip_icon"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="16dp"
|
||||
android:id="@+id/header_update_tip_content_holder"
|
||||
android:layout_below="@id/header_update_tip_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/header_update_tip_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.huanchengfly.tieba.post.widgets.theme.TintImageView
|
||||
app:tint="@color/default_color_primary"
|
||||
<com.huanchengfly.tieba.post.widgets.theme.TintProgressBar
|
||||
style="@style/Widget.AppCompat.ProgressBar"
|
||||
android:id="@+id/header_update_tip_progress"
|
||||
android:visibility="gone"
|
||||
android:layout_centerVertical="true"
|
||||
app:srcCompat="@drawable/ic_ribbon"
|
||||
android:id="@+id/header_update_tip_icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<com.huanchengfly.tieba.post.widgets.theme.TintTextView
|
||||
app:tint="@color/default_color_primary"
|
||||
tools:text="更新 · 正式版"
|
||||
android:id="@+id/header_update_tip_header_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_toEndOf="@id/header_update_tip_icon"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="16dp"
|
||||
android:id="@+id/header_update_tip_content_holder"
|
||||
android:layout_below="@id/header_update_tip_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<com.huanchengfly.tieba.post.widgets.theme.TintTextView
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toEndOf="@id/header_update_tip_progress"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textSize="16sp"
|
||||
tools:text="发现新版 3.6.0.1"
|
||||
tools:text="发现新版 4.0.0"
|
||||
app:tint="@color/default_color_text"
|
||||
android:textStyle="bold"
|
||||
android:id="@+id/header_update_tip_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
<com.huanchengfly.tieba.post.widgets.theme.TintTextView
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:layout_marginTop="4dp"
|
||||
android:textSize="14sp"
|
||||
tools:text="这里是更新内容"
|
||||
app:tint="@color/default_color_text_secondary"
|
||||
android:id="@+id/header_update_tip_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<com.huanchengfly.tieba.post.widgets.theme.TintMaterialButton
|
||||
style="@style/Widget.Button.Flat.Dense"
|
||||
android:id="@+id/header_update_tip_button_dismiss"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/header_update_tip_content_holder"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_toStartOf="@id/header_update_tip_button_download"
|
||||
android:text="@string/button_next_time" />
|
||||
<com.huanchengfly.tieba.post.widgets.theme.TintTextView
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:layout_marginTop="4dp"
|
||||
android:textSize="14sp"
|
||||
tools:text="这里是更新内容"
|
||||
app:tint="@color/default_color_text_secondary"
|
||||
android:id="@+id/header_update_tip_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.huanchengfly.tieba.post.widgets.theme.TintMaterialButton
|
||||
style="@style/Widget.Button"
|
||||
android:id="@+id/header_update_tip_button_download"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/header_update_tip_content_holder"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/button_go_to_download" />
|
||||
</RelativeLayout>
|
||||
</com.huanchengfly.tieba.post.widgets.theme.TintMaterialCardView>
|
||||
</com.huanchengfly.tieba.post.widgets.ShadowLayout>
|
||||
<com.huanchengfly.tieba.post.widgets.theme.TintMaterialButton
|
||||
style="@style/Widget.Button.Flat.Dense"
|
||||
android:id="@+id/header_update_tip_button_dismiss"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/header_update_tip_content_holder"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_toStartOf="@id/header_update_tip_button_download"
|
||||
android:text="@string/button_next_time" />
|
||||
|
||||
<com.huanchengfly.tieba.post.widgets.theme.TintMaterialButton
|
||||
style="@style/Widget.Button"
|
||||
android:id="@+id/header_update_tip_button_download"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/header_update_tip_content_holder"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/button_go_to_download" />
|
||||
</RelativeLayout>
|
||||
</com.huanchengfly.tieba.post.widgets.theme.TintMaterialCardView>
|
||||
</RelativeLayout>
|
||||
|
|
@ -3,23 +3,24 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<com.huanchengfly.tieba.post.widgets.theme.TintView
|
||||
app:backgroundTint="@color/default_color_divider"
|
||||
android:layout_marginTop="16dp"
|
||||
android:visibility="gone"
|
||||
android:id="@+id/item_about_divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="8dp" />
|
||||
|
||||
<RelativeLayout
|
||||
<com.huanchengfly.tieba.post.widgets.theme.TintRelativeLayout
|
||||
app:backgroundTint="@color/default_color_card"
|
||||
android:layout_below="@id/item_about_divider"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:id="@+id/item_about_root"
|
||||
android:padding="12dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RelativeLayout
|
||||
android:minHeight="24dp"
|
||||
android:layout_centerVertical="true"
|
||||
|
|
@ -57,5 +58,5 @@
|
|||
android:layout_alignStart="@id/item_about_title"
|
||||
android:layout_marginTop="4dp" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
</com.huanchengfly.tieba.post.widgets.theme.TintRelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
|
@ -192,7 +192,7 @@
|
|||
<string name="tip_from_forum">%1$s吧</string>
|
||||
<string name="title_dialog_download">选择下载方式</string>
|
||||
<string name="tip_from_history">您上次阅读到第 %1$s 楼</string>
|
||||
<string name="update_tip_no_title">贴吧 Lite 当前已是最新版本</string>
|
||||
<string name="update_tip_no_title">当前已是最新版本</string>
|
||||
<string name="update_tip_no_header">更新</string>
|
||||
<string name="button_check_update">检查更新</string>
|
||||
<string name="tip_oksign_running">一键签到服务正在运行中</string>
|
||||
|
|
@ -201,7 +201,7 @@
|
|||
<string name="summary_auto_sign_on">自动签到已开启</string>
|
||||
<string name="summary_auto_sign_time">当前设置为 %1$s</string>
|
||||
<string name="tip_auto_sign">提示:请您允许贴吧 Lite 的自启动,否则可能无法正常唤醒签到。</string>
|
||||
<string name="update_tip_no_content">点击下方按钮重新检查更新</string>
|
||||
<string name="update_tip_no_content">点击查看完整更新日志</string>
|
||||
<string name="title_forum">%1$s吧</string>
|
||||
<string name="menu_edit_info">编辑资料</string>
|
||||
<string name="url_edit_info">https://tieba.baidu.com/mo/q/myinfo?</string>
|
||||
|
|
@ -398,4 +398,5 @@
|
|||
<string name="title_oksign_finish">签到完成</string>
|
||||
<string name="title_oksign_fail">签到失败</string>
|
||||
<string name="text_login_first">请先登录</string>
|
||||
<string name="update_tip_loading">正在检查更新</string>
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Reference in New Issue