Merge pull request #1751 from keymanapp/android-config-menus

[Android] Add "Settings" menu
This commit is contained in:
Darcy Wong 2019-05-03 09:40:06 +07:00 committed by GitHub
commit fcbd7db229
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 376 additions and 209 deletions

View file

@ -109,6 +109,7 @@ dependencies {
implementation('com.crashlytics.sdk.android:crashlytics:2.9.9@aar') {
transitive = true
}
implementation 'androidx.preference:preference:1.1.0-alpha04'
}
/*

View file

@ -1,91 +1,89 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tavultesoft.kmapro" >
package="com.tavultesoft.kmapro">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.VIBRATE" />
<application
android:hardwareAccelerated="true"
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:roundIcon="@drawable/ic_launcher_round"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<receiver android:name="com.tavultesoft.kmapro.NetworkStateReceiver" >
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
</receiver>
<application
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@drawable/ic_launcher_round"
android:theme="@style/AppTheme">
<receiver android:name=".NetworkStateReceiver">
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
</receiver>
<service
android:name="com.keyman.android.SystemKeyboard"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize"
android:permission="android.permission.BIND_INPUT_METHOD" >
<intent-filter>
<action android:name="android.view.InputMethod" />
</intent-filter>
<service
android:name="com.keyman.android.SystemKeyboard"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize"
android:permission="android.permission.BIND_INPUT_METHOD">
<intent-filter>
<action android:name="android.view.InputMethod" />
</intent-filter>
<meta-data
android:name="android.view.im"
android:resource="@xml/method" />
</service>
<meta-data
android:name="android.view.im"
android:resource="@xml/method" />
</service>
<service
android:name="com.tavultesoft.kmea.util.DownloadIntentService"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize"
android:exported="true" />
<service
android:name="com.tavultesoft.kmea.util.DownloadIntentService"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize"
android:exported="true"
/>
<activity
android:name=".SplashScreenActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.BrandedLaunch">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<activity
android:name="com.tavultesoft.kmapro.SplashScreenActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.BrandedLaunch" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize"
android:label="@string/app_name"
android:launchMode="singleTask">
<activity
android:name="com.tavultesoft.kmapro.MainActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize"
android:label="@string/app_name"
android:launchMode="singleTask">
<!-- See http://stackoverflow.com/questions/1733195/android-intent-filter-for-a-particular-file-extension/2062112#2062112 -->
<!-- See http://stackoverflow.com/questions/1733195/android-intent-filter-for-a-particular-file-extension/2062112#2062112 -->
<!--
<!--
Capture content by MIME type, which is how Gmail broadcasts
attachment open requests. pathPattern and file extensions
are ignored, so the MIME type *MUST* be explicit, otherwise
we will match absolutely every file opened.
-->
<intent-filter
android:priority="50">
<action android:name="android.intent.action.VIEW" />
<intent-filter android:priority="50">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<!-- needed for properly formatted email messages -->
<data
android:mimeType="application/vnd.keyman"
android:scheme="content" />
<!-- needed for mangled email messages -->
<data
android:mimeType="application/keyman"
android:scheme="content" />
<!-- needed for mangled email messages -->
<data
android:mimeType="application/octet-stream"
android:scheme="content" />
</intent-filter>
<!-- needed for properly formatted email messages -->
<data
android:mimeType="application/vnd.keyman"
android:scheme="content" />
<!-- needed for mangled email messages -->
<data
android:mimeType="application/keyman"
android:scheme="content" />
<!-- needed for mangled email messages -->
<data
android:mimeType="application/octet-stream"
android:scheme="content" />
</intent-filter>
<!--
<!--
Capture file open requests (pathPattern is honoured) where no
MIME type is provided in the Intent. An Intent with a null
MIME type will never be matched by a filter with a set MIME
@ -93,31 +91,30 @@
match files with this extension and a non-null MIME type
(even if it is non-null but zero length).
-->
<intent-filter
android:priority="50">
<action android:name="android.intent.action.VIEW" />
<intent-filter android:priority="50">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="file" />
<data android:host="*" />
<data android:scheme="file" />
<data android:host="*" />
<!--
<!--
Work around Android's ugly primitive PatternMatcher
implementation that can't cope with finding a . early in
the path unless it's explicitly matched.
-->
<data android:pathPattern=".*\\.kmp" />
<data android:pathPattern=".*\\..*\\.kmp" />
<data android:pathPattern=".*\\..*\\..*\\.kmp" />
<data android:pathPattern=".*\\..*\\..*\\..*\\.kmp" />
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.kmp" />
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.kmp" />
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.kmp" />
</intent-filter>
<data android:pathPattern=".*\\.kmp" />
<data android:pathPattern=".*\\..*\\.kmp" />
<data android:pathPattern=".*\\..*\\..*\\.kmp" />
<data android:pathPattern=".*\\..*\\..*\\..*\\.kmp" />
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.kmp" />
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.kmp" />
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.kmp" />
</intent-filter>
<!--
<!--
Capture file open requests (pathPattern is honoured) where a
(possibly blank) MIME type is provided in the Intent. This
filter may only be necessary for supporting ES File Explorer,
@ -126,79 +123,84 @@
impossible to match such a type except by using a global
wildcard.
-->
<intent-filter
android:priority="50">
<action android:name="android.intent.action.VIEW" />
<intent-filter android:priority="50">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="file" />
<data android:host="*" />
<data android:mimeType="*/*" />
<data android:scheme="file" />
<data android:host="*" />
<data android:mimeType="*/*" />
<!--
<!--
Work around Android's ugly primitive PatternMatcher
implementation that can't cope with finding a . early in
the path unless it's explicitly matched.
-->
<data android:pathPattern=".*\\.kmp" />
<data android:pathPattern=".*\\..*\\.kmp" />
<data android:pathPattern=".*\\..*\\..*\\.kmp" />
<data android:pathPattern=".*\\..*\\..*\\..*\\.kmp" />
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.kmp" />
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.kmp" />
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.kmp" />
</intent-filter>
<data android:pathPattern=".*\\.kmp" />
<data android:pathPattern=".*\\..*\\.kmp" />
<data android:pathPattern=".*\\..*\\..*\\.kmp" />
<data android:pathPattern=".*\\..*\\..*\\..*\\.kmp" />
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.kmp" />
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.kmp" />
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.kmp" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- http:// and https:// protocols -->
<data android:scheme="http" android:host="*" android:pathPattern=".*\\.kmp" />
<data android:scheme="https" android:host="*" android:pathPattern=".*\\.kmp" />
</intent-filter>
<!-- http:// and https:// protocols -->
<data
android:host="*"
android:pathPattern=".*\\.kmp"
android:scheme="http" />
<data
android:host="*"
android:pathPattern=".*\\.kmp"
android:scheme="https" />
</intent-filter>
</activity>
<activity
android:name=".InfoActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize"
android:label="@string/app_name"></activity>
<activity
android:name=".WebBrowserActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize"
android:label="@string/app_name"></activity>
<activity
android:name=".BookmarksActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize"
android:label="@string/app_name"></activity>
<activity
android:name=".PackageActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize"
android:label="@string/app_name"></activity>
<activity
android:name=".GetStartedActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize"
android:label="@string/app_name"
android:launchMode="singleTask"
android:theme="@style/Theme.AppCompat.Light.Dialog"></activity>
<activity
android:name=".KeymanSettingsActivity"
android:label="@string/keyman_settings"
android:parentActivityName=".MainActivity"
android:launchMode="singleTask"
android:theme="@style/AppTheme.Base" />
</activity>
<activity
android:name="com.tavultesoft.kmapro.InfoActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize"
android:label="@string/app_name" >
</activity>
<activity
android:name="com.tavultesoft.kmapro.WebBrowserActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize"
android:label="@string/app_name" >
</activity>
<activity
android:name="com.tavultesoft.kmapro.BookmarksActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize"
android:label="@string/app_name" >
</activity>
<activity
android:name="com.tavultesoft.kmapro.PackageActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize"
android:label="@string/app_name" >
</activity>
<activity
android:name="com.tavultesoft.kmapro.GetStartedActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize"
android:label="@string/app_name"
android:launchMode="singleTask"
android:theme="@style/Theme.AppCompat.Light.Dialog" >
</activity>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="com.tavultesoft.kmapro.fileProvider"
android:grantUriPermissions="true"
android:exported="false">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
</application>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="com.tavultesoft.kmapro.fileProvider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
</application>
</manifest>

View file

@ -32,6 +32,7 @@ public class GetStartedActivity extends AppCompatActivity {
private static ListView listView = null;
private static ArrayList<HashMap<String, String>> list = null;
private static KMListAdapter listAdapter = null;
protected static final String showGetStartedKey = "ShowGetStarted";
private final String iconKey = "icon";
private final String textKey = "text";
private final String isEnabledKey = "isEnabled";
@ -53,15 +54,15 @@ public class GetStartedActivity extends AppCompatActivity {
});
final SharedPreferences prefs = getSharedPreferences(getString(R.string.kma_prefs_name), Context.MODE_PRIVATE);
boolean dontShowGetStarted = prefs.getBoolean(MainActivity.dontShowGetStartedKey, false);
boolean showGetStarted = prefs.getBoolean(showGetStartedKey, true);
final CheckBox checkBox = (CheckBox) findViewById(R.id.checkBox);
checkBox.setChecked(dontShowGetStarted);
checkBox.setChecked(showGetStarted);
checkBox.setOnCheckedChangeListener(new OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
SharedPreferences.Editor editor = prefs.edit();
editor.putBoolean(MainActivity.dontShowGetStartedKey, isChecked);
editor.putBoolean(showGetStartedKey, isChecked);
editor.commit();
}
});

View file

@ -0,0 +1,26 @@
package com.tavultesoft.kmapro;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
public class KeymanSettingsActivity extends AppCompatActivity {
protected static final String installedLanguagesKey = "InstalledLanguages";
protected static final String showBannerKey = "ShowBanner";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.keyman_settings_layout);
Toolbar toolbar = (Toolbar) findViewById(R.id.keyman_settings_toolbar);
toolbar.setTitleTextColor(getResources().getColor(android.R.color.white));
setSupportActionBar(toolbar);
if (getSupportActionBar() != null) {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(true);
getSupportActionBar().setDisplayShowTitleEnabled(true);
}
}
}

View file

@ -0,0 +1,57 @@
package com.tavultesoft.kmapro;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import androidx.preference.Preference;
import androidx.preference.PreferenceFragmentCompat;
import androidx.preference.PreferenceScreen;
import androidx.preference.SwitchPreference;
import com.tavultesoft.kmea.KMManager;
import java.util.ArrayList;
import java.util.HashMap;
public class KeymanSettingsFragment extends PreferenceFragmentCompat {
private static final String TAG = "SettingsFragment";
private static Context context;
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
context = getActivity();
PreferenceScreen screen = getPreferenceManager().createPreferenceScreen(context);
// Set the filename so this Fragment uses the common preferences file as other Activities
getPreferenceManager().setSharedPreferencesName(getString(R.string.kma_prefs_name));
Preference languagesPreference = new Preference(context);
ArrayList<HashMap<String, String>> kbList = KMManager.getKeyboardsList(context);
String keyboardCount = (kbList != null && kbList.size() > 1) ?
String.format(" (%d)", kbList.size()) : "";
languagesPreference.setKey(KeymanSettingsActivity.installedLanguagesKey);
languagesPreference.setTitle(getString(R.string.installed_languages) + keyboardCount);
languagesPreference.setWidgetLayoutResource(R.layout.preference_icon_layout);
Intent languagesIntent = new Intent();
languagesIntent.setClassName(context.getPackageName(), "com.tavultesoft.kmea.KeyboardPickerActivity");
languagesIntent.putExtra(KMManager.KMKey_DisplayKeyboardSwitcher, false);
languagesPreference.setIntent(languagesIntent);
SwitchPreference bannerPreference = new SwitchPreference(context);
bannerPreference.setKey(KeymanSettingsActivity.showBannerKey);
bannerPreference.setTitle(getString(R.string.show_banner));
bannerPreference.setSummaryOn(getString(R.string.show_banner_on));
SwitchPreference getStartedPreference = new SwitchPreference(context);
getStartedPreference.setKey(GetStartedActivity.showGetStartedKey);
getStartedPreference.setTitle(getString(R.string.show_get_started));
getStartedPreference.setDefaultValue(true);
screen.addPreference(languagesPreference);
screen.addPreference(bannerPreference);
screen.addPreference(getStartedPreference);
setPreferenceScreen(screen);
}
}

View file

@ -90,7 +90,6 @@ public class MainActivity extends AppCompatActivity implements OnKeyboardEventLi
private int textSize = minTextSize;
private static final String userTextKey = "UserText";
private static final String userTextSizeKey = "UserTextSize";
protected static final String dontShowGetStartedKey = "DontShowGetStarted";
protected static final String didCheckUserDataKey = "DidCheckUserData";
private Toolbar toolbar;
private Menu menu;
@ -383,6 +382,9 @@ public class MainActivity extends AppCompatActivity implements OnKeyboardEventLi
case R.id.action_get_started:
showGetStarted();
return true;
case R.id.action_settings:
showSettings();
return true;
default:
return super.onOptionsItemSelected(item);
}
@ -593,8 +595,8 @@ public class MainActivity extends AppCompatActivity implements OnKeyboardEventLi
private void checkGetStarted() {
SharedPreferences prefs = getSharedPreferences(getString(R.string.kma_prefs_name), Context.MODE_PRIVATE);
boolean dontShowGetStarted = prefs.getBoolean(MainActivity.dontShowGetStartedKey, false);
if (!dontShowGetStarted) {
boolean showGetStarted = prefs.getBoolean(GetStartedActivity.showGetStartedKey, true);
if (showGetStarted) {
boolean shouldShowGetStarted = false;
ArrayList<HashMap<String, String>> kbList = KMManager.getKeyboardsList(this);
if (kbList != null && kbList.size() < 2)
@ -726,6 +728,11 @@ public class MainActivity extends AppCompatActivity implements OnKeyboardEventLi
startActivity(getStartedIntent);
}
private void showSettings() {
Intent settingsIntent = new Intent(this, KeymanSettingsActivity.class);
startActivity(settingsIntent);
}
public static Drawable getActionBarDrawable(Context context) {
Point size = new Point();
WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -45,7 +45,7 @@
android:layout_marginLeft="@dimen/checkbox_margin_left"
android:layout_marginStart="@dimen/checkbox_margin_left"
android:layout_gravity="center_vertical"
android:text="@string/dont_show_again" />
android:text="@string/show_get_started" />
</LinearLayout>

View file

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:elevation="0dp">
<androidx.appcompat.widget.Toolbar
android:id="@+id/keyman_settings_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/keyman_blue">
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.AppBarLayout>
<fragment
android:layout_marginTop="?attr/actionBarSize"
android:id="@+id/keyman_settings_fragment"
android:name="com.tavultesoft.kmapro.KeymanSettingsFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="@dimen/preference_icon"
android:layout_height="@dimen/preference_icon"
android:src="@drawable/ic_arrow_forward" />

View file

@ -38,5 +38,11 @@
app:showAsAction="always"
android:title="@string/get_started"
android:icon="@drawable/ic_action_get_started" />
<item
android:id="@+id/action_settings"
app:showAsAction="always"
android:title="@string/action_settings"
android:icon="@drawable/ic_settings" />
</menu>

View file

@ -38,5 +38,11 @@
app:showAsAction="always"
android:title="@string/get_started"
android:icon="@drawable/ic_action_get_started" />
<item
android:id="@+id/action_settings"
app:showAsAction="always"
android:title="@string/action_settings"
android:icon="@drawable/ic_settings" />
</menu>

View file

@ -27,7 +27,7 @@
android:id="@+id/action_text_size"
android:title="@string/action_text_size"
app:showAsAction="never"
android:icon="@drawable/ic_light_action_textsize"/>
android:icon="@drawable/ic_light_action_textsize" />
<item
android:id="@+id/action_clear_text"
@ -46,6 +46,13 @@
android:title="@string/get_started"
app:showAsAction="never"
android:icon="@drawable/ic_action_get_started" />
<item
android:id="@+id/action_settings"
android:title="@string/action_settings"
app:showAsAction="never"
android:icon="@drawable/ic_settings" />
</menu>
</item>
</menu>

View file

@ -10,5 +10,5 @@
<dimen name="checkbox_margin">18dp</dimen>
<dimen name="checkbox_margin_left">12dp</dimen>
<dimen name="checkbox_padding">10dp</dimen>
<dimen name="preference_icon">32dp</dimen>
</resources>

View file

@ -10,5 +10,5 @@
<dimen name="checkbox_margin">8dp</dimen>
<dimen name="checkbox_margin_left">15dp</dimen>
<dimen name="checkbox_padding">10dp</dimen>
<dimen name="preference_icon">32dp</dimen>
</resources>

View file

@ -11,5 +11,5 @@
<dimen name="checkbox_margin">8dp</dimen>
<dimen name="checkbox_margin_left">15dp</dimen>
<dimen name="checkbox_padding">10dp</dimen>
<dimen name="preference_icon">32dp</dimen>
</resources>

View file

@ -20,6 +20,10 @@
<item name="dialogTheme">@style/AppTheme.Dialog</item>
<item name="alertDialogTheme">@style/AppTheme.Dialog.Alert</item>
<item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.Toolbar" parent="Base.Widget.AppCompat.Toolbar">

View file

@ -13,5 +13,5 @@
<dimen name="checkbox_margin">8dp</dimen>
<dimen name="checkbox_margin_left">15dp</dimen>
<dimen name="checkbox_padding">10dp</dimen>
<dimen name="preference_icon">32dp</dimen>
</resources>

View file

@ -1,58 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name" translatable="false">Keyman</string>
<string name="app_name" translatable="false">Keyman</string>
<string name="action_share" translatable="false">Share</string>
<string name="action_web" translatable="false">Web Browser</string>
<string name="action_text_size" translatable="false">Text Size</string>
<string name="action_overflow" translatable="false">More</string>
<string name="action_clear_text" translatable="false">Clear Text</string>
<string name="action_info" translatable="false">Info</string>
<string name="title_version" translatable="false">Version</string>
<!-- &#8230; is the ellipsis character "..." -->
<string name="textview_hint" translatable="false">Start typing here&#8230;</string>
<string name="action_share" translatable="false">Share</string>
<string name="action_web" translatable="false">Web Browser</string>
<string name="action_text_size" translatable="false">Text Size</string>
<string name="action_overflow" translatable="false">More</string>
<string name="action_clear_text" translatable="false">Clear Text</string>
<string name="action_info" translatable="false">Info</string>
<string name="action_settings" translatable="false">Settings</string>
<string name="title_version" translatable="false">Version</string>
<!-- &#8230; is the ellipsis character "..." -->
<string name="textview_hint" translatable="false">Start typing here&#8230;</string>
<!-- Splash screen (version/copyright info currently disabled -->
<string name="splash_copyright" translatable="false">Copyright &#169; 1992-</string>
<!-- Splash screen (version/copyright info currently disabled -->
<string name="splash_copyright" translatable="false">Copyright &#169; 1992-</string>
<!-- Text Size dialog -->
<string name="ic_text_size_up" translatable="false">Text size up</string>
<string name="ic_text_size_down" translatable="false">Text size down</string>
<!-- Text Size dialog -->
<string name="ic_text_size_up" translatable="false">Text size up</string>
<string name="ic_text_size_down" translatable="false">Text size down</string>
<!-- Clear Text dialog -->
<string name="all_text_will_be_cleared" translatable="false">All text will be cleared</string>
<!-- Clear Text dialog -->
<string name="all_text_will_be_cleared" translatable="false">All text will be cleared</string>
<!-- Info screen reuses title_version -->
<!-- Info screen reuses title_version -->
<!-- Get Started menu strings -->
<string name="get_started" translatable="false">Get Started</string>
<string name="add_a_keyboard" translatable="false">Add a keyboard for your language</string>
<string name="enable_system_keyboard" translatable="false">Enable Keyman as system-wide keyboard</string>
<string name="set_keyman_as_default" translatable="false">Set Keyman as default keyboard</string>
<string name="more_info" translatable="false">More info</string>
<string name="dont_show_again" translatable="false">Don\'t show again</string>
<!-- Get Started menu strings -->
<string name="get_started" translatable="false">Get Started</string>
<string name="add_a_keyboard" translatable="false">Add a keyboard for your language</string>
<string name="enable_system_keyboard" translatable="false">Enable Keyman as system-wide keyboard</string>
<string name="set_keyman_as_default" translatable="false">Set Keyman as default keyboard</string>
<string name="more_info" translatable="false">More info</string>
<string name="show_get_started" translatable="false">Show \"Get Started\" on startup</string>
<!-- Web Browser strings -->
<string name="hint_text" translatable="false">Search or type URL</string>
<string name="title_bookmarks" translatable="false">Bookmarks</string>
<string name="no_bookmarks" translatable="false">No Bookmarks</string>
<string name="add_bookmark" translatable="false">Add Bookmark</string>
<string name="hint_title" translatable="false">Title</string>
<string name="hint_url" translatable="false">Url</string>
<!-- Keyman Settings menu strings -->
<string name="keyman_settings" translatable="false">Settings</string>
<string name="installed_languages" translatable="false">Installed Languages</string>
<string name="show_banner" translatable="false">Show banner</string>
<string name="show_banner_on" translatable="false">Cannot be switched off when predictive text is enabled</string>
<!-- reuse show_get_started -->
<!-- KMP Package strings -->
<string name="title_package" translatable="false">Package</string>
<string name="title_failed_to_install" translatable="false">failed to install</string>
<string name="downloading_keyboard_package" translatable="false">Downloading keyboard package</string>
<string name="failed_to_extract" translatable="false">Failed to extract</string>
<string name="install_keyboard_package" translatable="false">Install Keyboard Package</string>
<string name="install_predictive_text_package" translatable="false">Install Predictive Text Package</string>
<string name="no_new_touch_keyboards_to_install" translatable="false">No new touch-optimized keyboards to install</string>
<string name="no_new_predictive_text_to_install" translatable="false">No new predictive text to install</string>
<string name="no_valid_touch_keyboards_to_install" translatable="false">No valid touch-optimized keyboards to install</string>
<string name="no_targets_to_install" translatable="false">No keyboards or predictive text to install</string>
<string name="missing_metadata" translatable="false">kmp.json does not exist</string>
<string name="invalid_metadata" translatable="false">Invalid metadata in package</string>
<!-- Language Settings menu strings -->
<string name="enable_corrections" translatable="false">Enable corrections</string>
<string name="enable_predictions" translatable="false">Enable predictions</string>
<string name="model" translatable="false">Model</string>
<!-- Web Browser strings -->
<string name="hint_text" translatable="false">Search or type URL</string>
<string name="title_bookmarks" translatable="false">Bookmarks</string>
<string name="no_bookmarks" translatable="false">No Bookmarks</string>
<string name="add_bookmark" translatable="false">Add Bookmark</string>
<string name="hint_title" translatable="false">Title</string>
<string name="hint_url" translatable="false">Url</string>
<!-- KMP Package strings -->
<string name="title_package" translatable="false">Package</string>
<string name="title_failed_to_install" translatable="false">failed to install</string>
<string name="downloading_keyboard_package" translatable="false">Downloading keyboard package</string>
<string name="failed_to_extract" translatable="false">Failed to extract</string>
<string name="install_keyboard_package" translatable="false">Install Keyboard Package</string>
<string name="install_predictive_text_package" translatable="false">Install Predictive Text Package</string>
<string name="no_new_touch_keyboards_to_install" translatable="false">No new touch-optimized keyboards to install</string>
<string name="no_new_predictive_text_to_install" translatable="false">No new predictive text to install</string>
<string name="no_valid_touch_keyboards_to_install" translatable="false">No valid touch-optimized keyboards to install</string>
<string name="no_targets_to_install" translatable="false">No keyboards or predictive text to install</string>
<string name="missing_metadata" translatable="false">kmp.json does not exist</string>
<string name="invalid_metadata" translatable="false">Invalid metadata in package</string>
</resources>

View file

@ -14,6 +14,9 @@
<item name="android:textColorHint">@color/neutral_3</item>
<item name="android:textColorPrimary">@android:color/black</item>
<item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to

View file

@ -1,6 +1,7 @@
# Keyman for Android
## 12.0 alpha
* Add new "Settings" menu (#1751)
* Update compile and target Android SDK version to 28 (#1654)
* Add feature to install lexical model packages (#1641, 1653)
* Started work on Keyman for Android 12.