diff --git a/mastodon/src/main/java/org/joinmastodon/android/api/requests/oauth/CreateOAuthApp.java b/mastodon/src/main/java/org/joinmastodon/android/api/requests/oauth/CreateOAuthApp.java index b482de522..a9cf806f2 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/api/requests/oauth/CreateOAuthApp.java +++ b/mastodon/src/main/java/org/joinmastodon/android/api/requests/oauth/CreateOAuthApp.java @@ -1,7 +1,5 @@ package org.joinmastodon.android.api.requests.oauth; -import android.net.Uri; - import org.joinmastodon.android.api.MastodonAPIRequest; import org.joinmastodon.android.api.session.AccountSessionManager; import org.joinmastodon.android.model.Application; diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/BaseStatusListFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/BaseStatusListFragment.java index 6e2441c6a..e0e9eac0c 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/BaseStatusListFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/BaseStatusListFragment.java @@ -6,6 +6,7 @@ import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Rect; import android.graphics.drawable.Drawable; +import android.os.Build; import android.os.Bundle; import android.util.Log; import android.view.View; @@ -55,7 +56,8 @@ public abstract class BaseStatusListFragment exten @Override public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); - setRetainInstance(true); + if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.N) + setRetainInstance(true); } @Override diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeFragment.java index 257b6c898..e0e3ade9f 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeFragment.java @@ -49,7 +49,8 @@ public class HomeFragment extends AppKitFragment implements OnBackPressedListene super.onCreate(savedInstanceState); accountID=getArguments().getString("account"); - setRetainInstance(true); + if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.N) + setRetainInstance(true); Bundle args=new Bundle(); args.putString("account", accountID); diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java index bcfd3d76c..656e13a63 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java @@ -12,6 +12,7 @@ import android.content.res.Configuration; import android.graphics.Outline; import android.graphics.drawable.Drawable; import android.net.Uri; +import android.os.Build; import android.os.Bundle; import android.text.SpannableStringBuilder; import android.view.Gravity; @@ -123,7 +124,8 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList @Override public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); - setRetainInstance(true); + if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.N) + setRetainInstance(true); accountID=getArguments().getString("account"); if(getArguments().containsKey("profileAccount")){ @@ -435,7 +437,7 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList @Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){ if(isOwnProfile && isInEditMode){ - Button cancelButton=new Button(getActivity(), null, 0, R.style.Widget_Mastodon_Button_Secondary); + Button cancelButton=new Button(getActivity(), null, 0, R.style.Widget_Mastodon_Button_Secondary_LightOnDark); cancelButton.setText(R.string.cancel); cancelButton.setOnClickListener(v->exitEditMode()); FrameLayout wrap=new FrameLayout(getActivity()); diff --git a/mastodon/src/main/res/color/button_bg.xml b/mastodon/src/main/res/color/button_bg.xml deleted file mode 100644 index a958d220f..000000000 --- a/mastodon/src/main/res/color/button_bg.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/mastodon/src/main/res/color/button_bg_primary_dark_on_light.xml b/mastodon/src/main/res/color/button_bg_primary_dark_on_light.xml new file mode 100644 index 000000000..ac32e4cf1 --- /dev/null +++ b/mastodon/src/main/res/color/button_bg_primary_dark_on_light.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/mastodon/src/main/res/color/button_bg_primary_light_on_dark.xml b/mastodon/src/main/res/color/button_bg_primary_light_on_dark.xml new file mode 100644 index 000000000..b79d382f0 --- /dev/null +++ b/mastodon/src/main/res/color/button_bg_primary_light_on_dark.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/mastodon/src/main/res/color/button_bg_secondary.xml b/mastodon/src/main/res/color/button_bg_secondary.xml deleted file mode 100644 index 77c67e1e0..000000000 --- a/mastodon/src/main/res/color/button_bg_secondary.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/mastodon/src/main/res/color/button_bg_secondary_dark_on_light.xml b/mastodon/src/main/res/color/button_bg_secondary_dark_on_light.xml new file mode 100644 index 000000000..79fd46559 --- /dev/null +++ b/mastodon/src/main/res/color/button_bg_secondary_dark_on_light.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/mastodon/src/main/res/color/button_bg_secondary_light_on_dark.xml b/mastodon/src/main/res/color/button_bg_secondary_light_on_dark.xml new file mode 100644 index 000000000..0f3e8a025 --- /dev/null +++ b/mastodon/src/main/res/color/button_bg_secondary_light_on_dark.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/mastodon/src/main/res/color/button_text_primary_dark_on_light.xml b/mastodon/src/main/res/color/button_text_primary_dark_on_light.xml new file mode 100644 index 000000000..d9f2cb44b --- /dev/null +++ b/mastodon/src/main/res/color/button_text_primary_dark_on_light.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/mastodon/src/main/res/color/button_text_primary_light_on_dark.xml b/mastodon/src/main/res/color/button_text_primary_light_on_dark.xml new file mode 100644 index 000000000..a62f5c520 --- /dev/null +++ b/mastodon/src/main/res/color/button_text_primary_light_on_dark.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/mastodon/src/main/res/color/button_text_secondary_dark_on_light.xml b/mastodon/src/main/res/color/button_text_secondary_dark_on_light.xml new file mode 100644 index 000000000..a62f5c520 --- /dev/null +++ b/mastodon/src/main/res/color/button_text_secondary_dark_on_light.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/mastodon/src/main/res/color/button_text_secondary_light_on_dark.xml b/mastodon/src/main/res/color/button_text_secondary_light_on_dark.xml new file mode 100644 index 000000000..4a6b1e796 --- /dev/null +++ b/mastodon/src/main/res/color/button_text_secondary_light_on_dark.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/mastodon/src/main/res/drawable/bg_button.xml b/mastodon/src/main/res/drawable/bg_button_primary_dark_on_light.xml similarity index 64% rename from mastodon/src/main/res/drawable/bg_button.xml rename to mastodon/src/main/res/drawable/bg_button_primary_dark_on_light.xml index 2c1d1374c..337068d23 100644 --- a/mastodon/src/main/res/drawable/bg_button.xml +++ b/mastodon/src/main/res/drawable/bg_button_primary_dark_on_light.xml @@ -4,9 +4,8 @@ - + - diff --git a/mastodon/src/main/res/drawable/bg_button_secondary.xml b/mastodon/src/main/res/drawable/bg_button_primary_light_on_dark.xml similarity index 62% rename from mastodon/src/main/res/drawable/bg_button_secondary.xml rename to mastodon/src/main/res/drawable/bg_button_primary_light_on_dark.xml index 13455930a..337068d23 100644 --- a/mastodon/src/main/res/drawable/bg_button_secondary.xml +++ b/mastodon/src/main/res/drawable/bg_button_primary_light_on_dark.xml @@ -4,9 +4,8 @@ - + - diff --git a/mastodon/src/main/res/drawable/bg_button_secondary_dark_on_light.xml b/mastodon/src/main/res/drawable/bg_button_secondary_dark_on_light.xml new file mode 100644 index 000000000..6867808cc --- /dev/null +++ b/mastodon/src/main/res/drawable/bg_button_secondary_dark_on_light.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/mastodon/src/main/res/drawable/bg_button_secondary_light_on_dark.xml b/mastodon/src/main/res/drawable/bg_button_secondary_light_on_dark.xml new file mode 100644 index 000000000..f8d65731a --- /dev/null +++ b/mastodon/src/main/res/drawable/bg_button_secondary_light_on_dark.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/mastodon/src/main/res/layout/recycler_fragment_with_fab.xml b/mastodon/src/main/res/layout/recycler_fragment_with_fab.xml index a908ee9a0..74c6c0d8a 100644 --- a/mastodon/src/main/res/layout/recycler_fragment_with_fab.xml +++ b/mastodon/src/main/res/layout/recycler_fragment_with_fab.xml @@ -28,7 +28,7 @@ android:layout_marginEnd="16dp" android:layout_marginBottom="24dp" android:background="@drawable/bg_fab" - android:tint="@color/base" + android:tint="@color/fab_icon" android:scaleType="center" android:stateListAnimator="@animator/fab_shadow" android:src="@drawable/ic_edit_34"/> diff --git a/mastodon/src/main/res/values/attrs.xml b/mastodon/src/main/res/values/attrs.xml index 307ec33ce..ca1ffd582 100644 --- a/mastodon/src/main/res/values/attrs.xml +++ b/mastodon/src/main/res/values/attrs.xml @@ -1,10 +1,9 @@ - - + \ No newline at end of file diff --git a/mastodon/src/main/res/values/colors.xml b/mastodon/src/main/res/values/colors.xml index 9a6baf2e1..2fe249a60 100644 --- a/mastodon/src/main/res/values/colors.xml +++ b/mastodon/src/main/res/values/colors.xml @@ -15,24 +15,21 @@ #F9FAFB #F2F4F7 #E4E7EC + #D0D5DD #98A2B3 #667085 #475467 + #344054 #282C37 + #CC282C37 #101828 #2B90D9 - #80282C37 - #606984 - - #E9EDF2 - #282C37 - #80667085 + #282C37 #FAFBFC - #000 + #282C37 #80FFFFFF - @color/gray_50 #FF9F0A #79BD9A diff --git a/mastodon/src/main/res/values/styles.xml b/mastodon/src/main/res/values/styles.xml index ce85c63fc..be9f2a245 100644 --- a/mastodon/src/main/res/values/styles.xml +++ b/mastodon/src/main/res/values/styles.xml @@ -4,30 +4,30 @@ false false - true - true - @color/white - @color/actionbar_bg - @color/navigation_bar_bg - @style/Theme.Mastodon.Toolbar - @style/Widget.Mastodon.Button - @style/Theme.Mastodon.Dialog.Alert + @drawable/ic_fluent_arrow_left_24_regular false - + + @style/Widget.Mastodon.Button.Primary_DarkOnLight + @style/Widget.Mastodon.Button.Secondary_DarkOnLight @color/primary_700 @color/gray_800 @color/gray_100 @color/gray_800 @color/gray_500 - @color/gray_800 - @color/gray_600 @color/gray_50 #E9EDF2 @color/gray_50 @color/gray_25 @color/gray_900 + @color/white + @color/actionbar_bg + @color/navigation_bar_bg + true + true + @style/Theme.Mastodon.Toolbar + @style/Theme.Mastodon.Dialog.Alert - + + + + + + \ No newline at end of file