27
27
import androidx .annotation .Nullable ;
28
28
import androidx .appcompat .app .AppCompatActivity ;
29
29
30
+ import com .blankj .utilcode .util .KeyboardUtils ;
30
31
import com .blankj .utilcode .util .StringUtils ;
31
32
32
33
import org .apache .commons .io .FileUtils ;
@@ -58,7 +59,6 @@ public void onNewIntent(final Intent intent) {
58
59
private void handleIntent (final Intent intent ) {
59
60
final String data = intent .getDataString ();
60
61
if (StringUtils .equals (data , "appendDailynote" )) {
61
- Log .i ("shortcut" , "Append to daily note" );
62
62
setupFullScreenInput ();
63
63
return ;
64
64
}
@@ -68,7 +68,10 @@ private void handleIntent(final Intent intent) {
68
68
69
69
private void setupFullScreenInput () {
70
70
final EditText input = findViewById (R .id .full_screen_input );
71
- input .requestFocus ();
71
+ this .runOnUiThread (() -> {
72
+ input .requestFocus ();
73
+ KeyboardUtils .showSoftInput (this );
74
+ });
72
75
73
76
final Button submitButton = findViewById (R .id .submit_button );
74
77
submitButton .setOnClickListener (v -> {
@@ -78,7 +81,7 @@ private void setupFullScreenInput() {
78
81
}
79
82
80
83
final long now = System .currentTimeMillis ();
81
- final String dailynotesDir = getExternalFilesDir (null ).getAbsolutePath () + "/home/shortcuts/ailynotes /" ;
84
+ final String dailynotesDir = getExternalFilesDir (null ).getAbsolutePath () + "/home/.config/siyuan/ shortcuts/dailynotes /" ;
82
85
new File (dailynotesDir ).mkdirs ();
83
86
final File f = new File (dailynotesDir , now + ".md" );
84
87
try {
0 commit comments