Improve theming

This commit is contained in:
Thomas 2022-08-01 18:21:05 +02:00
parent e178ce1045
commit e29a722cfb
12 changed files with 19 additions and 22 deletions

View File

@ -22,7 +22,6 @@ import android.view.MotionEvent;
import android.view.ViewGroup;
import android.widget.Toast;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.RecyclerView;
import org.jetbrains.annotations.NotNull;
@ -161,7 +160,7 @@ public class ReorderBottomMenuAdapter extends RecyclerView.Adapter<RecyclerView.
* Simple example of a view holder that implements {@link ItemTouchHelperViewHolder} and has a
* "handle" view that initiates a drag event when touched.
*/
public class ReorderViewHolder extends RecyclerView.ViewHolder implements ItemTouchHelperViewHolder {
public static class ReorderViewHolder extends RecyclerView.ViewHolder implements ItemTouchHelperViewHolder {
DrawerReorderBinding binding;
@ -172,12 +171,10 @@ public class ReorderBottomMenuAdapter extends RecyclerView.Adapter<RecyclerView.
@Override
public void onItemSelected() {
itemView.setBackgroundColor(ContextCompat.getColor(context, R.color.mastodonC3));
}
@Override
public void onItemClear() {
itemView.setBackgroundColor(0);
}
}
}

View File

@ -22,7 +22,6 @@ import android.view.MotionEvent;
import android.view.ViewGroup;
import android.widget.Toast;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.RecyclerView;
import org.jetbrains.annotations.NotNull;
@ -183,7 +182,7 @@ public class ReorderTabAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
* Simple example of a view holder that implements {@link ItemTouchHelperViewHolder} and has a
* "handle" view that initiates a drag event when touched.
*/
public class ReorderViewHolder extends RecyclerView.ViewHolder implements ItemTouchHelperViewHolder {
public static class ReorderViewHolder extends RecyclerView.ViewHolder implements ItemTouchHelperViewHolder {
DrawerReorderBinding binding;
@ -194,12 +193,10 @@ public class ReorderTabAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
@Override
public void onItemSelected() {
itemView.setBackgroundColor(ContextCompat.getColor(context, R.color.mastodonC3));
}
@Override
public void onItemClear() {
itemView.setBackgroundColor(0);
}
}
}

View File

@ -24,7 +24,7 @@
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBar"
android:backgroundTint="?backgroundColorLight"
android:background="@color/cyanea_primary_dark_reference"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true">
@ -32,7 +32,7 @@
<com.google.android.material.appbar.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="?backgroundColorLight"
android:background="@color/cyanea_primary_dark_reference"
app:contentScrim="?colorPrimaryDark"
android:fitsSystemWindows="true"
app:expandedTitleGravity="top"
@ -344,7 +344,7 @@
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:backgroundTint="?colorPrimaryDark"
android:background="@color/cyanea_primary_dark_reference"
app:layout_scrollFlags="scroll|enterAlways"
app:layout_collapseMode="pin">
@ -372,7 +372,7 @@
android:id="@+id/account_tabLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?backgroundColorLight"
android:background="@color/cyanea_primary_dark_reference"
app:tabGravity="fill"
app:tabMode="fixed" />
</com.google.android.material.appbar.AppBarLayout>

View File

@ -24,7 +24,7 @@
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBar"
android:background="@color/cyanea_primary_reference"
android:background="@color/cyanea_primary_dark_reference"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true">
@ -57,7 +57,7 @@
android:id="@+id/schedule_tablayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?backgroundColorLight"
android:background="@color/cyanea_primary_dark_reference"
app:tabGravity="fill"
app:tabMode="scrollable" />
</com.google.android.material.appbar.AppBarLayout>

View File

@ -26,7 +26,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabGravity="fill"
android:background="?backgroundColorLight"
android:background="@color/cyanea_primary_dark_reference"
app:tabIndicatorColor="@color/cyanea_accent_dark_reference"
app:tabMode="scrollable" />

View File

@ -25,7 +25,7 @@
android:id="@+id/search_tabLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?backgroundColorLight"
android:background="@color/cyanea_primary_dark_reference"
app:tabGravity="fill"
app:tabIndicatorColor="@color/cyanea_accent_dark_reference"
app:tabMode="fixed" />

View File

@ -20,8 +20,9 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="6dp"
android:backgroundTint="@color/cyanea_primary_dark_reference"
android:layout_marginTop="6dp"
app:cardElevation="2dp">
app:cardElevation="0dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"

View File

@ -5,6 +5,7 @@
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:background="@color/cyanea_primary_dark_reference"
android:foreground="?selectableItemBackground">
<androidx.appcompat.widget.LinearLayoutCompat

View File

@ -19,7 +19,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="12dp"
app:cardElevation="2dp">
android:backgroundTint="@color/cyanea_primary_dark_reference"
app:cardElevation="0dp">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"

View File

@ -30,7 +30,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="?backgroundColorLight"
android:background="@color/cyanea_primary_dark_reference"
app:tabIndicatorColor="@color/cyanea_accent_dark_reference"
app:tabGravity="fill"
app:tabMaxWidth="0dp" />
@ -38,7 +38,7 @@
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/settings"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:background="?backgroundColorLight"
android:background="@color/cyanea_primary_dark_reference"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"

View File

@ -24,6 +24,7 @@
android:id="@+id/tabLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/cyanea_primary_dark_reference"
app:tabGravity="fill"
app:tabMaxWidth="0dp" />

View File

@ -16,8 +16,7 @@
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?backgroundColorLight">
android:layout_height="match_parent">
<!-- Listview status -->
<FrameLayout