fixed compose/search title on dark theme
This commit is contained in:
parent
bfccdff990
commit
0b14cc1c87
|
@ -145,10 +145,10 @@ import org.mariotaku.twidere.util.TwidereViewUtils;
|
|||
import org.mariotaku.twidere.util.TwitterContentUtils;
|
||||
import org.mariotaku.twidere.util.Utils;
|
||||
import org.mariotaku.twidere.util.dagger.GeneralComponentHelper;
|
||||
import org.mariotaku.twidere.view.ActionIconView;
|
||||
import org.mariotaku.twidere.view.BadgeView;
|
||||
import org.mariotaku.twidere.view.CheckableLinearLayout;
|
||||
import org.mariotaku.twidere.view.ComposeEditText;
|
||||
import org.mariotaku.twidere.view.IconActionView;
|
||||
import org.mariotaku.twidere.view.ShapedImageView;
|
||||
import org.mariotaku.twidere.view.StatusTextCountView;
|
||||
import org.mariotaku.twidere.view.helper.SimpleItemTouchHelperCallback;
|
||||
|
@ -205,7 +205,7 @@ public class ComposeActivity extends BaseActivity implements OnMenuItemClickList
|
|||
private BadgeView mCountView;
|
||||
private View mAccountSelectorButton;
|
||||
private View mLocationContainer;
|
||||
private ActionIconView mLocationIcon;
|
||||
private IconActionView mLocationIcon;
|
||||
private TextView mLocationText;
|
||||
private TextView mReplyLabel;
|
||||
private View mReplyLabelDivider;
|
||||
|
@ -541,7 +541,7 @@ public class ComposeActivity extends BaseActivity implements OnMenuItemClickList
|
|||
mCountView = (BadgeView) findViewById(R.id.accounts_count);
|
||||
mAccountSelectorButton = findViewById(R.id.account_selector_button);
|
||||
mLocationContainer = findViewById(R.id.location_container);
|
||||
mLocationIcon = (ActionIconView) findViewById(R.id.location_icon);
|
||||
mLocationIcon = (IconActionView) findViewById(R.id.location_icon);
|
||||
mLocationText = (TextView) findViewById(R.id.location_text);
|
||||
mReplyLabel = (TextView) findViewById(R.id.reply_label);
|
||||
mReplyLabelDivider = findViewById(R.id.reply_label_divider);
|
||||
|
@ -1313,11 +1313,8 @@ public class ComposeActivity extends BaseActivity implements OnMenuItemClickList
|
|||
|
||||
private void updateLocationState() {
|
||||
final boolean attachLocation = mPreferences.getBoolean(KEY_ATTACH_LOCATION, false);
|
||||
if (attachLocation) {
|
||||
mLocationIcon.setColorFilter(ThemeUtils.getOptimalAccentColor(this, false
|
||||
), Mode.SRC_ATOP);
|
||||
} else {
|
||||
mLocationIcon.setColorFilter(mLocationIcon.getDefaultColor(), Mode.SRC_ATOP);
|
||||
mLocationIcon.setActivated(attachLocation);
|
||||
if (!attachLocation) {
|
||||
mLocationText.setText(R.string.no_location);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,7 +53,6 @@ import org.mariotaku.twidere.activity.AssistLauncherActivity;
|
|||
import org.mariotaku.twidere.activity.MainActivity;
|
||||
import org.mariotaku.twidere.activity.MainHondaJOJOActivity;
|
||||
import org.mariotaku.twidere.service.RefreshService;
|
||||
import org.mariotaku.twidere.util.theme.ProfileImageViewViewProcessor;
|
||||
import org.mariotaku.twidere.util.BugReporter;
|
||||
import org.mariotaku.twidere.util.DebugModeUtils;
|
||||
import org.mariotaku.twidere.util.ExternalThemeManager;
|
||||
|
@ -63,13 +62,14 @@ import org.mariotaku.twidere.util.ThemeUtils;
|
|||
import org.mariotaku.twidere.util.TwidereBugReporter;
|
||||
import org.mariotaku.twidere.util.Utils;
|
||||
import org.mariotaku.twidere.util.content.TwidereSQLiteOpenHelper;
|
||||
import org.mariotaku.twidere.util.dagger.ApplicationModule;
|
||||
import org.mariotaku.twidere.util.dagger.DependencyHolder;
|
||||
import org.mariotaku.twidere.util.net.TwidereDns;
|
||||
import org.mariotaku.twidere.util.theme.ActionBarContextViewViewProcessor;
|
||||
import org.mariotaku.twidere.util.theme.ExtendedSwipeRefreshLayoutViewProcessor;
|
||||
import org.mariotaku.twidere.util.theme.FloatingActionButtonViewProcessor;
|
||||
import org.mariotaku.twidere.util.theme.IconActionButtonTagProcessor;
|
||||
import org.mariotaku.twidere.util.theme.OptimalLinkColorTagProcessor;
|
||||
import org.mariotaku.twidere.util.theme.ProfileImageViewViewProcessor;
|
||||
import org.mariotaku.twidere.util.theme.ProgressWheelViewProcessor;
|
||||
import org.mariotaku.twidere.util.theme.TabPagerIndicatorViewProcessor;
|
||||
import org.mariotaku.twidere.util.theme.TimelineContentTextViewViewProcessor;
|
||||
|
@ -91,7 +91,6 @@ public class TwidereApplication extends Application implements Constants,
|
|||
private SQLiteOpenHelper mSQLiteOpenHelper;
|
||||
private SQLiteDatabase mDatabase;
|
||||
|
||||
private ApplicationModule mApplicationModule;
|
||||
private ProfileImageViewViewProcessor mProfileImageViewViewProcessor;
|
||||
|
||||
@NonNull
|
||||
|
@ -144,15 +143,23 @@ public class TwidereApplication extends Application implements Constants,
|
|||
mProfileImageViewViewProcessor = new ProfileImageViewViewProcessor();
|
||||
ATE.registerViewProcessor(ProfileImageView.class, mProfileImageViewViewProcessor);
|
||||
ATE.registerTagProcessor("optimal_link_color", new OptimalLinkColorTagProcessor());
|
||||
ATE.registerTagProcessor(IconActionButtonTagProcessor.PREFIX_COLOR,
|
||||
new IconActionButtonTagProcessor(IconActionButtonTagProcessor.PREFIX_COLOR));
|
||||
ATE.registerTagProcessor(IconActionButtonTagProcessor.PREFIX_COLOR_ACTIVATED,
|
||||
new IconActionButtonTagProcessor(IconActionButtonTagProcessor.PREFIX_COLOR_ACTIVATED));
|
||||
ATE.registerTagProcessor(IconActionButtonTagProcessor.PREFIX_COLOR_DISABLED,
|
||||
new IconActionButtonTagProcessor(IconActionButtonTagProcessor.PREFIX_COLOR_DISABLED));
|
||||
final SharedPreferences preferences = getSharedPreferences();
|
||||
if (!ATE.config(this, null).isConfigured()) {
|
||||
final int themeColor = preferences.getInt(KEY_THEME_COLOR, ContextCompat.getColor(this,
|
||||
R.color.branding_color));
|
||||
final int themeColor = preferences.getInt(KEY_THEME_COLOR, ContextCompat.getColor(this,
|
||||
R.color.branding_color));
|
||||
if (!ATE.config(this, VALUE_THEME_NAME_LIGHT).isConfigured()) {
|
||||
ATE.config(this, VALUE_THEME_NAME_LIGHT)
|
||||
.primaryColor(themeColor)
|
||||
.accentColor(themeColor)
|
||||
.coloredActionBar(true)
|
||||
.commit();
|
||||
}
|
||||
if (!ATE.config(this, VALUE_THEME_NAME_DARK).isConfigured()) {
|
||||
ATE.config(this, VALUE_THEME_NAME_DARK)
|
||||
.accentColor(themeColor)
|
||||
.coloredActionBar(false)
|
||||
|
@ -316,10 +323,12 @@ public class TwidereApplication extends Application implements Constants,
|
|||
.primaryColor(themeColor)
|
||||
.accentColor(themeColor)
|
||||
.coloredActionBar(true)
|
||||
.coloredStatusBar(true)
|
||||
.commit();
|
||||
ATE.config(this, VALUE_THEME_NAME_DARK)
|
||||
.accentColor(themeColor)
|
||||
.coloredActionBar(false)
|
||||
.coloredStatusBar(false)
|
||||
.commit();
|
||||
break;
|
||||
}
|
||||
|
@ -359,11 +368,6 @@ public class TwidereApplication extends Application implements Constants,
|
|||
}
|
||||
}
|
||||
|
||||
public ApplicationModule getApplicationModule() {
|
||||
if (mApplicationModule != null) return mApplicationModule;
|
||||
return mApplicationModule = new ApplicationModule(this);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static TwidereApplication getInstance() {
|
||||
return sInstance;
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
package org.mariotaku.twidere.util.theme;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.view.View;
|
||||
|
||||
import com.afollestad.appthemeengine.tagprocessors.TagProcessor;
|
||||
|
||||
import org.mariotaku.twidere.view.iface.IIconActionButton;
|
||||
|
||||
/**
|
||||
* Created by mariotaku on 16/3/19.
|
||||
*/
|
||||
public class IconActionButtonTagProcessor extends TagProcessor {
|
||||
|
||||
public static final String PREFIX_COLOR = "iab_color";
|
||||
public static final String PREFIX_COLOR_ACTIVATED = "iab_activated_color";
|
||||
public static final String PREFIX_COLOR_DISABLED = "iab_disabled_color";
|
||||
|
||||
@NonNull
|
||||
private final String mPrefix;
|
||||
|
||||
public IconActionButtonTagProcessor(@NonNull String prefix) {
|
||||
mPrefix = prefix;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTypeSupported(@NonNull View view) {
|
||||
return view instanceof IIconActionButton;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void process(@NonNull Context context, @Nullable String key, @NonNull View view, @NonNull String suffix) {
|
||||
final IIconActionButton iab = (IIconActionButton) view;
|
||||
final ColorResult colorResult = getColorFromSuffix(context, key, view, suffix);
|
||||
if (colorResult == null) return;
|
||||
switch (mPrefix) {
|
||||
case PREFIX_COLOR: {
|
||||
iab.setDefaultColor(colorResult.getColor());
|
||||
break;
|
||||
}
|
||||
case PREFIX_COLOR_ACTIVATED: {
|
||||
iab.setActivatedColor(colorResult.getColor());
|
||||
break;
|
||||
}
|
||||
case PREFIX_COLOR_DISABLED: {
|
||||
iab.setDisabledColor(colorResult.getColor());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,103 +0,0 @@
|
|||
package org.mariotaku.twidere.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Color;
|
||||
import android.support.annotation.ColorInt;
|
||||
import android.support.v4.view.ViewCompat;
|
||||
import android.support.v7.widget.AppCompatImageButton;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.util.ThemeUtils;
|
||||
|
||||
/**
|
||||
* Created by mariotaku on 14/11/5.
|
||||
*/
|
||||
public class ActionIconButton extends AppCompatImageButton {
|
||||
|
||||
@ColorInt
|
||||
private int mDefaultColor, mActivatedColor, mDisabledColor;
|
||||
|
||||
public ActionIconButton(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public ActionIconButton(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, R.attr.imageButtonStyle);
|
||||
}
|
||||
|
||||
public ActionIconButton(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.IconActionButton,
|
||||
R.attr.cardActionButtonStyle, R.style.Widget_CardActionButton);
|
||||
mDefaultColor = a.getColor(R.styleable.IconActionButton_iabColor, 0);
|
||||
mActivatedColor = a.getColor(R.styleable.IconActionButton_iabActivatedColor, 0);
|
||||
mDisabledColor = a.getColor(R.styleable.IconActionButton_iabDisabledColor, 0);
|
||||
a.recycle();
|
||||
updateColorFilter();
|
||||
}
|
||||
|
||||
@ColorInt
|
||||
public int getDefaultColor() {
|
||||
if (mDefaultColor == 0) {
|
||||
// Return inverse color for background tint
|
||||
ColorStateList color = ViewCompat.getBackgroundTintList(this);
|
||||
if (color != null) {
|
||||
final int currentColor = color.getColorForState(getDrawableState(), 0);
|
||||
return ThemeUtils.getContrastColor(currentColor, Color.BLACK, Color.WHITE);
|
||||
}
|
||||
}
|
||||
return mDefaultColor;
|
||||
}
|
||||
|
||||
@ColorInt
|
||||
public int getActivatedColor() {
|
||||
if (mActivatedColor != 0) return mActivatedColor;
|
||||
return getDefaultColor();
|
||||
}
|
||||
|
||||
@ColorInt
|
||||
public int getDisabledColor() {
|
||||
if (mDisabledColor != 0) return mDisabledColor;
|
||||
return getDefaultColor();
|
||||
}
|
||||
|
||||
public void setDefaultColor(@ColorInt int defaultColor) {
|
||||
mDefaultColor = defaultColor;
|
||||
updateColorFilter();
|
||||
}
|
||||
|
||||
public void setActivatedColor(@ColorInt int activatedColor) {
|
||||
mActivatedColor = activatedColor;
|
||||
updateColorFilter();
|
||||
}
|
||||
|
||||
public void setDisabledColor(@ColorInt int disabledColor) {
|
||||
mDisabledColor = disabledColor;
|
||||
updateColorFilter();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActivated(boolean activated) {
|
||||
super.setActivated(activated);
|
||||
updateColorFilter();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEnabled(boolean enabled) {
|
||||
super.setEnabled(enabled);
|
||||
updateColorFilter();
|
||||
}
|
||||
|
||||
private void updateColorFilter() {
|
||||
if (isActivated()) {
|
||||
setColorFilter(getActivatedColor());
|
||||
} else if (isEnabled()) {
|
||||
setColorFilter(getDefaultColor());
|
||||
} else {
|
||||
setColorFilter(getDisabledColor());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -30,11 +30,12 @@ import android.util.AttributeSet;
|
|||
|
||||
import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.util.support.TextViewSupport;
|
||||
import org.mariotaku.twidere.view.iface.IIconActionButton;
|
||||
|
||||
/**
|
||||
* Created by mariotaku on 14/11/20.
|
||||
*/
|
||||
public class ActionIconThemedTextView extends AppCompatTextView {
|
||||
public class ActionIconThemedTextView extends AppCompatTextView implements IIconActionButton {
|
||||
|
||||
private int mIconWidth, mIconHeight;
|
||||
@ColorInt
|
||||
|
@ -69,19 +70,22 @@ public class ActionIconThemedTextView extends AppCompatTextView {
|
|||
}
|
||||
|
||||
@ColorInt
|
||||
public int getColor() {
|
||||
@Override
|
||||
public int getDefaultColor() {
|
||||
if (mColor != 0) return mColor;
|
||||
final ColorStateList colors = getTextColors();
|
||||
if (colors != null) return colors.getDefaultColor();
|
||||
return getCurrentTextColor();
|
||||
}
|
||||
|
||||
public void setColor(@ColorInt int color) {
|
||||
@Override
|
||||
public void setDefaultColor(@ColorInt int color) {
|
||||
this.mColor = color;
|
||||
refreshDrawableState();
|
||||
}
|
||||
|
||||
@ColorInt
|
||||
@Override
|
||||
public int getActivatedColor() {
|
||||
if (mActivatedColor != 0) return mActivatedColor;
|
||||
final ColorStateList colors = getLinkTextColors();
|
||||
|
@ -89,12 +93,14 @@ public class ActionIconThemedTextView extends AppCompatTextView {
|
|||
return getCurrentTextColor();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActivatedColor(@ColorInt int color) {
|
||||
this.mActivatedColor = color;
|
||||
refreshDrawableState();
|
||||
}
|
||||
|
||||
@ColorInt
|
||||
@Override
|
||||
public int getDisabledColor() {
|
||||
if (mDisabledColor != 0) return mDisabledColor;
|
||||
final ColorStateList colors = getTextColors();
|
||||
|
@ -102,6 +108,7 @@ public class ActionIconThemedTextView extends AppCompatTextView {
|
|||
return getCurrentTextColor();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDisabledColor(@ColorInt int color) {
|
||||
this.mDisabledColor = color;
|
||||
refreshDrawableState();
|
||||
|
@ -121,7 +128,7 @@ public class ActionIconThemedTextView extends AppCompatTextView {
|
|||
if (isActivated()) {
|
||||
color = getActivatedColor();
|
||||
} else if (isEnabled()) {
|
||||
color = getColor();
|
||||
color = getDefaultColor();
|
||||
} else {
|
||||
color = getDisabledColor();
|
||||
}
|
||||
|
|
|
@ -1,49 +1,110 @@
|
|||
package org.mariotaku.twidere.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.PorterDuff.Mode;
|
||||
import android.graphics.Color;
|
||||
import android.support.annotation.ColorInt;
|
||||
import android.support.v4.view.ViewCompat;
|
||||
import android.support.v7.widget.AppCompatImageButton;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.ImageButton;
|
||||
|
||||
import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.util.ThemeUtils;
|
||||
import org.mariotaku.twidere.view.iface.IIconActionButton;
|
||||
|
||||
/**
|
||||
* Created by mariotaku on 14/11/5.
|
||||
*/
|
||||
public class IconActionButton extends ImageButton {
|
||||
public class IconActionButton extends AppCompatImageButton implements IIconActionButton {
|
||||
|
||||
private final int mColor, mActivatedColor;
|
||||
@ColorInt
|
||||
private int mDefaultColor, mActivatedColor, mDisabledColor;
|
||||
|
||||
public IconActionButton(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public IconActionButton(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
this(context, attrs, R.attr.imageButtonStyle);
|
||||
}
|
||||
|
||||
public IconActionButton(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
final TypedArray defaultValues = context.obtainStyledAttributes(
|
||||
new int[]{android.R.attr.colorForeground, android.R.attr.colorActivatedHighlight});
|
||||
final int defaultColor = defaultValues.getColor(0, 0);
|
||||
final int defaultActivatedColor = defaultValues.getColor(1, 0);
|
||||
defaultValues.recycle();
|
||||
final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.IconActionButton);
|
||||
mColor = a.getColor(R.styleable.IconActionButton_iabColor, defaultColor);
|
||||
mActivatedColor = a.getColor(R.styleable.IconActionButton_iabActivatedColor, defaultActivatedColor);
|
||||
final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.IconActionButton,
|
||||
R.attr.cardActionButtonStyle, R.style.Widget_CardActionButton);
|
||||
mDefaultColor = a.getColor(R.styleable.IconActionButton_iabColor, 0);
|
||||
mActivatedColor = a.getColor(R.styleable.IconActionButton_iabActivatedColor, 0);
|
||||
mDisabledColor = a.getColor(R.styleable.IconActionButton_iabDisabledColor, 0);
|
||||
a.recycle();
|
||||
updateColorFilter();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ColorInt
|
||||
public int getDefaultColor() {
|
||||
if (mDefaultColor == 0) {
|
||||
// Return inverse color for background tint
|
||||
ColorStateList color = ViewCompat.getBackgroundTintList(this);
|
||||
if (color != null) {
|
||||
final int currentColor = color.getColorForState(getDrawableState(), 0);
|
||||
return ThemeUtils.getContrastColor(currentColor, Color.BLACK, Color.WHITE);
|
||||
}
|
||||
}
|
||||
return mDefaultColor;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ColorInt
|
||||
public int getActivatedColor() {
|
||||
if (mActivatedColor != 0) return mActivatedColor;
|
||||
return getDefaultColor();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ColorInt
|
||||
public int getDisabledColor() {
|
||||
if (mDisabledColor != 0) return mDisabledColor;
|
||||
return getDefaultColor();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDefaultColor(@ColorInt int defaultColor) {
|
||||
mDefaultColor = defaultColor;
|
||||
updateColorFilter();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActivatedColor(@ColorInt int activatedColor) {
|
||||
mActivatedColor = activatedColor;
|
||||
updateColorFilter();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDisabledColor(@ColorInt int disabledColor) {
|
||||
mDisabledColor = disabledColor;
|
||||
updateColorFilter();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActivated(boolean activated) {
|
||||
super.setActivated(activated);
|
||||
updateColorFilter();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEnabled(boolean enabled) {
|
||||
super.setEnabled(enabled);
|
||||
updateColorFilter();
|
||||
}
|
||||
|
||||
private void updateColorFilter() {
|
||||
setColorFilter(isActivated() ? mActivatedColor : mColor, Mode.SRC_ATOP);
|
||||
if (isActivated()) {
|
||||
setColorFilter(getActivatedColor());
|
||||
} else if (isEnabled()) {
|
||||
setColorFilter(getDefaultColor());
|
||||
} else {
|
||||
setColorFilter(getDisabledColor());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,24 +11,25 @@ import android.util.AttributeSet;
|
|||
|
||||
import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.util.ThemeUtils;
|
||||
import org.mariotaku.twidere.view.iface.IIconActionButton;
|
||||
|
||||
/**
|
||||
* Created by mariotaku on 14/11/5.
|
||||
*/
|
||||
public class ActionIconView extends AppCompatImageView {
|
||||
public class IconActionView extends AppCompatImageView implements IIconActionButton {
|
||||
|
||||
@ColorInt
|
||||
private int mDefaultColor, mActivatedColor, mDisabledColor;
|
||||
|
||||
public ActionIconView(Context context) {
|
||||
public IconActionView(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public ActionIconView(Context context, AttributeSet attrs) {
|
||||
public IconActionView(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public ActionIconView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
public IconActionView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.IconActionButton,
|
||||
R.attr.cardActionButtonStyle, R.style.Widget_CardActionButton);
|
|
@ -23,17 +23,17 @@ import android.content.Context;
|
|||
import android.util.AttributeSet;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
public class SquareActionIconButton extends ActionIconButton {
|
||||
public class SquareIconActionButton extends IconActionButton {
|
||||
|
||||
public SquareActionIconButton(final Context context) {
|
||||
public SquareIconActionButton(final Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public SquareActionIconButton(final Context context, final AttributeSet attrs) {
|
||||
public SquareIconActionButton(final Context context, final AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public SquareActionIconButton(final Context context, final AttributeSet attrs, final int defStyle) {
|
||||
public SquareIconActionButton(final Context context, final AttributeSet attrs, final int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
}
|
||||
|
|
@ -37,7 +37,7 @@ import org.mariotaku.twidere.model.ParcelableActivity;
|
|||
import org.mariotaku.twidere.model.ParcelableUser;
|
||||
import org.mariotaku.twidere.model.util.ParcelableActivityUtils;
|
||||
import org.mariotaku.twidere.util.MediaLoaderWrapper;
|
||||
import org.mariotaku.twidere.view.ActionIconView;
|
||||
import org.mariotaku.twidere.view.IconActionView;
|
||||
import org.mariotaku.twidere.view.BadgeView;
|
||||
import org.mariotaku.twidere.view.ShortTimeView;
|
||||
import org.mariotaku.twidere.view.iface.IColorLabelView;
|
||||
|
@ -50,7 +50,7 @@ public class ActivityTitleSummaryViewHolder extends ViewHolder implements View.O
|
|||
private final IColorLabelView itemContent;
|
||||
|
||||
private final ParcelableActivitiesAdapter adapter;
|
||||
private final ActionIconView activityTypeView;
|
||||
private final IconActionView activityTypeView;
|
||||
private final TextView titleView;
|
||||
private final TextView summaryView;
|
||||
private final ShortTimeView timeView;
|
||||
|
@ -66,7 +66,7 @@ public class ActivityTitleSummaryViewHolder extends ViewHolder implements View.O
|
|||
this.adapter = adapter;
|
||||
|
||||
itemContent = (IColorLabelView) itemView.findViewById(R.id.item_content);
|
||||
activityTypeView = (ActionIconView) itemView.findViewById(R.id.activity_type);
|
||||
activityTypeView = (IconActionView) itemView.findViewById(R.id.activity_type);
|
||||
titleView = (TextView) itemView.findViewById(R.id.title);
|
||||
summaryView = (TextView) itemView.findViewById(R.id.summary);
|
||||
timeView = (ShortTimeView) itemView.findViewById(R.id.time);
|
||||
|
|
|
@ -34,7 +34,7 @@ import org.mariotaku.twidere.util.TwitterCardUtils;
|
|||
import org.mariotaku.twidere.util.UnitConvertUtils;
|
||||
import org.mariotaku.twidere.util.UserColorNameManager;
|
||||
import org.mariotaku.twidere.util.Utils;
|
||||
import org.mariotaku.twidere.view.ActionIconButton;
|
||||
import org.mariotaku.twidere.view.IconActionButton;
|
||||
import org.mariotaku.twidere.view.ActionIconThemedTextView;
|
||||
import org.mariotaku.twidere.view.CardMediaContainer;
|
||||
import org.mariotaku.twidere.view.ForegroundColorView;
|
||||
|
@ -69,7 +69,7 @@ public class StatusViewHolder extends ViewHolder implements Constants, IStatusVi
|
|||
private final TextView statusInfoLabel;
|
||||
private final ShortTimeView timeView;
|
||||
private final CardMediaContainer mediaPreview, quoteMediaPreview;
|
||||
private final ActionIconButton replyIconView, retweetIconView, favoriteIconView;
|
||||
private final IconActionButton replyIconView, retweetIconView, favoriteIconView;
|
||||
private final TextView replyCountView, retweetCountView, favoriteCountView;
|
||||
private final IColorLabelView itemContent;
|
||||
private final ForegroundColorView quoteIndicator;
|
||||
|
@ -111,9 +111,9 @@ public class StatusViewHolder extends ViewHolder implements Constants, IStatusVi
|
|||
itemMenu = itemView.findViewById(R.id.item_menu);
|
||||
actionButtons = itemView.findViewById(R.id.action_buttons);
|
||||
|
||||
replyIconView = (ActionIconButton) itemView.findViewById(R.id.reply_icon);
|
||||
retweetIconView = (ActionIconButton) itemView.findViewById(R.id.retweet_icon);
|
||||
favoriteIconView = (ActionIconButton) itemView.findViewById(R.id.favorite_icon);
|
||||
replyIconView = (IconActionButton) itemView.findViewById(R.id.reply_icon);
|
||||
retweetIconView = (IconActionButton) itemView.findViewById(R.id.retweet_icon);
|
||||
favoriteIconView = (IconActionButton) itemView.findViewById(R.id.favorite_icon);
|
||||
|
||||
replyCountView = (ActionIconThemedTextView) itemView.findViewById(R.id.reply_count);
|
||||
retweetCountView = (ActionIconThemedTextView) itemView.findViewById(R.id.retweet_count);
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
package org.mariotaku.twidere.view.iface;
|
||||
|
||||
import android.support.annotation.ColorInt;
|
||||
|
||||
/**
|
||||
* Created by mariotaku on 16/3/19.
|
||||
*/
|
||||
public interface IIconActionButton {
|
||||
@ColorInt
|
||||
int getDefaultColor();
|
||||
|
||||
@ColorInt
|
||||
int getActivatedColor();
|
||||
|
||||
@ColorInt
|
||||
int getDisabledColor();
|
||||
|
||||
void setDefaultColor(@ColorInt int defaultColor);
|
||||
|
||||
void setActivatedColor(@ColorInt int activatedColor);
|
||||
|
||||
void setDisabledColor(@ColorInt int disabledColor);
|
||||
}
|
|
@ -90,14 +90,16 @@
|
|||
android:orientation="horizontal"
|
||||
android:padding="@dimen/element_spacing_normal">
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconView
|
||||
<org.mariotaku.twidere.view.IconActionView
|
||||
android:id="@+id/location_icon"
|
||||
android:layout_width="@dimen/element_size_small"
|
||||
android:layout_height="@dimen/element_size_small"
|
||||
android:layout_marginLeft="@dimen/element_spacing_normal"
|
||||
android:layout_marginRight="@dimen/element_spacing_normal"
|
||||
android:color="?android:textColorSecondary"
|
||||
android:src="@drawable/ic_action_location"/>
|
||||
android:src="@drawable/ic_action_location"
|
||||
android:tag="iab_activated_color|accent_color"
|
||||
app:iabActivatedColor="?colorAccent"
|
||||
app:iabColor="?android:textColorSecondary"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/location_text"
|
||||
|
@ -236,7 +238,7 @@
|
|||
android:textAppearance="?android:textAppearanceSmall"
|
||||
tools:text="140"/>
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconView
|
||||
<org.mariotaku.twidere.view.IconActionView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:color="?android:textColorSecondary"
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
<requestFocus/>
|
||||
</EditText>
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconButton
|
||||
<org.mariotaku.twidere.view.IconActionButton
|
||||
android:id="@+id/search_submit"
|
||||
android:layout_width="@dimen/element_size_normal"
|
||||
android:layout_height="match_parent"
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/element_spacing_normal">
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconView
|
||||
<org.mariotaku.twidere.view.IconActionView
|
||||
android:id="@+id/activity_type"
|
||||
android:layout_width="@dimen/element_size_small"
|
||||
android:layout_height="@dimen/element_size_small"
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
android:layout_marginStart="@dimen/element_spacing_normal"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconView
|
||||
<org.mariotaku.twidere.view.IconActionView
|
||||
android:id="@+id/status_info_icon"
|
||||
style="?profileImageStyle"
|
||||
android:layout_width="@dimen/element_size_small"
|
||||
|
@ -167,7 +167,7 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconView
|
||||
<org.mariotaku.twidere.view.IconActionView
|
||||
android:id="@+id/extra_type"
|
||||
android:layout_width="@dimen/element_size_small"
|
||||
android:layout_height="@dimen/element_size_small"
|
||||
|
@ -315,7 +315,7 @@
|
|||
android:paddingLeft="@dimen/element_spacing_small"
|
||||
android:paddingRight="@dimen/element_spacing_small">
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconButton
|
||||
<org.mariotaku.twidere.view.IconActionButton
|
||||
android:id="@+id/reply_icon"
|
||||
android:layout_width="@dimen/button_size_content_card"
|
||||
android:layout_height="@dimen/button_size_content_card"
|
||||
|
@ -337,7 +337,7 @@
|
|||
android:textAppearance="?android:textAppearanceSmall"
|
||||
tools:text="255"/>
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconButton
|
||||
<org.mariotaku.twidere.view.IconActionButton
|
||||
android:id="@+id/retweet_icon"
|
||||
android:layout_width="@dimen/button_size_content_card"
|
||||
android:layout_height="@dimen/button_size_content_card"
|
||||
|
@ -359,7 +359,7 @@
|
|||
android:textAppearance="?android:textAppearanceSmall"
|
||||
tools:text="255"/>
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconButton
|
||||
<org.mariotaku.twidere.view.IconActionButton
|
||||
android:id="@+id/favorite_icon"
|
||||
android:layout_width="@dimen/button_size_content_card"
|
||||
android:layout_height="@dimen/button_size_content_card"
|
||||
|
@ -383,7 +383,7 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconButton
|
||||
<org.mariotaku.twidere.view.IconActionButton
|
||||
android:id="@+id/item_menu"
|
||||
style="?cardActionButtonStyle"
|
||||
android:layout_width="@dimen/element_size_normal"
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
android:paddingLeft="@dimen/element_spacing_normal"
|
||||
android:paddingRight="@dimen/element_spacing_normal">
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconView
|
||||
<org.mariotaku.twidere.view.IconActionView
|
||||
android:id="@+id/status_info_icon"
|
||||
style="?profileImageStyle"
|
||||
android:layout_width="@dimen/element_size_small"
|
||||
|
@ -143,7 +143,7 @@
|
|||
tools:text="42 mins ago"
|
||||
tools:textSize="@dimen/text_size_extra_small"/>
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconView
|
||||
<org.mariotaku.twidere.view.IconActionView
|
||||
android:id="@+id/extra_type"
|
||||
android:layout_width="@dimen/element_size_small"
|
||||
android:layout_height="@dimen/element_size_small"
|
||||
|
@ -274,7 +274,7 @@
|
|||
android:orientation="horizontal"
|
||||
tools:visibility="visible">
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconButton
|
||||
<org.mariotaku.twidere.view.IconActionButton
|
||||
android:id="@+id/reply_icon"
|
||||
android:layout_width="@dimen/button_size_content_card_compact"
|
||||
android:layout_height="@dimen/button_size_content_card_compact"
|
||||
|
@ -298,7 +298,7 @@
|
|||
android:textAppearance="?android:textAppearanceSmall"
|
||||
tools:text="255"/>
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconButton
|
||||
<org.mariotaku.twidere.view.IconActionButton
|
||||
android:id="@+id/retweet_icon"
|
||||
android:layout_width="@dimen/button_size_content_card_compact"
|
||||
android:layout_height="@dimen/button_size_content_card_compact"
|
||||
|
@ -322,7 +322,7 @@
|
|||
android:textAppearance="?android:textAppearanceSmall"
|
||||
tools:text="255"/>
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconButton
|
||||
<org.mariotaku.twidere.view.IconActionButton
|
||||
android:id="@+id/favorite_icon"
|
||||
android:layout_width="@dimen/button_size_content_card_compact"
|
||||
android:layout_height="@dimen/button_size_content_card_compact"
|
||||
|
@ -348,7 +348,7 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconButton
|
||||
<org.mariotaku.twidere.view.IconActionButton
|
||||
android:id="@+id/item_menu"
|
||||
style="?cardActionButtonStyle"
|
||||
android:layout_width="@dimen/button_size_content_card_compact"
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
android:orientation="horizontal"
|
||||
tools:visibility="visible">
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconButton
|
||||
<org.mariotaku.twidere.view.IconActionButton
|
||||
android:id="@+id/follow"
|
||||
style="?buttonStyleSmall"
|
||||
android:layout_width="@dimen/button_size_content_card"
|
||||
|
@ -114,7 +114,7 @@
|
|||
app:backgroundTint="@color/color_stateful_follow"
|
||||
app:iabColor="@android:color/transparent"/>
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconButton
|
||||
<org.mariotaku.twidere.view.IconActionButton
|
||||
android:id="@+id/accept_request"
|
||||
style="?buttonStyleSmall"
|
||||
android:layout_width="@dimen/button_size_content_card"
|
||||
|
@ -124,7 +124,7 @@
|
|||
app:backgroundTint="@color/material_light_green"
|
||||
app:iabColor="@android:color/transparent"/>
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconButton
|
||||
<org.mariotaku.twidere.view.IconActionButton
|
||||
android:id="@+id/deny_request"
|
||||
style="?buttonStyleSmall"
|
||||
android:layout_width="@dimen/button_size_content_card"
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
android:paddingRight="@dimen/element_spacing_normal"
|
||||
tools:text="140"/>
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconButton
|
||||
<org.mariotaku.twidere.view.IconActionButton
|
||||
android:id="@+id/comment_menu"
|
||||
style="?cardActionButtonStyle"
|
||||
android:layout_width="@dimen/element_size_normal"
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
android:orientation="vertical"
|
||||
tools:visibility="visible">
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconView
|
||||
<org.mariotaku.twidere.view.IconActionView
|
||||
android:id="@+id/empty_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
android:padding="@dimen/element_spacing_normal"
|
||||
tools:ignore="UnusedAttribute">
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconView
|
||||
<org.mariotaku.twidere.view.IconActionView
|
||||
android:id="@+id/add_image"
|
||||
android:layout_width="@dimen/element_size_normal"
|
||||
android:layout_height="@dimen/element_size_normal"
|
||||
|
@ -78,7 +78,7 @@
|
|||
android:scaleType="centerInside"
|
||||
android:src="@drawable/ic_action_gallery"/>
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconView
|
||||
<org.mariotaku.twidere.view.IconActionView
|
||||
android:id="@+id/send"
|
||||
android:layout_width="@dimen/element_size_normal"
|
||||
android:layout_height="@dimen/element_size_normal"
|
||||
|
@ -162,7 +162,7 @@
|
|||
android:paddingLeft="@dimen/element_spacing_normal"
|
||||
android:paddingRight="@dimen/element_spacing_normal">
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconView
|
||||
<org.mariotaku.twidere.view.IconActionView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:color="?android:textColorSecondary"
|
||||
|
|
|
@ -189,7 +189,7 @@
|
|||
android:orientation="horizontal"
|
||||
android:padding="@dimen/element_spacing_small">
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconView
|
||||
<org.mariotaku.twidere.view.IconActionView
|
||||
android:layout_width="@dimen/element_size_small"
|
||||
android:layout_height="@dimen/element_size_small"
|
||||
android:color="?android:textColorPrimary"
|
||||
|
@ -217,7 +217,7 @@
|
|||
android:orientation="horizontal"
|
||||
android:padding="@dimen/element_spacing_small">
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconView
|
||||
<org.mariotaku.twidere.view.IconActionView
|
||||
android:layout_width="@dimen/element_size_small"
|
||||
android:layout_height="@dimen/element_size_small"
|
||||
android:color="?android:textColorPrimary"
|
||||
|
@ -246,7 +246,7 @@
|
|||
android:orientation="horizontal"
|
||||
android:padding="@dimen/element_spacing_small">
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconView
|
||||
<org.mariotaku.twidere.view.IconActionView
|
||||
android:layout_width="@dimen/element_size_small"
|
||||
android:layout_height="@dimen/element_size_small"
|
||||
android:color="?android:textColorPrimary"
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
android:text="@string/api_url_format"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"/>
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconView
|
||||
<org.mariotaku.twidere.view.IconActionView
|
||||
android:id="@+id/api_url_format_help"
|
||||
android:layout_width="@dimen/element_size_small"
|
||||
android:layout_height="@dimen/element_size_small"
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconView
|
||||
<org.mariotaku.twidere.view.IconActionView
|
||||
android:id="@+id/error_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
android:orientation="vertical"
|
||||
android:padding="@dimen/element_spacing_large">
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconView
|
||||
<org.mariotaku.twidere.view.IconActionView
|
||||
android:id="@+id/pages_error_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
android:orientation="vertical"
|
||||
tools:visibility="visible">
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconView
|
||||
<org.mariotaku.twidere.view.IconActionView
|
||||
android:id="@+id/empty_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconView
|
||||
<org.mariotaku.twidere.view.IconActionView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:color="?android:textColorSecondary"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
android:minHeight="?listPreferredItemHeightSmall"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconView
|
||||
<org.mariotaku.twidere.view.IconActionView
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="@dimen/header_icon_width"
|
||||
android:layout_height="@dimen/header_icon_width"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
android:orientation="horizontal"
|
||||
android:padding="@dimen/element_spacing_small">
|
||||
|
||||
<org.mariotaku.twidere.view.SquareActionIconButton
|
||||
<org.mariotaku.twidere.view.SquareIconActionButton
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
|
@ -61,7 +61,7 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<org.mariotaku.twidere.view.SquareActionIconButton
|
||||
<org.mariotaku.twidere.view.SquareIconActionButton
|
||||
android:id="@+id/edit_query"
|
||||
android:layout_width="@dimen/element_size_normal"
|
||||
android:layout_height="match_parent"
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconButton
|
||||
<org.mariotaku.twidere.view.IconActionButton
|
||||
android:id="@+id/settings"
|
||||
android:layout_width="@dimen/element_size_normal"
|
||||
android:layout_height="@dimen/element_size_normal"
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
<!-- Widget styles -->
|
||||
<item name="android:listSeparatorTextViewStyle">@style/Widget.Light.TextView.ListSeparator
|
||||
</item>
|
||||
<item name="android:panelColorBackground">#e5e5e5</item>
|
||||
|
||||
<!-- Card UI styles -->
|
||||
<item name="cardActionButtonStyle">@style/Widget.Light.CardActionButton</item>
|
||||
|
@ -79,49 +80,4 @@
|
|||
<item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Material</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="Theme.Twidere.Compose" parent="Theme.Twidere.Dialog">
|
||||
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowActionModeOverlay">false</item>
|
||||
|
||||
<item name="android:actionModeStyle">@style/Widget.Twidere.ActionMode.Light</item>
|
||||
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:panelColorBackground">#e5e5e5</item>
|
||||
<item name="android:dividerVertical">@drawable/divider_compose_vertical_light</item>
|
||||
<item name="android:windowActionBarOverlay">false</item>
|
||||
<item name="android:windowActionModeOverlay">false</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="Theme.Twidere.QuickSearchBar" parent="Theme.Twidere.Dialog">
|
||||
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="windowActionModeOverlay">false</item>
|
||||
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item>
|
||||
<item name="android:windowMinWidthMinor">100%</item>
|
||||
<item name="android:windowActionBarOverlay">false</item>
|
||||
<item name="android:windowActionModeOverlay">false</item>
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<style name="Theme.Twidere.NoDisplay" parent="Theme.Twidere.Dialog">
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<!--<item name="android:backgroundDimEnabled">false</item>-->
|
||||
<item name="android:windowFrame">@null</item>
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
<item name="android:windowAnimationStyle">@null</item>
|
||||
<item name="android:windowDisablePreview">true</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowTitleStyle">@style/Widget.TextView.WindowTitle.NoDisplay</item>
|
||||
<!--<item name="android:windowNoDisplay">true</item>-->
|
||||
</style>
|
||||
|
||||
</resources>
|
|
@ -66,6 +66,7 @@
|
|||
<!-- Widget styles -->
|
||||
<item name="android:listSeparatorTextViewStyle">@style/Widget.Dark.TextView.ListSeparator
|
||||
</item>
|
||||
<item name="android:panelColorBackground">#3c3c3c</item>
|
||||
|
||||
<!-- Card UI styles -->
|
||||
<item name="cardActionButtonStyle">@style/Widget.CardActionButton</item>
|
||||
|
@ -89,20 +90,21 @@
|
|||
|
||||
<style name="Theme.Twidere.Compose" parent="Theme.Twidere.Dialog">
|
||||
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowActionModeOverlay">false</item>
|
||||
|
||||
<item name="android:actionModeStyle">@style/Widget.Twidere.ActionMode.Dark</item>
|
||||
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:panelColorBackground">#3c3c3c</item>
|
||||
<item name="android:dividerVertical">@drawable/divider_compose_vertical_dark</item>
|
||||
<item name="android:windowActionBarOverlay">false</item>
|
||||
<item name="android:windowActionModeOverlay">false</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="Theme.Twidere.QuickSearchBar" parent="Theme.Twidere.Dialog">
|
||||
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="windowActionModeOverlay">false</item>
|
||||
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item>
|
||||
|
@ -110,14 +112,10 @@
|
|||
<item name="android:windowActionBarOverlay">false</item>
|
||||
<item name="android:windowActionModeOverlay">false</item>
|
||||
|
||||
<!-- ATE attributes -->
|
||||
<item name="ateThemeKey">dark</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="Theme.Twidere.NoDisplay" parent="Theme.Twidere.Dialog">
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<!--<item name="android:backgroundDimEnabled">false</item>-->
|
||||
<item name="android:windowFrame">@null</item>
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
|
@ -125,10 +123,6 @@
|
|||
<item name="android:windowDisablePreview">true</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowTitleStyle">@style/Widget.TextView.WindowTitle.NoDisplay</item>
|
||||
|
||||
<!-- ATE attributes -->
|
||||
<item name="ateThemeKey">dark</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="Theme.Twidere.Viewer" parent="Theme.AppCompat">
|
||||
|
|
Loading…
Reference in New Issue