Skip to content

Commit

Permalink
First attempt at sorting out theme-ing
Browse files Browse the repository at this point in the history
  • Loading branch information
MostafaGazar committed Jun 20, 2019
1 parent ac74ee9 commit 401e26b
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .idea/assetWizardSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 10 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,24 +56,28 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

// AndroidX
implementation 'androidx.appcompat:appcompat:1.1.0-alpha03'
implementation "androidx.core:core-ktx:1.1.0-rc01"
implementation 'androidx.appcompat:appcompat:1.1.0-beta01'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta1'
implementation "androidx.recyclerview:recyclerview:1.0.0"
implementation "com.google.android.material:material:1.0.0"

// Android Arch
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycleVersion"
implementation "androidx.recyclerview:recyclerview:$supportLibraryVersion"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleKtxVersion"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleKtxVersion"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycleKtxVersion"

// Android Arch
// Navigation
implementation "androidx.navigation:navigation-fragment-ktx:$navigationVersion"
implementation "androidx.navigation:navigation-ui-ktx:$navigationVersion"

// Room
implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version"
implementation "androidx.room:room-ktx:$room_version"

// UI
implementation "com.google.android.material:material:$supportLibraryVersion"
kapt "com.github.bumptech.glide:compiler:$glideVersion"
implementation "com.github.bumptech.glide:glide:$glideVersion"

Expand Down Expand Up @@ -131,8 +135,8 @@ dependencies {

// Testing
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0-beta01'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0-beta01'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}

apply plugin: 'com.google.gms.google-services'
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/vd_close.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:autoMirrored="true" android:height="24dp"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
</vector>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<com.google.android.material.appbar.AppBarLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:theme="@style/AppTheme.AppBarOverlay">
android:theme="@style/Widget.SED.AppBarLayout">

<com.google.android.material.tabs.TabLayout
android:id="@+id/tabs"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/include_default_toolbar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
android:theme="@style/AppTheme.ToolbarOverlay"
android:theme="@style/Widget.SED.Toolbar"
tools:showIn="@layout/activity_main" />

</merge>
3 changes: 2 additions & 1 deletion app/src/main/res/layout/include_login.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@
app:errorEnabled="true" />
</com.google.android.material.textfield.TextInputLayout>

<!--app:endIconMode="password_toggle"-->
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/passwordTextInputLayout"
style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
app:endIconMode="password_toggle"

app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/usernameTextInputLayout">
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/include_register.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@
app:errorEnabled="true" />
</com.google.android.material.textfield.TextInputLayout>

<!--app:endIconMode="password_toggle"-->
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/passwordTextInputLayout"
style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
app:endIconMode="password_toggle"

app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/emailTextInputLayout">
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
<string name="yes">Yes</string>
<string name="no">No</string>

<string name="close">Close</string>

<string name="error_generic">Something went wrong, please try again later</string>

<!-- Bottom navigation -->
Expand Down
11 changes: 9 additions & 2 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,16 @@
<item name="colorAccent">@color/colorAccent</item>

<item name="android:windowBackground">@color/windowBackground</item>

<item name="windowActionModeOverlay">true</item>
</style>

<style name="Widget.SED.Toolbar" parent="ThemeOverlay.MaterialComponents.ActionBar"/>
<style name="Widget.SED.Toolbar.WithCloseButton" parent="Widget.SED.Toolbar">
<item name="navigationContentDescription">@string/close</item>
<item name="navigationIcon">@drawable/vd_close</item>
</style>

<style name="AppTheme.ToolbarOverlay" parent="ThemeOverlay.MaterialComponents.ActionBar"/>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Light"/>
<style name="Widget.SED.AppBarLayout" parent="ThemeOverlay.AppCompat.Light"/>

</resources>
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ buildscript {
pagingKtxVersion = '2.1.0'
retrofit_version = '2.4.0'
room_version = '2.1.0-rc01'
supportLibraryVersion = '1.0.0'
glideVersion = '4.9.0'
exoplayer_version = '2.10.1'
okhttp3Version = '3.9.0'
Expand Down

0 comments on commit 401e26b

Please sign in to comment.