Skip to content

Commit af55311

Browse files
committed
🎨 Supports local shorthands on Android siyuan-note/siyuan#14414
1 parent 9033242 commit af55311

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

app/src/main/java/org/b3log/siyuan/ShortcutActivity.java

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
*/
1818
package org.b3log.siyuan;
1919

20-
import android.annotation.SuppressLint;
2120
import android.app.PendingIntent;
2221
import android.content.Intent;
2322
import android.content.pm.ShortcutInfo;

app/src/main/res/layout/activity_shortcut.xml

+7-3
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,30 @@
1010
android:layout_width="match_parent"
1111
android:layout_height="0dp"
1212
android:layout_weight="1"
13-
android:hint="@string/enter_your_text"
14-
android:inputType="textMultiLine"
1513
android:focusable="true"
1614
android:focusableInTouchMode="true"
17-
android:gravity="top"/>
15+
android:gravity="top"
16+
android:hint="@string/enter_your_text"
17+
android:inputType="textMultiLine"
18+
android:padding="16dp" />
1819

1920
<LinearLayout
21+
style="?android:attr/buttonBarStyle"
2022
android:layout_width="match_parent"
2123
android:layout_height="wrap_content"
2224
android:orientation="horizontal">
2325

2426
<Button
2527
android:id="@+id/submit_button"
28+
style="?android:attr/buttonBarButtonStyle"
2629
android:layout_width="0dp"
2730
android:layout_height="wrap_content"
2831
android:layout_weight="1"
2932
android:text="@string/submit" />
3033

3134
<Button
3235
android:id="@+id/add_to_home_button"
36+
style="?android:attr/buttonBarButtonStyle"
3337
android:layout_width="0dp"
3438
android:layout_height="wrap_content"
3539
android:layout_weight="1"

app/src/main/res/values-zh/strings.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
33
<string name="shortcut_shorthand">闪念速记</string>
4-
<string name="enter_your_text">请输入文本</string>
4+
<string name="enter_your_text">请输入文本,提交后打开思源,点击笔记本旁边的闪电按钮,将所有闪念速记合并创建一个以时间命名的新文档</string>
55
<string name="submit">提交</string>
66
<string name="add_to_home">添加到桌面</string>
77
<string name="add_to_home_success">快捷方式添加到桌面成功</string>

app/src/main/res/values/strings.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
33
<string name="shortcut_shorthand">Flash shorthand</string>
4-
<string name="enter_your_text">Enter your text</string>
4+
<string name="enter_your_text">Please enter the text, submit it, then open SiYuan, click the lightning button next to the notebook, and all the shorthands will be merged to create a new doc named after the time</string>
55
<string name="submit">Submit</string>
66
<string name="add_to_home">Add to Home</string>
77
<string name="add_to_home_success">Added to home successfully</string>

0 commit comments

Comments
 (0)