初始化框架,完成扫描回调,语音接口

This commit is contained in:
2021-02-08 10:34:29 +08:00
commit 29af9af399
73 changed files with 2275 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View 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>

View 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>

View 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>

View 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>

View 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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>