This commit is contained in:
Mike Schwörer 2018-10-22 01:32:21 +02:00
parent 7261795c99
commit 96a3cbc40a
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF
3 changed files with 34 additions and 6 deletions

View File

@ -1,7 +1,6 @@
package com.blackforestbytes.simplecloudnotifier.view;
import android.media.AudioManager;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
@ -101,7 +100,9 @@ public class SettingsFragment extends Fragment
prefAppEnabled.setChecked(s.Enabled);
prefAppEnabled.setOnCheckedChangeListener((a,b) -> onUpdate());
prefLocalCacheSize.setAdapter(new ArrayAdapter<>(v.getContext(), android.R.layout.simple_spinner_item, SCNSettings.CHOOSABLE_CACHE_SIZES));
ArrayAdapter<Integer> plcsa = new ArrayAdapter<>(v.getContext(), android.R.layout.simple_spinner_item, SCNSettings.CHOOSABLE_CACHE_SIZES);
plcsa.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
prefLocalCacheSize.setAdapter(plcsa);
prefLocalCacheSize.setSelection(getCacheSizeIndex(s.LocalCacheSize));
prefLocalCacheSize.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener()
{

View File

@ -25,7 +25,7 @@
android:layout_height="wrap_content">
<TextView
android:background="#bdc3c7"
android:background="@color/colorHeader"
android:textSize="16sp"
android:padding="4dp"
android:text="@string/str_common_settings"
@ -88,7 +88,33 @@
</androidx.constraintlayout.widget.ConstraintLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="2dp"
android:layout_marginTop="2dp"
android:background="#c0c0c0"/>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="48dp">
<Button
android:id="@+id/prefUpgradeAccount"
android:text="Upgrade account"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
@ -102,7 +128,7 @@
android:layout_height="wrap_content">
<TextView
android:background="#bdc3c7"
android:background="@color/colorHeader"
android:textSize="16sp"
android:padding="4dp"
android:text="@string/str_header_prio0"
@ -299,7 +325,7 @@
android:layout_height="wrap_content">
<TextView
android:background="#bdc3c7"
android:background="@color/colorHeader"
android:textSize="16sp"
android:padding="4dp"
android:text="@string/str_header_prio1"
@ -496,7 +522,7 @@
android:layout_height="wrap_content">
<TextView
android:background="#bdc3c7"
android:background="@color/colorHeader"
android:textSize="16sp"
android:padding="4dp"
android:text="@string/str_header_prio2"

View File

@ -3,6 +3,7 @@
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
<color name="colorHeader">#67809F</color>
<color name="colorBlack">#000</color>
</resources>