Skip to content
This repository has been archived by the owner on Jun 8, 2024. It is now read-only.

Commit

Permalink
Layout: Add tips for users
Browse files Browse the repository at this point in the history
Signed-off-by: fython <fython@163.com>
  • Loading branch information
fython committed Feb 2, 2016
1 parent c6b289e commit 274f184
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 7 deletions.
8 changes: 2 additions & 6 deletions app/src/main/java/info/papdt/blackblub/ui/LaunchActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,11 @@ public void onClick(DialogInterface dialogInterface, int i) {
mSettings.putBoolean(Settings.KEY_FIRST_RUN, false);
}
})
.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
hasDismissFirstRunDialog = true;
}
})
.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialogInterface) {
if (hasDismissFirstRunDialog) return;
hasDismissFirstRunDialog = true;
mSwitch.toggle();
if (mSettings.getBoolean(Settings.KEY_FIRST_RUN, true)) {
Intent intent = new Intent(LaunchActivity.this, MaskService.class);
Expand Down
27 changes: 27 additions & 0 deletions app/src/main/res/layout/activity_setting.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,33 @@
app:dsb_min="25"
app:dsb_max="100"/>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="24dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:orientation="horizontal"
android:layout_gravity="center">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/text_dark"
android:textColor="?attr/icon_tint"/>

<View
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/text_light"
android:textColor="?attr/icon_tint"/>

</LinearLayout>

</LinearLayout>

</android.support.v7.widget.CardView>
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
<string name="action_overlay_system">覆盖系统状态栏</string>
<string name="action_dark_theme">暗色主题</string>

<string name="text_light">亮</string>
<string name="text_dark">暗</string>

<string name="about_author">作者: 纸飞机开发团队 - 烧饼</string>
<string name="about_text">"夜间屏幕可以帮助你减少夜晚屏幕强光对眼睛造成的损害。\n一些设备的最低亮度对于用户来讲仍然较高,我们可以通过创建遮罩使亮度更低。\n\n如果你想在物质上支持这个应用,你可以打赏到我的支付宝ww: 316643843\@qq.com"</string>
<string name="about_other">Github 项目地址: <a href="https://github.com/fython/Blackbulb">https://github.com/fython/Blackbulb</a>\n我的博客: <a href="http://feng.moe">http://feng.moe</a>\n新浪微博: <a href="http://weibo.com/fython">http://weibo.com/fython</a>\n图标设计: 新浪\@翟宅宅Jack</string>
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values-zh-rTW/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
<string name="action_overlay_system">覆蓋系統狀態列</string>
<string name="action_dark_theme">暗色主題</string>

<string name="text_light">亮</string>
<string name="text_dark">暗</string>

<string name="about_author">作者: 紙飛機開發團隊 - 燒餅</string>
<string name="about_text">"夜间荧幕有助減少夜間螢幕強光對視力造成的損傷。\n一些設備對某些用戶而言仍偏高,我們可以通過創建遮罩以讓亮度更低。\n\n如果你願意在物質上支援本應用程式,你可以打賞到我的支付寶ww: 316643843\@qq.com"</string>
<string name="about_other">Github 項目地址: <a href="https://github.com/fython/Blackbulb">https://github.com/fython/Blackbulb</a>\n我的博客: <a href="http://feng.moe">http://feng.moe</a>\n新浪微博: <a href="http://weibo.com/fython">http://weibo.com/fython</a>\n徽標設計: 新浪\@翟宅宅Jack</string>
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
<string name="action_overlay_system">Overlay Status Bar</string>
<string name="action_dark_theme">Dark theme</string>

<string name="text_light">LIGHT</string>
<string name="text_dark">DARK</string>

<string name="about_author">Author: Paper Airplane Dev - Fung Jichun</string>
<string name="about_text">"Night Screen can help you prevent from the harm of strong light at night.\nSome devices\' lowest brightness are still high so we can make it lower by creating a mask on screen.\n\nIf you want to support this application, you could send a bit money to my Alipay: 316643843\@qq.com"</string>
<string name="about_other">Github Repo: <a href="https://github.com/fython/Blackbulb">https://github.com/fython/Blackbulb</a>\nMy blog: <a href="http://feng.moe">http://feng.moe</a>\nMy sina weibo: <a href="http://weibo.com/fython">\@某烧饼</a>\nLogo Designer: Google+ Youlun Zhai</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<item name="card_background_color">#212121</item>
<item name="progress_bar_color">#eeeeee</item>
<item name="icon_tint">#ffffff</item>
<item name="overflow_tint">#6fffffff</item>
<item name="overflow_tint">#afffffff</item>
</style>

<style name="AppTheme" parent="BaseAppTheme.Light"></style>
Expand Down

0 comments on commit 274f184

Please sign in to comment.