diff options
Diffstat (limited to 'app')
10 files changed, 40 insertions, 39 deletions
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 210a9216..9d4280ec 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -50,7 +50,7 @@ </activity> <activity android:name=".SettingsActivity" - android:label="@string/search_activity_label" + android:label="@string/settings_activity_label" android:parentActivityName=".MainActivity" android:theme="@style/PreferenceActivityTheme" /> <activity diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/MainActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/MainActivity.java index 38cf5cc0..4e2a53d2 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/MainActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/MainActivity.java @@ -176,7 +176,6 @@ public class MainActivity extends AppCompatActivity implements SortTypeBottomShe ButterKnife.bind(this); - EventBus.getDefault().register(this); getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewSubredditDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewSubredditDetailActivity.java index f567349f..d6b4fbb9 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewSubredditDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewSubredditDetailActivity.java @@ -381,6 +381,11 @@ public class ViewSubredditDetailActivity extends AppCompatActivity implements So } subscribeSubredditChip.setOnClickListener(view -> { + if(mAccessToken == null) { + Toast.makeText(ViewSubredditDetailActivity.this, R.string.login_first, Toast.LENGTH_SHORT).show(); + return; + } + if(subscriptionReady) { subscriptionReady = false; if(subscribeSubredditChip.getText().equals(getResources().getString(R.string.subscribe))) { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewUserDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewUserDetailActivity.java index d57e57f8..805c5af5 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewUserDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewUserDetailActivity.java @@ -311,6 +311,11 @@ public class ViewUserDetailActivity extends AppCompatActivity implements UserThi if (userData.isCanBeFollowed()) { subscribeUserChip.setVisibility(View.VISIBLE); subscribeUserChip.setOnClickListener(view -> { + if(mAccessToken == null) { + Toast.makeText(ViewUserDetailActivity.this, R.string.login_first, Toast.LENGTH_SHORT).show(); + return; + } + if (subscriptionReady) { subscriptionReady = false; if (subscribeUserChip.getText().equals(resources.getString(R.string.follow))) { diff --git a/app/src/main/res/layout/activity_search.xml b/app/src/main/res/layout/activity_search.xml index 15c3ba9e..d83a52ea 100644 --- a/app/src/main/res/layout/activity_search.xml +++ b/app/src/main/res/layout/activity_search.xml @@ -11,42 +11,33 @@ android:layout_height="wrap_content" android:theme="@style/AppTheme.AppBarOverlay"> - <com.google.android.material.appbar.CollapsingToolbarLayout - android:id="@+id/collapsing_toolbar_layout_search_activity" + <FrameLayout + android:id="@+id/toolbar_frame_layout_search_activity" android:layout_width="match_parent" - android:layout_height="match_parent" - app:titleEnabled="false" - app:toolbarId="@+id/toolbar"> + android:layout_height="wrap_content"> - <FrameLayout - android:id="@+id/toolbar_frame_layout_search_activity" + <androidx.appcompat.widget.Toolbar + android:id="@+id/toolbar" android:layout_width="match_parent" - android:layout_height="wrap_content"> + android:layout_height="?attr/actionBarSize" + app:navigationIcon="?attr/homeAsUpIndicator" + app:popupTheme="@style/AppTheme.PopupOverlay" /> - <androidx.appcompat.widget.Toolbar - android:id="@+id/toolbar" - android:layout_width="match_parent" - android:layout_height="?attr/actionBarSize" - app:navigationIcon="?attr/homeAsUpIndicator" - app:popupTheme="@style/AppTheme.PopupOverlay" /> - - <com.ferfalk.simplesearchview.SimpleSearchView - android:id="@+id/search_view_search_activity" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:textColor="@android:color/white" - app:backIconAlpha="1" - app:backIconTint="@android:color/white" - app:cursorColor="@android:color/white" - app:hintColor="#E0E0E0" - app:iconsAlpha="1" - app:iconsTint="@android:color/white" - app:searchBackground="@color/colorPrimary" - app:voiceSearch="true" /> - - </FrameLayout> + <com.ferfalk.simplesearchview.SimpleSearchView + android:id="@+id/search_view_search_activity" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:textColor="@android:color/white" + app:backIconAlpha="1" + app:backIconTint="@android:color/white" + app:cursorColor="@android:color/white" + app:hintColor="#E0E0E0" + app:iconsAlpha="1" + app:iconsTint="@android:color/white" + app:searchBackground="@color/colorPrimary" + app:voiceSearch="true" /> - </com.google.android.material.appbar.CollapsingToolbarLayout> + </FrameLayout> </com.google.android.material.appbar.AppBarLayout> diff --git a/app/src/main/res/layout/activity_search_result.xml b/app/src/main/res/layout/activity_search_result.xml index ca7c4e84..839820c6 100644 --- a/app/src/main/res/layout/activity_search_result.xml +++ b/app/src/main/res/layout/activity_search_result.xml @@ -26,7 +26,6 @@ android:id="@+id/toolbar_search_result_activity" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" - android:background="?attr/colorPrimary" app:popupTheme="@style/AppTheme.PopupOverlay" /> <com.ferfalk.simplesearchview.SimpleSearchView @@ -51,7 +50,7 @@ android:id="@+id/tab_layout_search_result_activity" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@color/colorPrimary" + android:background="@color/greyTabBackgroundColor" app:layout_scrollFlags="scroll|enterAlways" app:tabGravity="fill" app:tabMode="fixed" diff --git a/app/src/main/res/layout/app_bar_main.xml b/app/src/main/res/layout/app_bar_main.xml index 5a0f4287..b834c1ff 100644 --- a/app/src/main/res/layout/app_bar_main.xml +++ b/app/src/main/res/layout/app_bar_main.xml @@ -25,7 +25,6 @@ android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" - android:background="?attr/colorPrimary" app:layout_collapseMode="pin" app:layout_scrollFlags="scroll|enterAlways" app:popupTheme="@style/AppTheme.PopupOverlay" /> @@ -37,7 +36,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" - android:background="@color/colorPrimary" + android:background="@color/greyTabBackgroundColor" app:layout_scrollFlags="scroll|enterAlways" app:tabGravity="fill" app:tabIndicatorColor="@android:color/white" diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index b6930940..ff7a6510 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -4,8 +4,6 @@ <color name="colorPrimaryDark">#121212</color> <color name="colorAccent">#FF4081</color> - <color name="downvoted">#E91E63</color> - <color name="transparentActionBarAndExoPlayerControllerColor">#88000000</color> <color name="gold">#FFC107</color> @@ -55,4 +53,6 @@ <color name="notificationIconColor">#1565C0</color> <color name="defaultTextColor">#B3FFFFFF</color> + + <color name="greyTabBackgroundColor">#282828</color> </resources> diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 82afbe60..a3357db3 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -69,4 +69,6 @@ <color name="commentVerticalBar5">#EE0220</color> <color name="commentVerticalBar6">#02EE6E</color> <color name="commentVerticalBar7">#EE4602</color> + + <color name="greyTabBackgroundColor">@color/colorPrimary</color> </resources> diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 6a59fbc6..f066da89 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -78,6 +78,7 @@ <style name="PreferenceTitleTextStyle"> <item name="android:textSize">?attr/font_16</item> + <item name="android:textColor">@color/primaryTextColor</item> </style> <style name="PreferenceSubtitleTextStyle"> |