mirror of
https://github.com/chararomandroid/android_device_samsung_a20
synced 2026-08-23 20:45:31 -04:00
universal7885: Add FMRadio app
* Created from scratch by me (Royna) with help of LineageOS repo [1], Sony Xperia Dev repo [2] * Basic input/output, channel selection is working [1]: https://github.com/LineageOS/android_hardware_samsung_slsi_fm [2]: https://github.com/sonyxperiadev/vendor-qcom-opensource-fm Change-Id: I922bbeb9f86e6a4c7bc993d27d2f9eeb2a712186 Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
This commit is contained in:
parent
4b0238fe98
commit
0519231d7b
38 changed files with 2164 additions and 0 deletions
310
universal7885-common/apps/FMRadio/res/layout/activity_main.xml
Normal file
310
universal7885-common/apps/FMRadio/res/layout/activity_main.xml
Normal file
|
|
@ -0,0 +1,310 @@
|
|||
<?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:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="top|center"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/debug_info"
|
||||
android:layout_width="190dp"
|
||||
android:layout_height="30dp"
|
||||
android:gravity="center" />
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp" />
|
||||
|
||||
<de.dlyt.yanndroid.oneui.layout.RoundLinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/primary_color"
|
||||
android:gravity="center">
|
||||
|
||||
<Space
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:src="@drawable/radio"/>
|
||||
<TextView
|
||||
android:id="@+id/fm_radio_title"
|
||||
android:layout_width="240dp"
|
||||
android:layout_height="120dp"
|
||||
|
||||
android:gravity="center"
|
||||
android:text="@string/fm_radio"
|
||||
android:textColor="#263238"
|
||||
android:textSize="48sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<Space
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</de.dlyt.yanndroid.oneui.layout.RoundLinearLayout>
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="15dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center">
|
||||
|
||||
<de.dlyt.yanndroid.oneui.layout.RoundLinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="140dp"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/primary_color"
|
||||
android:gravity="center|top">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/output_modes"
|
||||
android:layout_width="185dp"
|
||||
android:layout_height="70dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/output_modes"
|
||||
android:textColor="#263238"
|
||||
android:textSize="25sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/fm_output"
|
||||
android:layout_width="175dp"
|
||||
android:layout_height="50dp"
|
||||
android:text="@string/wired_earphones"
|
||||
android:textColor="#263238"
|
||||
android:theme="@style/ButtonStyle.Colored"
|
||||
android:textSize="18sp" />
|
||||
|
||||
</de.dlyt.yanndroid.oneui.layout.RoundLinearLayout>
|
||||
|
||||
<Space
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<de.dlyt.yanndroid.oneui.layout.RoundLinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="140dp"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/primary_color"
|
||||
android:gravity="center|top">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/enable_fm"
|
||||
android:layout_width="185dp"
|
||||
android:layout_height="70dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/turn_on_fm"
|
||||
android:textColor="#263238"
|
||||
android:textSize="25sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/fmswitch"
|
||||
android:layout_width="175dp"
|
||||
android:layout_height="50dp"
|
||||
android:text="@string/disabled"
|
||||
android:textColor="#263238"
|
||||
android:textSize="18sp"
|
||||
android:theme="@style/ButtonStyle.Colored" />
|
||||
|
||||
</de.dlyt.yanndroid.oneui.layout.RoundLinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp" />
|
||||
|
||||
<de.dlyt.yanndroid.oneui.layout.RoundLinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="230dp"
|
||||
android:background="@color/primary_color"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center|top">
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/freq_title"
|
||||
android:layout_width="375dp"
|
||||
android:layout_height="50dp"
|
||||
android:text="@string/fm_radio_frequency"
|
||||
android:textColor="#263238"
|
||||
android:textSize="35sp"
|
||||
android:textStyle="bold"
|
||||
android:gravity="center"/>
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/band_select"
|
||||
android:layout_width="375dp"
|
||||
android:layout_height="50dp"
|
||||
android:text="@string/select_channel"
|
||||
android:textColor="#263238"
|
||||
android:textSize="25sp"
|
||||
android:gravity="center"/>
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"/>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/secondary_color">
|
||||
|
||||
<de.dlyt.yanndroid.oneui.view.SeekBar
|
||||
android:id="@+id/fm_freq_seekbar"
|
||||
android:layout_width="325dp"
|
||||
android:layout_height="50dp"
|
||||
android:progressBackgroundTint="@color/white"
|
||||
android:thumbTint="#263238"
|
||||
android:progressTint="#263238"/>
|
||||
</FrameLayout>
|
||||
|
||||
</de.dlyt.yanndroid.oneui.layout.RoundLinearLayout>
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp" />
|
||||
|
||||
<de.dlyt.yanndroid.oneui.layout.RoundLinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top|center"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/primary_color">
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="15dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/radio_ctrl"
|
||||
android:layout_width="375dp"
|
||||
android:layout_height="50dp"
|
||||
android:text="@string/radio_controls"
|
||||
android:textColor="#263238"
|
||||
android:textSize="35sp"
|
||||
android:textStyle="bold"
|
||||
android:gravity="center"/>
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="15dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<Space
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/scan_through"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp"
|
||||
android:text="@string/scan"
|
||||
android:textColor="#263238"
|
||||
android:theme="@style/ButtonStyle.Colored"/>
|
||||
|
||||
<Space
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/stop_scan"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp"
|
||||
android:text="@string/stop"
|
||||
android:textColor="#263238"
|
||||
android:theme="@style/ButtonStyle.Colored" />
|
||||
|
||||
<Space
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="15dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top|center">
|
||||
|
||||
<Space
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/seek_down"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp"
|
||||
android:text="@string/seek_down"
|
||||
android:textColor="#263238"
|
||||
android:theme="@style/ButtonStyle.Colored"/>
|
||||
|
||||
<Space
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/quit_fm"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp"
|
||||
android:text="@string/quit"
|
||||
android:textColor="#263238"
|
||||
android:theme="@style/ButtonStyle.Colored"/>
|
||||
|
||||
<Space
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/seek_up"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp"
|
||||
android:text="@string/seek_up"
|
||||
android:textColor="#263238"
|
||||
android:theme="@style/ButtonStyle.Colored" />
|
||||
|
||||
<Space
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="15dp" />
|
||||
|
||||
</de.dlyt.yanndroid.oneui.layout.RoundLinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/warning">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/error_img"
|
||||
android:layout_width="75dp"
|
||||
android:layout_height="75dp"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:background="@drawable/ic_samsung_error"
|
||||
android:translationZ="0dp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/error_simple"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="75dp"
|
||||
android:gravity="center"
|
||||
android:textColor="#00838F"
|
||||
android:textSize="18sp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/error_detailed"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="202dp"
|
||||
android:textColor="#00838F"
|
||||
android:textSize="16sp"
|
||||
android:gravity="center"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:background="@android:color/white"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="20sp"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/white">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_rewind"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp"
|
||||
android:background="@null"
|
||||
android:contentDescription="@string/previous_radio_channel"
|
||||
android:src="@drawable/left"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_play_pause"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:background="@null"
|
||||
android:contentDescription="@string/play_pause"
|
||||
android:src="@drawable/stop" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_forward"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp"
|
||||
android:background="@null"
|
||||
android:contentDescription="@string/next_radio_channel"
|
||||
android:src="@drawable/right"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/white"
|
||||
android:contentDescription="@string/close_radio"
|
||||
android:minWidth="32dp"
|
||||
android:minHeight="48dp"
|
||||
android:src="@drawable/power" />
|
||||
</LinearLayout>
|
||||
Loading…
Reference in a new issue