mirror of
https://github.com/Michatec/Radio.git
synced 2026-01-31 07:20:40 +00:00
Initial commit
This commit is contained in:
167
app/src/main/res/layout/card_station.xml
Normal file
167
app/src/main/res/layout/card_station.xml
Normal file
@@ -0,0 +1,167 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.card.MaterialCardView 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/station_card"
|
||||
style="@style/App.Widget.Material3.CardView.Outlined"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="6dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackgroundBorderless">
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/station_icon"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:background="@null"
|
||||
android:contentDescription="@string/descr_card_station_image"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:shapeAppearanceOverlay="@style/RoundedCorners"
|
||||
app:srcCompat="@drawable/ic_default_station_image_72dp" />
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/change_image_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@color/default_neutral_85percent"
|
||||
android:contentDescription="@string/descr_card_station_image_change"
|
||||
android:cropToPadding="false"
|
||||
app:contentPadding="18dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/station_icon"
|
||||
app:layout_constraintEnd_toEndOf="@+id/station_icon"
|
||||
app:layout_constraintStart_toStartOf="@+id/station_icon"
|
||||
app:layout_constraintTop_toTopOf="@+id/station_icon"
|
||||
app:shapeAppearanceOverlay="@style/RoundedCorners"
|
||||
app:srcCompat="@drawable/ic_image_white_36dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/starred_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:contentDescription="@string/descr_card_starred_station"
|
||||
android:foregroundTint="@color/icon_default"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/station_icon"
|
||||
app:layout_constraintStart_toEndOf="@+id/station_icon"
|
||||
app:layout_constraintTop_toTopOf="@+id/station_icon"
|
||||
app:srcCompat="@drawable/ic_favorite_default_24dp"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/station_name"
|
||||
style="@style/App.Widget.MaterialComponents.TextView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:visibility="visible"
|
||||
android:textColor="@color/text_lightweight"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/station_icon"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_button"
|
||||
app:layout_constraintStart_toEndOf="@+id/starred_icon"
|
||||
app:layout_constraintTop_toTopOf="@+id/station_icon"
|
||||
tools:text="@string/sample_text_station_name" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/playback_button"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@color/player_button_background"
|
||||
android:contentDescription="@string/descr_card_small_play_button"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/edit_station_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:hint="@string/dialog_edit_station_name"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextAppearance.Material3.LabelLarge"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/station_name"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_button"
|
||||
app:layout_constraintStart_toEndOf="@+id/starred_icon"
|
||||
app:layout_constraintTop_toTopOf="@+id/station_name" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/edit_stream_uri"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/dialog_edit_stream_uri"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextAppearance.Material3.LabelLarge"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="@+id/edit_station_name"
|
||||
app:layout_constraintStart_toStartOf="@+id/edit_station_name"
|
||||
app:layout_constraintTop_toBottomOf="@id/edit_station_name" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/place_on_home_screen_button"
|
||||
style="@style/Widget.Material3.Button.IconButton.Filled.Tonal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:backgroundTint="@color/list_card_stroke_background"
|
||||
app:icon="@drawable/ic_home_24dp"
|
||||
app:iconTint="@color/player_button_background"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/cancel_button"
|
||||
app:layout_constraintTop_toBottomOf="@+id/edit_stream_uri" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/save_button"
|
||||
style="@style/Widget.Material3.Button.IconButton.Filled.Tonal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:backgroundTint="@color/list_card_stroke_background"
|
||||
app:icon="@drawable/ic_check_24dp"
|
||||
app:iconTint="@color/player_button_background"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/cancel_button"
|
||||
style="@style/Widget.Material3.Button.IconButton.Filled.Tonal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:backgroundTint="@color/list_card_stroke_background"
|
||||
app:icon="@drawable/ic_clear_24dp"
|
||||
app:iconTint="@color/player_button_background"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/save_button"
|
||||
app:layout_constraintTop_toTopOf="@+id/save_button" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/default_edit_views"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="change_image_view,edit_station_name,place_on_home_screen_button,save_button,cancel_button" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
Reference in New Issue
Block a user