diff options
author | Alex Ning <chineseperson5@gmail.com> | 2021-07-14 14:54:20 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2021-07-14 14:54:20 +0000 |
commit | 212a91d73bde3379b4f48ba85d5d0c1bc71ce492 (patch) | |
tree | 283bd6c25f1d5d53fe51c87f915b00119e375f5d /app | |
parent | 04624a1f13e5714b385f964147f7c6e8a8fdfe25 (diff) | |
download | infinity-for-reddit-212a91d73bde3379b4f48ba85d5d0c1bc71ce492.tar infinity-for-reddit-212a91d73bde3379b4f48ba85d5d0c1bc71ce492.tar.gz infinity-for-reddit-212a91d73bde3379b4f48ba85d5d0c1bc71ce492.tar.bz2 infinity-for-reddit-212a91d73bde3379b4f48ba85d5d0c1bc71ce492.tar.lz infinity-for-reddit-212a91d73bde3379b4f48ba85d5d0c1bc71ce492.tar.xz infinity-for-reddit-212a91d73bde3379b4f48ba85d5d0c1bc71ce492.tar.zst infinity-for-reddit-212a91d73bde3379b4f48ba85d5d0c1bc71ce492.zip |
Use MaterialButton in PostXXXActivity.
Diffstat (limited to '')
8 files changed, 18 insertions, 21 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostImageActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostImageActivity.java index 50118777..8fa24042 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostImageActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostImageActivity.java @@ -2,7 +2,6 @@ package ml.docilealligator.infinityforreddit.activities; import android.content.Intent; import android.content.SharedPreferences; -import android.content.res.ColorStateList; import android.content.res.Resources; import android.net.Uri; import android.os.Build; @@ -13,7 +12,6 @@ import android.provider.MediaStore; import android.view.Menu; import android.view.MenuItem; import android.view.View; -import android.widget.Button; import android.widget.EditText; import android.widget.ImageView; import android.widget.LinearLayout; @@ -31,6 +29,7 @@ import com.bumptech.glide.Glide; import com.bumptech.glide.RequestManager; import com.bumptech.glide.request.RequestOptions; import com.google.android.material.appbar.AppBarLayout; +import com.google.android.material.button.MaterialButton; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.google.android.material.floatingactionbutton.FloatingActionButton; import com.google.android.material.snackbar.Snackbar; @@ -95,7 +94,7 @@ public class PostImageActivity extends BaseActivity implements FlairBottomSheetF @BindView(R.id.subreddit_name_text_view_post_image_activity) TextView subredditNameTextView; @BindView(R.id.rules_button_post_image_activity) - Button rulesButton; + MaterialButton rulesButton; @BindView(R.id.divider_1_post_image_activity) View divider1; @BindView(R.id.flair_custom_text_view_post_image_activity) @@ -394,7 +393,7 @@ public class PostImageActivity extends BaseActivity implements FlairBottomSheetF int secondaryTextColor = mCustomThemeWrapper.getSecondaryTextColor(); subredditNameTextView.setTextColor(secondaryTextColor); rulesButton.setTextColor(mCustomThemeWrapper.getButtonTextColor()); - rulesButton.setBackgroundTintList(ColorStateList.valueOf(mCustomThemeWrapper.getColorPrimaryLightTheme())); + rulesButton.setBackgroundColor(mCustomThemeWrapper.getColorPrimaryLightTheme()); primaryTextColor = mCustomThemeWrapper.getPrimaryTextColor(); receivePostReplyNotificationsTextView.setTextColor(primaryTextColor); int dividerColor = mCustomThemeWrapper.getDividerColor(); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostLinkActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostLinkActivity.java index a6b24027..101dcfa1 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostLinkActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostLinkActivity.java @@ -2,7 +2,6 @@ package ml.docilealligator.infinityforreddit.activities; import android.content.Intent; import android.content.SharedPreferences; -import android.content.res.ColorStateList; import android.content.res.Resources; import android.os.Build; import android.os.Bundle; @@ -10,7 +9,6 @@ import android.os.Handler; import android.view.Menu; import android.view.MenuItem; import android.view.View; -import android.widget.Button; import android.widget.EditText; import android.widget.LinearLayout; import android.widget.TextView; @@ -91,7 +89,7 @@ public class PostLinkActivity extends BaseActivity implements FlairBottomSheetFr @BindView(R.id.subreddit_name_text_view_post_link_activity) TextView subredditNameTextView; @BindView(R.id.rules_button_post_link_activity) - Button rulesButton; + MaterialButton rulesButton; @BindView(R.id.divider_1_post_link_activity) View divider1; @BindView(R.id.divider_2_post_link_activity) @@ -368,7 +366,7 @@ public class PostLinkActivity extends BaseActivity implements FlairBottomSheetFr int secondaryTextColor = mCustomThemeWrapper.getSecondaryTextColor(); subredditNameTextView.setTextColor(secondaryTextColor); rulesButton.setTextColor(mCustomThemeWrapper.getButtonTextColor()); - rulesButton.setBackgroundTintList(ColorStateList.valueOf(mCustomThemeWrapper.getColorPrimaryLightTheme())); + rulesButton.setBackgroundColor(mCustomThemeWrapper.getColorPrimaryLightTheme()); primaryTextColor = mCustomThemeWrapper.getPrimaryTextColor(); receivePostReplyNotificationsTextView.setTextColor(primaryTextColor); int dividerColor = mCustomThemeWrapper.getDividerColor(); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostTextActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostTextActivity.java index 17fe8011..cf0758f7 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostTextActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostTextActivity.java @@ -3,7 +3,6 @@ package ml.docilealligator.infinityforreddit.activities; import android.content.ActivityNotFoundException; import android.content.Intent; import android.content.SharedPreferences; -import android.content.res.ColorStateList; import android.content.res.Resources; import android.net.Uri; import android.os.Build; @@ -14,7 +13,6 @@ import android.provider.MediaStore; import android.view.Menu; import android.view.MenuItem; import android.view.View; -import android.widget.Button; import android.widget.EditText; import android.widget.LinearLayout; import android.widget.TextView; @@ -33,6 +31,7 @@ import com.bumptech.glide.Glide; import com.bumptech.glide.RequestManager; import com.bumptech.glide.request.RequestOptions; import com.google.android.material.appbar.AppBarLayout; +import com.google.android.material.button.MaterialButton; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.google.android.material.snackbar.Snackbar; import com.google.android.material.switchmaterial.SwitchMaterial; @@ -104,7 +103,7 @@ public class PostTextActivity extends BaseActivity implements FlairBottomSheetFr @BindView(R.id.subreddit_name_text_view_post_text_activity) TextView subredditNameTextView; @BindView(R.id.rules_button_post_text_activity) - Button rulesButton; + MaterialButton rulesButton; @BindView(R.id.divider_1_post_text_activity) View divider1; @BindView(R.id.flair_custom_text_view_post_text_activity) @@ -389,7 +388,7 @@ public class PostTextActivity extends BaseActivity implements FlairBottomSheetFr int secondaryTextColor = mCustomThemeWrapper.getSecondaryTextColor(); subredditNameTextView.setTextColor(secondaryTextColor); rulesButton.setTextColor(mCustomThemeWrapper.getButtonTextColor()); - rulesButton.setBackgroundTintList(ColorStateList.valueOf(mCustomThemeWrapper.getColorPrimaryLightTheme())); + rulesButton.setBackgroundColor(mCustomThemeWrapper.getColorPrimaryLightTheme()); primaryTextColor = mCustomThemeWrapper.getPrimaryTextColor(); receivePostReplyNotificationsTextView.setTextColor(primaryTextColor); int dividerColor = mCustomThemeWrapper.getDividerColor(); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostVideoActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostVideoActivity.java index 1465f7e8..d990fc1a 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostVideoActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostVideoActivity.java @@ -2,7 +2,6 @@ package ml.docilealligator.infinityforreddit.activities; import android.content.Intent; import android.content.SharedPreferences; -import android.content.res.ColorStateList; import android.content.res.Resources; import android.net.Uri; import android.os.Build; @@ -12,7 +11,6 @@ import android.provider.MediaStore; import android.view.Menu; import android.view.MenuItem; import android.view.View; -import android.widget.Button; import android.widget.EditText; import android.widget.LinearLayout; import android.widget.TextView; @@ -36,6 +34,7 @@ import com.google.android.exoplayer2.upstream.DataSource; import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory; import com.google.android.exoplayer2.util.Util; import com.google.android.material.appbar.AppBarLayout; +import com.google.android.material.button.MaterialButton; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.google.android.material.floatingactionbutton.FloatingActionButton; import com.google.android.material.snackbar.Snackbar; @@ -97,7 +96,7 @@ public class PostVideoActivity extends BaseActivity implements FlairBottomSheetF @BindView(R.id.subreddit_name_text_view_post_video_activity) TextView subredditNameTextView; @BindView(R.id.rules_button_post_video_activity) - Button rulesButton; + MaterialButton rulesButton; @BindView(R.id.divider_1_post_video_activity) View divider1; @BindView(R.id.flair_custom_text_view_post_video_activity) @@ -400,7 +399,7 @@ public class PostVideoActivity extends BaseActivity implements FlairBottomSheetF int secondaryTextColor = mCustomThemeWrapper.getSecondaryTextColor(); subredditNameTextView.setTextColor(secondaryTextColor); rulesButton.setTextColor(mCustomThemeWrapper.getButtonTextColor()); - rulesButton.setBackgroundTintList(ColorStateList.valueOf(mCustomThemeWrapper.getColorPrimaryLightTheme())); + rulesButton.setBackgroundColor(mCustomThemeWrapper.getColorPrimaryLightTheme()); primaryTextColor = mCustomThemeWrapper.getPrimaryTextColor(); receivePostReplyNotificationsTextView.setTextColor(primaryTextColor); int dividerColor = mCustomThemeWrapper.getDividerColor(); diff --git a/app/src/main/res/layout/activity_post_image.xml b/app/src/main/res/layout/activity_post_image.xml index e8ec15e1..2e66a7ea 100644 --- a/app/src/main/res/layout/activity_post_image.xml +++ b/app/src/main/res/layout/activity_post_image.xml @@ -61,7 +61,7 @@ android:textSize="?attr/font_default" android:fontFamily="?attr/font_family" /> - <Button + <com.google.android.material.button.MaterialButton android:id="@+id/rules_button_post_image_activity" android:layout_width="wrap_content" android:layout_height="wrap_content" diff --git a/app/src/main/res/layout/activity_post_link.xml b/app/src/main/res/layout/activity_post_link.xml index d92fec7b..427b8306 100644 --- a/app/src/main/res/layout/activity_post_link.xml +++ b/app/src/main/res/layout/activity_post_link.xml @@ -61,7 +61,7 @@ android:textSize="?attr/font_default" android:fontFamily="?attr/font_family" /> - <Button + <com.google.android.material.button.MaterialButton android:id="@+id/rules_button_post_link_activity" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -195,7 +195,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" - android:text="@string/suggest_title" /> + android:text="@string/suggest_title" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" /> </LinearLayout> diff --git a/app/src/main/res/layout/activity_post_text.xml b/app/src/main/res/layout/activity_post_text.xml index 043343ce..f18bf667 100644 --- a/app/src/main/res/layout/activity_post_text.xml +++ b/app/src/main/res/layout/activity_post_text.xml @@ -67,7 +67,7 @@ android:textSize="?attr/font_default" android:fontFamily="?attr/font_family" /> - <Button + <com.google.android.material.button.MaterialButton android:id="@+id/rules_button_post_text_activity" android:layout_width="wrap_content" android:layout_height="wrap_content" diff --git a/app/src/main/res/layout/activity_post_video.xml b/app/src/main/res/layout/activity_post_video.xml index 4e54d3a5..e1c297cb 100644 --- a/app/src/main/res/layout/activity_post_video.xml +++ b/app/src/main/res/layout/activity_post_video.xml @@ -61,7 +61,7 @@ android:textSize="?attr/font_default" android:fontFamily="?attr/font_family" /> - <Button + <com.google.android.material.button.MaterialButton android:id="@+id/rules_button_post_video_activity" android:layout_width="wrap_content" android:layout_height="wrap_content" |