forked from extern/Unexpected-Keyboard
Add a launchable explanatory activity
This activity points to the system settings page for enabling input methods. This is purely a shortcut but is expected by many users. It could be made more useful in the future or hidden whenever the keyboard is enabled.
This commit is contained in:
parent
c4de1ec267
commit
35b4e442ab
@ -13,6 +13,12 @@
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name="juloo.keyboard2.LauncherActivity" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/android:Theme.DeviceDefault" android:exported="true" android:directBootAware="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
<uses-permission android:name="android.permission.VIBRATE"/>
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
|
||||
|
6
res/layout/launcher_activity.xml
Normal file
6
res/layout/launcher_activity.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:padding="16dp">
|
||||
<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/launcher_description"/>
|
||||
<Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginVertical="16dp" android:text="@string/launcher_button_imesettings" android:onClick="launch_imesettings"/>
|
||||
<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/launcher_sourcecode" android:autoLink="web"/>
|
||||
</LinearLayout>
|
@ -73,4 +73,7 @@
|
||||
<string name="key_action_prev">Předchozí</string>
|
||||
<string name="key_action_search">Hledat</string>
|
||||
<string name="key_action_send">Odeslat</string>
|
||||
<!-- <string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string> -->
|
||||
<!-- <string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string> -->
|
||||
<!-- <string name="launcher_button_imesettings">Enable keyboard</string> -->
|
||||
</resources>
|
||||
|
@ -73,4 +73,7 @@
|
||||
<string name="key_action_prev">Vorheriges</string>
|
||||
<string name="key_action_search">Suchen</string>
|
||||
<string name="key_action_send">Senden</string>
|
||||
<!-- <string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string> -->
|
||||
<!-- <string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string> -->
|
||||
<!-- <string name="launcher_button_imesettings">Enable keyboard</string> -->
|
||||
</resources>
|
||||
|
@ -73,4 +73,7 @@
|
||||
<string name="key_action_prev">Anterior</string>
|
||||
<string name="key_action_search">Buscar</string>
|
||||
<string name="key_action_send">Enviar</string>
|
||||
<!-- <string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string> -->
|
||||
<!-- <string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string> -->
|
||||
<!-- <string name="launcher_button_imesettings">Enable keyboard</string> -->
|
||||
</resources>
|
||||
|
@ -73,4 +73,7 @@
|
||||
<string name="key_action_prev">Prec.</string>
|
||||
<string name="key_action_search">Chercher</string>
|
||||
<string name="key_action_send">Envoyer</string>
|
||||
<!-- <string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string> -->
|
||||
<!-- <string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string> -->
|
||||
<!-- <string name="launcher_button_imesettings">Enable keyboard</string> -->
|
||||
</resources>
|
||||
|
@ -73,4 +73,7 @@
|
||||
<string name="key_action_prev">Precedente</string>
|
||||
<string name="key_action_search">Cerca</string>
|
||||
<string name="key_action_send">Invia</string>
|
||||
<!-- <string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string> -->
|
||||
<!-- <string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string> -->
|
||||
<!-- <string name="launcher_button_imesettings">Enable keyboard</string> -->
|
||||
</resources>
|
||||
|
@ -73,4 +73,7 @@
|
||||
<string name="key_action_prev">이전</string>
|
||||
<string name="key_action_search">검색</string>
|
||||
<string name="key_action_send">보내기</string>
|
||||
<!-- <string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string> -->
|
||||
<!-- <string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string> -->
|
||||
<!-- <string name="launcher_button_imesettings">Enable keyboard</string> -->
|
||||
</resources>
|
||||
|
@ -73,4 +73,7 @@
|
||||
<string name="key_action_prev">Iepriekšējais</string>
|
||||
<string name="key_action_search">Meklēt</string>
|
||||
<string name="key_action_send">Sūtīt</string>
|
||||
<!-- <string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string> -->
|
||||
<!-- <string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string> -->
|
||||
<!-- <string name="launcher_button_imesettings">Enable keyboard</string> -->
|
||||
</resources>
|
||||
|
@ -73,4 +73,7 @@
|
||||
<string name="key_action_prev">Wstecz</string>
|
||||
<string name="key_action_search">Szukaj</string>
|
||||
<string name="key_action_send">Wyślij</string>
|
||||
<!-- <string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string> -->
|
||||
<!-- <string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string> -->
|
||||
<!-- <string name="launcher_button_imesettings">Enable keyboard</string> -->
|
||||
</resources>
|
||||
|
@ -73,4 +73,7 @@
|
||||
<string name="key_action_prev">Anterior</string>
|
||||
<string name="key_action_search">Buscar</string>
|
||||
<string name="key_action_send">Enviar</string>
|
||||
<!-- <string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string> -->
|
||||
<!-- <string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string> -->
|
||||
<!-- <string name="launcher_button_imesettings">Enable keyboard</string> -->
|
||||
</resources>
|
||||
|
@ -73,4 +73,7 @@
|
||||
<string name="key_action_prev">Предыдущий</string>
|
||||
<string name="key_action_search">Поиск</string>
|
||||
<string name="key_action_send">Отправить</string>
|
||||
<!-- <string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string> -->
|
||||
<!-- <string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string> -->
|
||||
<!-- <string name="launcher_button_imesettings">Enable keyboard</string> -->
|
||||
</resources>
|
||||
|
@ -73,4 +73,7 @@
|
||||
<string name="key_action_prev">Geri</string>
|
||||
<string name="key_action_search">Ara</string>
|
||||
<string name="key_action_send">Gönder</string>
|
||||
<!-- <string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string> -->
|
||||
<!-- <string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string> -->
|
||||
<!-- <string name="launcher_button_imesettings">Enable keyboard</string> -->
|
||||
</resources>
|
||||
|
@ -75,4 +75,7 @@
|
||||
<string name="key_action_prev">Trước</string>
|
||||
<string name="key_action_search">Tìm</string>
|
||||
<string name="key_action_send">Gửi</string>
|
||||
<!-- <string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string> -->
|
||||
<!-- <string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string> -->
|
||||
<!-- <string name="launcher_button_imesettings">Enable keyboard</string> -->
|
||||
</resources>
|
||||
|
@ -73,4 +73,7 @@
|
||||
<string name="key_action_prev">前一项</string>
|
||||
<string name="key_action_search">搜索</string>
|
||||
<string name="key_action_send">发送</string>
|
||||
<!-- <string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string> -->
|
||||
<!-- <string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string> -->
|
||||
<!-- <string name="launcher_button_imesettings">Enable keyboard</string> -->
|
||||
</resources>
|
||||
|
@ -73,4 +73,7 @@
|
||||
<string name="key_action_prev">Prev</string>
|
||||
<string name="key_action_search">Search</string>
|
||||
<string name="key_action_send">Send</string>
|
||||
<string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string>
|
||||
<string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on <a href="https://github.com/Julow/Unexpected-Keyboard/">Github</a>.</string>
|
||||
<string name="launcher_button_imesettings">Enable keyboard</string>
|
||||
</resources>
|
||||
|
26
srcs/juloo.keyboard2/LauncherActivity.java
Normal file
26
srcs/juloo.keyboard2/LauncherActivity.java
Normal file
@ -0,0 +1,26 @@
|
||||
package juloo.keyboard2;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.provider.Settings;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
|
||||
public class LauncherActivity extends Activity
|
||||
{
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.launcher_activity);
|
||||
}
|
||||
|
||||
public void launch_imesettings(View _btn)
|
||||
{
|
||||
startActivity(new Intent(Settings.ACTION_INPUT_METHOD_SETTINGS));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user