Skip to content

Commit

Permalink
+clear_content +keystore
Browse files Browse the repository at this point in the history
  • Loading branch information
aquamarine5 committed Aug 1, 2022
1 parent fdfb539 commit 3af1d35
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 6 deletions.
13 changes: 11 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
apply plugin: 'com.android.application'

android {
signingConfigs {
sign {
storeFile file('D:\\Program Files\\Android\\Android Studio\\jre\\bin\\sign.jks')
storePassword '070304syz'
keyAlias 'key0'
keyPassword '070304syz'
}
}
compileSdkVersion 31
defaultConfig {
applicationId "com.aquaapps.readtorecite"
minSdkVersion 21
targetSdkVersion 31
versionCode 6
versionName "v1.0-beta-2"
versionCode 7
versionName "v1.0-beta-3"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
signingConfig signingConfigs.sign
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ public boolean onOptionsItemSelected(MenuItem item) {
}
isShowingPreview = !isShowingPreview;
return true;
} else if (id == R.id.clear) {
textInputEditText.setText("");
}

return super.onOptionsItemSelected(item);
Expand Down Expand Up @@ -139,7 +141,7 @@ public void Initialize() {
Properties.initialize(this);
textInputEditText = findViewById(R.id.input_text);
textInputEditText.setText(Properties.readString(PropertiesKeys.LAST_RECITE_CONTENT));
Log.d("I",Properties.readString(PropertiesKeys.LAST_RECITE_CONTENT));
Log.d("I", Properties.readString(PropertiesKeys.LAST_RECITE_CONTENT));
// Instance Camera
cameraController = new CameraController(this);
}
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/layout/content_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
android:scrollX="10dp"
android:scrollbars="vertical"
android:textColorHint="#0097A7"
android:textSize="30sp" />
android:textSize="30sp"
tools:text="@string/readme" />
</com.google.android.material.textfield.TextInputLayout>

<androidx.camera.view.PreviewView
android:id="@+id/previewView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="visible">
android:layout_height="match_parent">

</androidx.camera.view.PreviewView>

Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/menu/menu_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,9 @@
android:orderInCategory="100"
android:title="@string/action_preview_disabled"
app:showAsAction="never" />
<item
android:id="@+id/clear"
android:orderInCategory="99"
android:title="@string/clear_content"
app:showAsAction="never" />
</menu>
22 changes: 22 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,26 @@
<string name="action_preview_enabled">显示预览</string>
<string name="description_record">录制</string>
<string name="detail_inputbox">在此输入背诵内容</string>
<string name="clear_content">清空背诵内容</string>
<string name="readme">
当前版本: v1.0-beta-3<br/>
兼容Android 5.1版本,兼容不支持分屏的Android系统<br/>
Author: Github@aquamarine5<br/>
如何使用?(必读):<br/>
点击右上角的三个点可以切换录制预览和背诵内容<br/>
音量+/-可以滚动背诵内容<br/>
点击右下悬浮按钮可以录制背诵视频<br/>
再次点击按钮结束录制,并调用分享<br/>
Changelog:<br/>
beta-3 新内容:<br/>
新增清屏按钮<br/>
加入Readme<br/>
beta-2 新内容:<br/>
通过Properties类和PropertieKeys来设置获取首选项<br/>
DataStorage包含了存储相关的方法(getFile,read,write)<br/>
通过onSaveInstanceState和onRestoreInstanceState存储背诵位置和背诵内容<br/>
ExpectionCatcher捕获一些错误并显示AlertDialog<br/>
在onCreate开始就请求权限<br/>
对上划进行不小于0的限制<br/>
</string>
</resources>

0 comments on commit 3af1d35

Please sign in to comment.