Skip to content

Commit

Permalink
Add first layout example
Browse files Browse the repository at this point in the history
  • Loading branch information
erikd256 committed Dec 16, 2024
1 parent 7a9f5b4 commit 87f51cf
Show file tree
Hide file tree
Showing 11 changed files with 153 additions and 1 deletion.
5 changes: 5 additions & 0 deletions android/app/src/main/res/drawable/ic_album.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#2D8953" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,16.5c-2.49,0 -4.5,-2.01 -4.5,-4.5S9.51,7.5 12,7.5s4.5,2.01 4.5,4.5 -2.01,4.5 -4.5,4.5zM12,11c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1z"/>

</vector>
5 changes: 5 additions & 0 deletions android/app/src/main/res/drawable/ic_forward.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#2D8953" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M4,18l8.5,-6L4,6v12zM13,6v12l8.5,-6L13,6z"/>

</vector>
5 changes: 5 additions & 0 deletions android/app/src/main/res/drawable/ic_music.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#2D8953" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M12,3v9.28c-0.47,-0.17 -0.97,-0.28 -1.5,-0.28C8.01,12 6,14.01 6,16.5S8.01,21 10.5,21c2.31,0 4.2,-1.75 4.45,-4H15V6h4V3h-7z"/>

</vector>
5 changes: 5 additions & 0 deletions android/app/src/main/res/drawable/ic_pause.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#2D8953" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M6,19h4L10,5L6,5v14zM14,5v14h4L18,5h-4z"/>

</vector>
5 changes: 5 additions & 0 deletions android/app/src/main/res/drawable/ic_play.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#2D8953" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M8,5v14l11,-7z"/>

</vector>
5 changes: 5 additions & 0 deletions android/app/src/main/res/drawable/ic_rewind.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#2D8953" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M11,18L11,6l-8.5,6 8.5,6zM11.5,12l8.5,6L20,6l-8.5,6z"/>

</vector>
13 changes: 12 additions & 1 deletion android/app/src/main/res/layout/layout_nav_bottom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true">

<include layout="@layout/bottom_sheet_handle" />
<include layout="@layout/layout_nav_bottom_audiocontrol" />
<include layout="@layout/layout_nav_bottom_numbers" />

<com.google.android.material.progressindicator.LinearProgressIndicator
Expand Down Expand Up @@ -74,4 +74,15 @@
android:textAppearance="@style/MwmTextAppearance.Button.Red"
tools:ignore="UnusedAttribute" />
</LinearLayout>

<com.google.android.material.progressindicator.LinearProgressIndicator
android:id="@+id/music_progress"
style="@style/Widget.MaterialComponents.LinearProgressIndicator"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:indicatorColor="?colorAccent"
app:trackCornerRadius="@dimen/nav_progress_head"
app:trackThickness="@dimen/nav_progress"
app:trackColor="@color/bg_routing_progress" />

</LinearLayout>
97 changes: 97 additions & 0 deletions android/app/src/main/res/layout/layout_nav_bottom_audiocontrol.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="65sp"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:gravity="center_vertical"
android:orientation="horizontal"
tools:background="#3000FF00"
tools:ignore="RtlSymmetry">

<LinearLayout
android:id="@+id/content_music"
android:layout_width="match_parent"
android:layout_height="50dp"
android:orientation="horizontal"
android:paddingStart="4dp"
android:paddingEnd="4dp"
android:weightSum="2"
tools:background="#300000FF">

<ImageView
android:id="@+id/musicIcon"
android:layout_width="42dp"
android:layout_height="42dp"
android:layout_margin="4dp"
android:scaleType="center"
android:src="@drawable/ic_album"
app:tint="?android:textColorPrimary" />

<TableLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">

<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content">

<TextView
android:id="@+id/music_songname"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/default_artist"
android:textAppearance="@style/MwmTextAppearance.NavMenu.Song"/>
</TableRow>

<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content">

<TextView
android:id="@+id/music_artistname"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/default_song"
android:textAppearance="@style/MwmTextAppearance.NavMenu.Artist"
/>
</TableRow>
</TableLayout>

<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="horizontal"
android:padding="4dp"
android:textAlignment="center">

<ImageButton
android:layout_width="42dp"
android:layout_height="42dp"
android:layout_margin="4dp"
android:background="@color/base_accent_transparent"
android:src="@drawable/ic_rewind"
app:tint="?android:textColorPrimary"></ImageButton>

<ImageButton
android:layout_width="42dp"
android:layout_height="42dp"
android:background="@color/base_accent_transparent"
android:src="@drawable/ic_play"
app:tint="?android:textColorPrimary"
android:layout_margin="4dp"></ImageButton>

<ImageButton
android:layout_width="42dp"
android:layout_height="42dp"
android:background="@color/base_accent_transparent"
android:src="@drawable/ic_forward"
app:tint="?android:textColorPrimary"
android:layout_margin="4dp"></ImageButton>
</LinearLayout>

</LinearLayout>
</LinearLayout>
2 changes: 2 additions & 0 deletions android/app/src/main/res/values/font_sizes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
<dimen name="text_size_nav_number">24sp</dimen>
<dimen name="text_size_nav_dimension">20sp</dimen>
<dimen name="text_size_nav_menu_number">28sp</dimen>
<dimen name="text_size_nav_menu_song">20dp</dimen>
<dimen name="text_size_nav_menu_artist">10dp</dimen>
<dimen name="text_size_nav_menu_dimension">16sp</dimen>

<dimen name="text_size_banner">8sp</dimen>
Expand Down
4 changes: 4 additions & 0 deletions android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
<resources>
<!-- SECTION: Strings -->
<!-- Button text (should be short) -->

<string name="back">Back</string>
<!-- Button text (should be short) -->
<string name="cancel">Cancel</string>
<!-- Default music control string -->
<string name="default_artist">Lorem Ipsum</string>
<string name="default_song">Dolor Sit Amet</string>
<!-- Button which deletes downloaded country -->
<string name="delete">Delete</string>
<string name="download_maps">Download Maps</string>
Expand Down
8 changes: 8 additions & 0 deletions android/app/src/main/res/values/styles-text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,14 @@
<item name="android:textSize">@dimen/text_size_nav_menu_number</item>
<item name="android:textColor">?android:textColorPrimary</item>
</style>
<style name="MwmTextAppearance.NavMenu.Song">
<item name="android:textSize">@dimen/text_size_nav_menu_song</item>
<item name="android:textColor">?android:textColorPrimary</item>
</style>
<style name="MwmTextAppearance.NavMenu.Artist">
<item name="android:textSize">@dimen/text_size_nav_menu_artist</item>
<item name="android:textColor">?android:textColorPrimary</item>
</style>

<style name="MwmTextAppearance.NavMenu.Number.Dimension">
<item name="android:textSize">@dimen/text_size_nav_menu_dimension</item>
Expand Down

0 comments on commit 87f51cf

Please sign in to comment.