Prepare item selection

This commit is contained in:
M66B 2018-08-14 20:12:25 +00:00
parent 2d5df16576
commit 1aa00d5b6b
10 changed files with 31 additions and 12 deletions

View File

@ -45,6 +45,7 @@ repositories {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
def support_version = "1.0.0-alpha1"
def androidx_version = "2.0.0-alpha1"
def javamail_version = "1.6.0"
def jsoup_version = "1.11.3"
@ -52,13 +53,13 @@ dependencies {
// https://developer.android.com/topic/libraries/support-library/revisions.html
// https://developer.android.com/topic/libraries/support-library/packages
// https://developer.android.com/topic/libraries/support-library/refactor
implementation "androidx.appcompat:appcompat:1.0.0-alpha1"
implementation "androidx.constraintlayout:constraintlayout:1.1.0"
implementation "androidx.recyclerview:recyclerview:1.0.0-alpha1"
implementation "com.google.android.material:material:1.0.0-alpha1"
implementation "androidx.browser:browser:1.0.0-alpha1"
implementation "androidx.appcompat:appcompat:$support_version"
implementation "androidx.recyclerview:recyclerview:$support_version"
implementation "com.google.android.material:material:$support_version"
implementation "androidx.browser:browser:$support_version"
// https://developer.android.com/topic/libraries/architecture/adding-components.html
implementation "androidx.constraintlayout:constraintlayout:$androidx_version"
implementation "androidx.lifecycle:lifecycle-extensions:$androidx_version"
implementation "androidx.room:room-runtime:$androidx_version"
implementation "androidx.paging:paging-runtime:$androidx_version"

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/darkColorItemSelected" android:state_activated="true" />
<item android:drawable="@android:color/transparent" />
</selector>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/lightColorItemSelected" android:state_activated="true" />
<item android:drawable="@android:color/transparent" />
</selector>

View File

@ -2,8 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="6dp">
android:layout_height="wrap_content">
<ImageView
android:id="@+id/ivPrimary"
@ -95,6 +94,7 @@
android:id="@+id/vSeparator"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="6dp"
android:layout_marginTop="6dp"
android:background="?attr/colorSeparator"
app:layout_constraintStart_toStartOf="parent"

View File

@ -2,8 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="6dp">
android:layout_height="wrap_content">
<ImageView
android:id="@+id/ivEdit"
@ -108,6 +107,7 @@
android:id="@+id/vSeparator"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="6dp"
android:layout_marginTop="6dp"
android:background="?attr/colorSeparator"
app:layout_constraintStart_toStartOf="parent"

View File

@ -2,8 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="6dp">
android:layout_height="wrap_content">
<ImageView
android:id="@+id/ivPrimary"
@ -69,6 +68,7 @@
android:id="@+id/vSeparator"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="6dp"
android:layout_marginTop="6dp"
android:background="?attr/colorSeparator"
app:layout_constraintStart_toStartOf="parent"

View File

@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="6dp">
android:background="?attr/drawableItemBackground">
<TextView
android:id="@+id/tvFrom"
@ -94,6 +94,7 @@
android:id="@+id/vSeparator"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="6dp"
android:layout_marginTop="6dp"
android:background="?attr/colorSeparator"
app:layout_constraintStart_toStartOf="parent"

View File

@ -8,12 +8,14 @@
<color name="colorActionForegroundDisabled">#ccc</color>
<color name="lightColorUnread">#000</color>
<color name="lightColorItemSelected">#ccc</color>
<color name="lightColorSeparator">#ffaaaaaa</color>
<color name="lightColorDrawerScrim">#99000000</color>
<color name="lightColorDrawerText">#111</color>
<color name="lightColorDrawerBackground">#eee</color>
<color name="darkColorUnread">#fff</color>
<color name="darkColorItemSelected">#555</color>
<color name="darkColorSeparator">#ff878787</color>
<color name="darkColorDrawerScrim">#997f7f7f</color>
<color name="darkColorDrawerText">#fff</color>

View File

@ -4,6 +4,7 @@
<attr name="colorDrawerScrim" format="reference" />
<attr name="colorDrawerText" format="reference" />
<attr name="colorDrawerBackground" format="reference" />
<attr name="drawableItemBackground" format="reference" />
<style name="AppThemeLight" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="android:windowDisablePreview">true</item>
@ -17,6 +18,8 @@
<item name="colorDrawerScrim">@color/lightColorDrawerScrim</item>
<item name="colorDrawerText">@color/lightColorDrawerText</item>
<item name="colorDrawerBackground">@color/lightColorDrawerBackground</item>
<item name="drawableItemBackground">@drawable/item_background_light</item>
</style>
<style name="AppThemeDark" parent="Theme.AppCompat">
@ -31,6 +34,8 @@
<item name="colorDrawerScrim">@color/darkColorDrawerScrim</item>
<item name="colorDrawerText">@color/darkColorDrawerText</item>
<item name="colorDrawerBackground">@color/darkColorDrawerBackground</item>
<item name="drawableItemBackground">@drawable/item_background_dark</item>
</style>
<style name="Theme.Transparent" parent="Theme.AppCompat">