-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #259 from GuoXiCheng/dev-c
Dev
- Loading branch information
Showing
11 changed files
with
126 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
## 未发布 | ||
|
||
### 新增 | ||
|
||
- 基于 Android MVVM 架构重构项目 | ||
- 新增「发生故障」标识,方便判断无障碍是否发生故障 | ||
- 新增「布局检查」功能 | ||
- 新增「自定义配置」功能 [#188](https://github.com/GuoXiCheng/SKIP/issues/188) [#237](https://github.com/GuoXiCheng/SKIP/issues/237) | ||
- 新的可配置项:`activityName`、`click` | ||
- 新增「后台隐藏」选项 [#196](https://github.com/GuoXiCheng/SKIP/issues/196) | ||
- 应用保活新增常驻通知栏功能 | ||
- 新增「严格模式」启用开关 | ||
- 页面右上角新增「功能介绍」入口 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
app/src/main/java/com/android/skip/ui/main/tutorial/TutorialDialog.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package com.android.skip.ui.main.tutorial | ||
|
||
import androidx.compose.material3.AlertDialog | ||
import androidx.compose.material3.Button | ||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.material3.Text | ||
import androidx.compose.material3.TextButton | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.livedata.observeAsState | ||
import androidx.compose.ui.res.stringResource | ||
import com.android.skip.R | ||
|
||
@Composable | ||
fun TutorialDialog( | ||
tutorialViewModel: TutorialViewModel, | ||
onDismiss: () -> Unit, | ||
onConfirm: () -> Unit | ||
) { | ||
val isShowDialog = tutorialViewModel.isShowDialog.observeAsState() | ||
if (isShowDialog.value == true) { | ||
AlertDialog( | ||
containerColor = MaterialTheme.colorScheme.background, | ||
title = { | ||
Text(text = stringResource(id = R.string.dialog_get_started)) | ||
}, | ||
text = { | ||
Text(text = stringResource(id = R.string.dialog_get_started_content)) | ||
}, | ||
onDismissRequest = {}, | ||
confirmButton = { | ||
Button( | ||
onClick = onConfirm | ||
) { | ||
Text(stringResource(id = R.string.dialog_go_at_once)) | ||
} | ||
}, | ||
dismissButton = { | ||
TextButton( | ||
onClick = onDismiss | ||
) { | ||
Text(stringResource(id = R.string.dialog_no_more_reminders)) | ||
} | ||
} | ||
) | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
app/src/main/java/com/android/skip/ui/main/tutorial/TutorialViewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.android.skip.ui.main.tutorial | ||
|
||
import androidx.lifecycle.LiveData | ||
import androidx.lifecycle.MutableLiveData | ||
import androidx.lifecycle.ViewModel | ||
import dagger.hilt.android.lifecycle.HiltViewModel | ||
import javax.inject.Inject | ||
|
||
@HiltViewModel | ||
class TutorialViewModel @Inject constructor() : ViewModel() { | ||
private val _isShowDialog = MutableLiveData<Boolean>() | ||
val isShowDialog: LiveData<Boolean> = _isShowDialog | ||
|
||
fun changeDialogState(showDialog: Boolean) { | ||
_isShowDialog.postValue(showDialog) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# 开始使用 | ||
|
||
## 1. 点击屏幕中央按钮 | ||
|
||
![](/click-button-on-the-screen-dark.png) | ||
|
||
## 2. 点击「使用“SKIP”」 | ||
|
||
![](/use-accessibility-dark.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.