Skip to content

Commit

Permalink
adjust bottom nav bar width for wide screen
Browse files Browse the repository at this point in the history
added tablet screenshot

set versionName to 1.1.1
  • Loading branch information
llopisdon committed Aug 21, 2021
1 parent 779217e commit 1ece17a
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 3 deletions.
11 changes: 11 additions & 0 deletions .idea/misc.xml

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

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The latest DEBUG APK can be found here:
# Screenshots

![screenshot](assets/screenshot.png)
![screenshot](assets/screenshot_tablet.png)


## The app demonstrates the use of the following technologies:
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ android {
minSdkVersion 22
targetSdkVersion 30
versionCode 1
versionName "1.1.0"
versionName "1.1.1"

def apodApiKey = project.findProperty("apodktm_nasa_apod_api_key") ?: 'DEMO_KEY'
println("APOD KEY: $apodApiKey")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ class ApodsListFragment : Fragment(), ApodAdapter.Listener {
}
}



private fun showProgressBar(value: Boolean) {
binding.progressBar.visibility = when (value) {
true -> View.VISIBLE
Expand Down
69 changes: 69 additions & 0 deletions app/src/main/res/layout-sw600dp/bottm_nav_bar.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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"
android:id="@+id/bottom_nav_bar"
android:layout_width="360dp"
android:layout_height="@dimen/bottom_nav_bar_height"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:background="@drawable/bottom_nav_bar_background"
android:clickable="true"
android:focusable="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/prev_month_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/detail_text_padding"
android:clickable="true"
android:focusable="true"
android:src="@drawable/ic_baseline_navigate_before_24"
android:contentDescription="@string/prev_month"
android:visibility="invisible"
app:backgroundTint="?attr/colorPrimaryVariant"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="?attr/colorOnSurface"
tools:visibility="visible" />

<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
android:id="@+id/month_button"
style="@style/Widget.MaterialComponents.ExtendedFloatingActionButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:text="JAN 2021"
android:visibility="visible"
app:backgroundTint="?attr/colorPrimaryVariant"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="?attr/colorOnSurface" />


<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/next_month_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/detail_text_padding"
android:clickable="true"
android:focusable="true"
android:visibility="invisible"
android:src="@drawable/ic_baseline_navigate_next_24"
android:contentDescription="@string/next_month"
app:backgroundTint="?attr/colorPrimaryVariant"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="?attr/colorOnSurface"
tools:visibility="visible" />


</androidx.constraintlayout.widget.ConstraintLayout>
Binary file added assets/screenshot_tablet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1ece17a

Please sign in to comment.