初始化框架,完成扫描回调,语音接口
BIN
app/src/main/res/drawable-v24/ic_launcher_foreground.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
app/src/main/res/drawable/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
12
app/src/main/res/layout/activity_about.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/about_content"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
11
app/src/main/res/layout/activity_main.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<?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">
|
||||
|
||||
<WebView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/webView" />
|
||||
|
||||
</LinearLayout>
|
||||
92
app/src/main/res/layout/activity_setting_network.xml
Normal file
@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:stretchColumns="0,3"
|
||||
android:gravity="center_vertical"
|
||||
android:id="@+id/table">
|
||||
|
||||
|
||||
<TableRow>
|
||||
|
||||
<TextView />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="服务器地址:" />
|
||||
|
||||
<EditText
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="150dp"
|
||||
android:id="@+id/address"
|
||||
android:singleLine="true"
|
||||
android:hint="ip地址或者域名地址" />
|
||||
|
||||
<TextView />
|
||||
</TableRow>
|
||||
|
||||
<TableRow>
|
||||
|
||||
<TextView />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="服务器端口:" />
|
||||
|
||||
<EditText
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="150dp"
|
||||
android:id="@+id/port"
|
||||
android:singleLine="true"
|
||||
android:hint="介于1024-65535之间的数字" />
|
||||
|
||||
<TextView />
|
||||
</TableRow>
|
||||
|
||||
<TableRow>
|
||||
|
||||
<TextView />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="访问子路径:" />
|
||||
|
||||
<EditText
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="150dp"
|
||||
android:id="@+id/path"
|
||||
android:singleLine="true"
|
||||
android:hint="服务器子路径" />
|
||||
|
||||
<TextView />
|
||||
</TableRow>
|
||||
|
||||
|
||||
<TableRow>
|
||||
|
||||
<TextView />
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/save"
|
||||
android:text="保 存" />
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/cancel"
|
||||
android:layout_marginLeft="10px"
|
||||
android:text="取 消" />
|
||||
|
||||
<TextView />
|
||||
</TableRow>
|
||||
|
||||
|
||||
</TableLayout>
|
||||
147
app/src/main/res/layout/activity_setting_voice.xml
Normal file
@ -0,0 +1,147 @@
|
||||
<?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:weightSum="3"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<EditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="left"
|
||||
android:text="这是一段测试文本,可以进行编辑!"
|
||||
android:id="@+id/voice_test_text"
|
||||
android:layout_weight="2" />
|
||||
|
||||
<TableLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:stretchColumns="0,3"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:id="@+id/table">
|
||||
|
||||
|
||||
<TableRow android:layout_marginBottom="50px">
|
||||
|
||||
<TextView />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="15px"
|
||||
android:paddingBottom="15px"
|
||||
android:text="播报人员:" />
|
||||
|
||||
|
||||
<RadioGroup
|
||||
android:layout_width="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_gravity="center"
|
||||
android:id="@+id/voice_member_group"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<RadioButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="小峰"
|
||||
android:id="@+id/voice_member_xiaofeng" />
|
||||
|
||||
<RadioButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="小燕"
|
||||
android:layout_marginLeft="150px"
|
||||
android:id="@+id/voice_member_xiaoyan" />
|
||||
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
<TextView />
|
||||
</TableRow>
|
||||
|
||||
<TableRow android:layout_marginBottom="50px">
|
||||
|
||||
<TextView />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="播报音量:" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/voice_size"
|
||||
android:layout_width="wrap_content"
|
||||
android:max="100"
|
||||
android:min="0"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<TextView />
|
||||
</TableRow>
|
||||
|
||||
<TableRow android:layout_marginBottom="50px">
|
||||
|
||||
<TextView />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="播报音调:" />
|
||||
|
||||
<SeekBar
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:max="100"
|
||||
android:min="0"
|
||||
android:id="@+id/voice_indicate" />
|
||||
|
||||
<TextView />
|
||||
</TableRow>
|
||||
|
||||
<TableRow android:layout_marginBottom="50px">
|
||||
|
||||
<TextView />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="播报音速:" />
|
||||
|
||||
<SeekBar
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:max="200"
|
||||
android:min="100"
|
||||
android:id="@+id/voice_speed" />
|
||||
|
||||
<TextView />
|
||||
</TableRow>
|
||||
|
||||
|
||||
<TableRow>
|
||||
|
||||
<TextView />
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/save_voice_setting"
|
||||
android:text="保 存" />
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/cancel_voice_setting"
|
||||
android:layout_marginLeft="10px"
|
||||
android:text="取 消" />
|
||||
|
||||
<TextView />
|
||||
</TableRow>
|
||||
|
||||
|
||||
</TableLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
22
app/src/main/res/menu/menu_main.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<menu 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"
|
||||
tools:context="chaoran.business.pda.chaoran.business.activity.MainActivity">
|
||||
<item
|
||||
android:id="@+id/action_setting_network"
|
||||
android:title="@string/action_setting_network"
|
||||
android:orderInCategory="100"
|
||||
app:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_setting_voice"
|
||||
android:title="@string/action_setting_voice"
|
||||
android:orderInCategory="100"
|
||||
app:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_about"
|
||||
android:title="@string/activity_about"
|
||||
android:orderInCategory="200"
|
||||
app:showAsAction="never" />
|
||||
</menu>
|
||||
BIN
app/src/main/res/mipmap-anydpi-v26/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
app/src/main/res/raw/beep.ogg
Normal file
BIN
app/src/main/res/raw/didi.ogg
Normal file
BIN
app/src/main/res/raw/dudu.ogg
Normal file
16
app/src/main/res/values-night/themes.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.PdaWeb" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/purple_200</item>
|
||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||
<item name="colorOnPrimary">@color/black</item>
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/teal_200</item>
|
||||
<item name="colorSecondaryVariant">@color/teal_200</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
</resources>
|
||||
6
app/src/main/res/values-w820dp/dimens.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<resources>
|
||||
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
|
||||
(such as screen margins) for screens with more than 820dp of available width. This
|
||||
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
|
||||
<dimen name="activity_horizontal_margin">64dp</dimen>
|
||||
</resources>
|
||||
12
app/src/main/res/values/arrays.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<resources>
|
||||
<!-- Reply Preference -->
|
||||
<string-array name="reply_entries">
|
||||
<item>Reply</item>
|
||||
<item>Reply to all</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="reply_values">
|
||||
<item>reply</item>
|
||||
<item>reply_all</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
10
app/src/main/res/values/colors.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="purple_200">#FFBB86FC</color>
|
||||
<color name="purple_500">#FF6200EE</color>
|
||||
<color name="purple_700">#FF3700B3</color>
|
||||
<color name="teal_200">#FF03DAC5</color>
|
||||
<color name="teal_700">#FF018786</color>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
</resources>
|
||||
5
app/src/main/res/values/dimens.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<resources>
|
||||
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
</resources>
|
||||
16
app/src/main/res/values/strings.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<resources>
|
||||
<string name="app_name">超然扫描</string>
|
||||
<string name="action_setting_network">网络设置</string>
|
||||
<string name="title_activity_setting_network">网络设置界面</string>
|
||||
<string name="action_setting_voice">语音设置</string>
|
||||
<string name="title_activity_setting_voice">语音设置界面</string>
|
||||
<string name="title_activity_main">主页</string>
|
||||
<string name="activity_about">关于</string>
|
||||
<string name="activity_about_content">这是关于界面的内容</string>
|
||||
|
||||
<!-- 讯飞离线语音appid-->
|
||||
<string name="app_id">601c9ec6</string>
|
||||
|
||||
<!-- 讯飞离线语音弹出框格式-->
|
||||
<string name="tts_toast_format" formatted="false">缓冲进度为%d%%,播放进度为%d%%</string>
|
||||
</resources>
|
||||
16
app/src/main/res/values/themes.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.PdaWeb" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/purple_500</item>
|
||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||
<item name="colorOnPrimary">@color/white</item>
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/teal_200</item>
|
||||
<item name="colorSecondaryVariant">@color/teal_700</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
</resources>
|
||||