Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e8976f6 authored by Stefan Niedermann's avatar Stefan Niedermann
Browse files

- 🎨 Small design enhancements and theme fixes

parent 0fa8261d
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ import android.app.SearchManager;
import android.content.Intent;
import android.database.sqlite.SQLiteException;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Build;
@@ -21,6 +22,7 @@ import androidx.annotation.NonNull;
import androidx.appcompat.view.ActionMode;
import androidx.appcompat.widget.SearchView;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.core.graphics.drawable.DrawableCompat;
import androidx.core.view.GravityCompat;
import androidx.core.view.ViewCompat;
import androidx.recyclerview.widget.LinearLayoutManager;
@@ -78,6 +80,7 @@ import it.niedermann.owncloud.notes.util.NoteUtil;

import static android.view.View.GONE;
import static android.view.View.VISIBLE;
import static it.niedermann.owncloud.notes.branding.BrandingUtil.getSecondaryForegroundColorDependingOnTheme;
import static it.niedermann.owncloud.notes.util.ColorUtil.contrastRatioIsSufficient;
import static it.niedermann.owncloud.notes.util.SSOUtil.askForNewAccount;

@@ -442,10 +445,14 @@ public class NotesListViewActivity extends LockedActivity implements NoteClickLi

        binding.headerView.setBackgroundColor(mainColor);
        binding.appName.setTextColor(textColor);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            activityBinding.progressCircular.getIndeterminateDrawable().setColorFilter(getSecondaryForegroundColorDependingOnTheme(this, mainColor), PorterDuff.Mode.SRC_IN);
        }

        // TODO We assume, that the background of the spinner is always white
        activityBinding.swiperefreshlayout.setColorSchemeColors(contrastRatioIsSufficient(Color.WHITE, mainColor) ? mainColor : Color.BLACK);
        binding.appName.setTextColor(textColor);
        DrawableCompat.setTint(binding.logo.getDrawable(), textColor);

        adapter.applyBrand(mainColor, textColor);
        adapterCategories.applyBrand(mainColor, textColor);
+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
    <androidx.fragment.app.FragmentContainerView
        android:id="@+id/fragment_container_view"
        android:layout_width="match_parent"
        android:background="?attr/colorPrimary"
        android:layout_height="match_parent" />

</LinearLayout>
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
+2 −2
Original line number Diff line number Diff line
@@ -99,7 +99,6 @@
            android:id="@+id/swiperefreshlayout"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@color/bg_normal"
            tools:context="it.niedermann.owncloud.notes.android.activity.NotesListViewActivity">

            <FrameLayout
@@ -115,13 +114,14 @@
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:indeterminateTint="@color/defaultBrand"
                    tools:targetApi="lollipop"
                    tools:visibility="gone" />

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/recycler_view"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="@color/bg_highlighted"
                    android:scrollbars="vertical"
                    tools:listitem="@layout/item_notes_list_note_item" />
            </FrameLayout>
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@
            android:layout_marginBottom="@dimen/spacer_2x"
            android:layout_weight="1"
            android:background="@color/bg_highlighted"
            android:padding="8dp"
            android:padding="@dimen/spacer_1x"
            android:scrollbars="horizontal|vertical"
            android:textIsSelectable="true"
            android:typeface="monospace"
Loading