mirror of
https://github.com/TwidereProject/Twidere-Android
synced 2025-01-30 08:25:01 +01:00
fixed wrong icon color in wizard page
fixed sign in button color
This commit is contained in:
parent
7a3d995b0e
commit
53565ee293
@ -57,7 +57,6 @@ import android.support.v4.content.res.ResourcesCompat;
|
||||
import android.support.v4.view.ViewCompat;
|
||||
import android.support.v4.view.ViewPager;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.internal.widget.TintButton;
|
||||
import android.text.Html;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.Spanned;
|
||||
@ -194,7 +193,7 @@ public class UserFragment extends BaseSupportFragment implements OnClickListener
|
||||
private TabPagerIndicator mPagerIndicator;
|
||||
private View mUuckyFooter;
|
||||
private View mProfileBannerContainer;
|
||||
private TintButton mFollowButton;
|
||||
private Button mFollowButton;
|
||||
private ProgressBar mFollowProgress;
|
||||
private View mPagesContent, mPagesErrorContainer;
|
||||
private ImageView mPagesErrorIcon;
|
||||
@ -1145,7 +1144,7 @@ public class UserFragment extends BaseSupportFragment implements OnClickListener
|
||||
mProfileBannerSpace = headerView.findViewById(R.id.profile_banner_space);
|
||||
mViewPager = (ViewPager) contentView.findViewById(R.id.view_pager);
|
||||
mPagerIndicator = (TabPagerIndicator) contentView.findViewById(R.id.view_pager_tabs);
|
||||
mFollowButton = (TintButton) headerView.findViewById(R.id.follow);
|
||||
mFollowButton = (Button) headerView.findViewById(R.id.follow);
|
||||
mFollowProgress = (ProgressBar) headerView.findViewById(R.id.follow_progress);
|
||||
mUuckyFooter = headerView.findViewById(R.id.uucky_footer);
|
||||
mPagesContent = view.findViewById(R.id.pages_content);
|
||||
|
@ -0,0 +1,38 @@
|
||||
package org.mariotaku.twidere.preference;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.PorterDuff.Mode;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.preference.Preference;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
|
||||
import org.mariotaku.twidere.util.ThemeUtils;
|
||||
|
||||
/**
|
||||
* Created by mariotaku on 14-7-28.
|
||||
*/
|
||||
public class ForegroundColorIconPreference extends Preference {
|
||||
public ForegroundColorIconPreference(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onBindView(@NonNull View view) {
|
||||
super.onBindView(view);
|
||||
final Drawable icon = getIcon();
|
||||
if (icon != null) {
|
||||
icon.setColorFilter(ThemeUtils.getThemeForegroundColor(getContext()), Mode.SRC_ATOP);
|
||||
}
|
||||
setIcon(icon);
|
||||
}
|
||||
|
||||
public ForegroundColorIconPreference(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, android.R.attr.preferenceStyle);
|
||||
}
|
||||
|
||||
public ForegroundColorIconPreference(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
package org.mariotaku.twidere.preference;
|
||||
|
||||
import android.content.Context;
|
||||
import android.preference.Preference;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
/**
|
||||
* Created by mariotaku on 14-7-28.
|
||||
*/
|
||||
public class ResourceIconPreference extends Preference {
|
||||
public ResourceIconPreference(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
}
|
||||
|
||||
public ResourceIconPreference(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, android.R.attr.preferenceStyle);
|
||||
}
|
||||
|
||||
public ResourceIconPreference(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
}
|
@ -68,7 +68,7 @@
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp">
|
||||
|
||||
<Button
|
||||
<android.support.v7.internal.widget.TintButton
|
||||
android:id="@+id/sign_up"
|
||||
style="?android:buttonStyleSmall"
|
||||
android:layout_width="match_parent"
|
||||
@ -78,7 +78,7 @@
|
||||
android:onClick="onClick"
|
||||
android:text="@string/register"/>
|
||||
|
||||
<Button
|
||||
<android.support.v7.internal.widget.TintButton
|
||||
android:id="@+id/sign_in"
|
||||
style="?android:buttonStyleSmall"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -3,22 +3,22 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:title="@string/hints">
|
||||
|
||||
<org.mariotaku.twidere.preference.ResourceIconPreference
|
||||
<org.mariotaku.twidere.preference.ForegroundColorIconPreference
|
||||
android:icon="@drawable/ic_action_accounts"
|
||||
android:order="11"
|
||||
android:summary="@string/wizard_hint_compose_select_account"
|
||||
android:title="@string/select_account"/>
|
||||
<org.mariotaku.twidere.preference.ResourceIconPreference
|
||||
<org.mariotaku.twidere.preference.ForegroundColorIconPreference
|
||||
android:icon="@drawable/ic_action_quote"
|
||||
android:order="12"
|
||||
android:summary="@string/wizard_hint_quote_format"
|
||||
android:title="@string/quote_format"/>
|
||||
<org.mariotaku.twidere.preference.ResourceIconPreference
|
||||
<org.mariotaku.twidere.preference.ForegroundColorIconPreference
|
||||
android:icon="@drawable/ic_action_speaker_muted"
|
||||
android:order="13"
|
||||
android:summary="@string/wizard_hint_filters"
|
||||
android:title="@string/filters"/>
|
||||
<org.mariotaku.twidere.preference.ResourceIconPreference
|
||||
<org.mariotaku.twidere.preference.ForegroundColorIconPreference
|
||||
android:icon="@drawable/ic_action_refresh"
|
||||
android:order="14"
|
||||
android:summary="@string/wizard_hint_rate_limit"
|
||||
|
@ -22,10 +22,10 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:title="@string/usage_statistics">
|
||||
|
||||
<org.mariotaku.twidere.preference.ResourceIconPreference
|
||||
<org.mariotaku.twidere.preference.ForegroundColorIconPreference
|
||||
android:order="11"
|
||||
android:title="@string/research_ucdavis_earlybird"/>
|
||||
<org.mariotaku.twidere.preference.ResourceIconPreference
|
||||
<org.mariotaku.twidere.preference.ForegroundColorIconPreference
|
||||
android:order="12"
|
||||
android:title="@string/research_tsinghua_spice"/>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user