1
0
mirror of https://gitlab.com/neothefox/LayTray synced 2026-03-23 21:54:54 +03:00

Compare commits

...

56 Commits
1.1 ... master

Author SHA1 Message Date
6714018074 Merge branch '1.9_flags' of https://gitlab.com/mikhail.krupskiy/LayTray 2019-01-11 21:34:37 +03:00
Mikhail Krupskiy
8167c776d7 Ability to select an Icon instead of text. 2019-01-09 11:44:49 +00:00
d137306d09 Pushed version to 1.10 2018-09-18 15:07:32 +03:00
9c62b6a457 Cleaning up the translations and making Lint happy 2018-09-18 15:04:05 +03:00
bdd885de67 moved cs res to the /res folder 2018-09-18 14:55:47 +03:00
1358857959 Merged Czech translation
Updated build tools
2018-09-18 14:53:55 +03:00
630d19514d Merge branch 'master' into 'master'
l10n - added Czech localization

See merge request neothefox/LayTray!3
2018-09-18 10:26:37 +00:00
Pavel Borecki
8b11d25111 l10n - added Czech localization 2018-09-18 10:26:37 +00:00
e245cd7a62 Bumped version to 1.9 2018-07-28 16:47:55 +03:00
644c11097b Show a message on save action 2018-07-28 16:39:03 +03:00
c8d71ad7a9 Fixing small gotchas 2018-07-28 16:23:39 +03:00
0cd75e6760 Fixing small gotchas 2018-07-28 16:19:10 +03:00
4498c4716f Update README.md 2018-07-28 12:56:27 +00:00
bdaa3e84d5 Add README.md 2018-07-28 12:55:51 +00:00
9f6332f9b4 Code cleanup and consistency 2018-07-28 15:52:37 +03:00
7de80ab3ec removed extra files 2018-07-27 20:44:08 +03:00
2af2de6572 added .gitignore 2018-07-27 20:42:37 +03:00
6599166077 Code cleanup 2018-07-27 20:10:29 +03:00
a2779d2585 Set default NotificationChannel importance to low 2018-07-27 20:03:16 +03:00
85ee301a16 Better NotificationChannel handling
Bumped the version to 1.8
2018-07-27 19:59:18 +03:00
bccc0bca6c Quick fix for Oreo
Changes to settings for Oreo
2018-07-26 23:11:33 +03:00
20331b629b Check if Blackberry Keyboard is installed on start 2018-07-18 16:05:53 +03:00
4c92f97ab3 Check if Blackberry Keyboard is installed on start
Bumped version to 1.7
2018-07-18 16:02:05 +03:00
cf94f7c9bb Credited translators 2018-07-12 21:28:48 +03:00
1a01c6430e Merge branch 'master' into 'master'
Master

See merge request neothefox/LayTray!1
2018-07-12 18:24:54 +00:00
Edward Asviacinski
86e1efe3a9 Translate to Belarusian 2018-07-12 17:36:58 +00:00
Edward Asviacinski
654884c2bd Translated to Belarusian 2018-07-12 16:51:42 +00:00
cb77503a63 Update icon as settings change
Better text centering
2018-07-12 14:16:38 +03:00
f312ffb047 Updated service description 2018-07-12 13:50:07 +03:00
3545b82c31 Added service metadata 2018-07-12 13:47:00 +03:00
6b850077b7 Added template for Belorussian translation 2018-07-12 12:40:21 +03:00
3e2d80eae1 Removed old dependency 2018-07-12 11:55:09 +03:00
ab6068975d Hide notification from lockscreen 2018-07-12 11:14:03 +03:00
a16083b21d Bumped version to 1.6 2018-07-12 11:13:41 +03:00
ab3ba24f6c Added untranslatable strings so Lint wouldn't complain 2018-07-12 10:50:53 +03:00
7bed8dc93a Added Russian translation 2018-07-12 10:42:18 +03:00
687ceef17d Changed monitor settings from editable field to array 2018-07-12 10:25:54 +03:00
bc676caa5b Removed unused code 2018-07-12 10:25:19 +03:00
0d63615d0d Notification Channel support for Oreo (KEY2)
Added Icon builder foundation
2018-07-12 10:17:54 +03:00
bb4f5c0f51 bumped version 1.5 2018-07-09 11:42:26 +03:00
20a0c04914 First phase of icon builder implementation
Added square outline
2018-07-09 11:41:32 +03:00
6c6209f251 Fix for Priv fonts 2018-07-08 23:21:32 +03:00
e5651d4be1 Bumped version to 1.4 2018-07-07 22:14:05 +03:00
7ac2d66907 Fixed wrong cast 2018-07-07 21:57:16 +03:00
d43eeb8b63 Text view looks better when not editable 2018-07-07 21:49:47 +03:00
051cb5d174 Removed the ability to manually enter or change layouts 2018-07-07 21:46:43 +03:00
fcb7db7f3c Changed minSdkVersion for Priv compatibility 2018-07-07 21:33:37 +03:00
da2acfb09c Added different icon shapes 2018-07-06 21:25:16 +03:00
e35de238e5 bumped version to 1.3 2018-07-06 19:26:34 +03:00
60406caaf5 Updated featured graphic 2018-07-06 18:26:41 +03:00
b2987ebe65 Added menu 2018-07-06 15:56:23 +03:00
3117a0dff5 Added settings
Added "about" page
Now the Notification can be configured
Now the user would be notified if the service is disabled
2018-07-06 15:52:53 +03:00
7a7ccd76d6 moved license to the front 2018-07-06 13:25:36 +03:00
8265b81946 moved license to the front 2018-07-06 13:25:08 +03:00
6425bf3005 Added a button to remove layout 2018-07-06 13:17:41 +03:00
d6477ad826 bumped version to 1.2 2018-07-06 12:31:44 +03:00
38 changed files with 1711 additions and 143 deletions

9
.gitignore vendored Normal file
View File

@ -0,0 +1,9 @@
.gradle
.idea
build
LayTray.iml
local.properties
app/app.iml
app/release
app/build

12
README.md Normal file
View File

@ -0,0 +1,12 @@
# LayTray
## About
This app keeps a small text icon in the notification area to let you know what Layout you are using. Developed for Blackberry KeyOne and possibly other QWERTY phones. This is based on the Toast notification that keyboard produces upon switching layouts.
An icon can help users with short-term memory problems or vision problems interact with their device.
## Get it
[Play Store](https://play.google.com/store/apps/details?id=space.neothefox.laytray)
[F-Droid](https://f-droid.org/en/packages/space.neothefox.laytray/)

View File

@ -1,13 +1,13 @@
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
compileSdkVersion 27
defaultConfig {
applicationId "space.neothefox.laytray"
minSdkVersion 25
targetSdkVersion 26
versionCode 2
versionName "1.1"
minSdkVersion 23
targetSdkVersion 27
versionCode 11
versionName "1.10"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
@ -21,11 +21,10 @@ android {
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:support-v4:27.1.1'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:design:26.1.0'
implementation 'com.github.javadev:underscore:1.34'
implementation 'com.android.support:design:27.1.1'
}

View File

@ -1,21 +0,0 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@ -12,6 +12,7 @@
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
@ -20,15 +21,29 @@
android:name=".IconService"
android:enabled="true"
android:exported="true"
android:summary="A simple keyboard layout indicator for physical keyboards"
android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE">
android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE" >
<meta-data
android:name="android.accessibilityservice"
android:resource="@xml/accessibility_service_config" />
<intent-filter>
<action android:name="android.accessibilityservice.AccessibilityService"></action>
<action android:name="android.accessibilityservice.AccessibilityService" />
</intent-filter>
</service>
<activity
android:name=".SettingsActivity"
android:label="@string/title_activity_settings"
android:parentActivityName=".MainActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="space.neothefox.laytray.MainActivity" />
</activity>
<activity
android:name=".AboutActivity"
android:parentActivityName=".MainActivity">
</activity>
</application>
</manifest>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

@ -0,0 +1,15 @@
package space.neothefox.laytray;
import android.app.Activity;
import android.os.Bundle;
public class AboutActivity extends Activity
{
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_about);
}
}

View File

@ -0,0 +1,125 @@
package space.neothefox.laytray;
import android.content.res.Configuration;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatDelegate;
import android.support.v7.widget.Toolbar;
import android.view.MenuInflater;
import android.view.View;
import android.view.ViewGroup;
/**
* A {@link android.preference.PreferenceActivity} which implements and proxies the necessary calls
* to be used with AppCompat.
*/
public abstract class AppCompatPreferenceActivity extends PreferenceActivity
{
private AppCompatDelegate mDelegate;
@Override
protected void onCreate(Bundle savedInstanceState)
{
getDelegate().installViewFactory();
getDelegate().onCreate(savedInstanceState);
super.onCreate(savedInstanceState);
}
@Override
protected void onPostCreate(Bundle savedInstanceState)
{
super.onPostCreate(savedInstanceState);
getDelegate().onPostCreate(savedInstanceState);
}
public ActionBar getSupportActionBar() {
return getDelegate().getSupportActionBar();
}
public void setSupportActionBar(@Nullable Toolbar toolbar)
{
getDelegate().setSupportActionBar(toolbar);
}
@Override
public MenuInflater getMenuInflater()
{
return getDelegate().getMenuInflater();
}
@Override
public void setContentView(@LayoutRes int layoutResID)
{
getDelegate().setContentView(layoutResID);
}
@Override
public void setContentView(View view) {
getDelegate().setContentView(view);
}
@Override
public void setContentView(View view, ViewGroup.LayoutParams params)
{
getDelegate().setContentView(view, params);
}
@Override
public void addContentView(View view, ViewGroup.LayoutParams params)
{
getDelegate().addContentView(view, params);
}
@Override
protected void onPostResume()
{
super.onPostResume();
getDelegate().onPostResume();
}
@Override
protected void onTitleChanged(CharSequence title, int color)
{
super.onTitleChanged(title, color);
getDelegate().setTitle(title);
}
@Override
public void onConfigurationChanged(Configuration newConfig)
{
super.onConfigurationChanged(newConfig);
getDelegate().onConfigurationChanged(newConfig);
}
@Override
protected void onStop()
{
super.onStop();
getDelegate().onStop();
}
@Override
protected void onDestroy()
{
super.onDestroy();
getDelegate().onDestroy();
}
public void invalidateOptionsMenu()
{
getDelegate().invalidateOptionsMenu();
}
private AppCompatDelegate getDelegate()
{
if (mDelegate == null)
{
mDelegate = AppCompatDelegate.create(this, null);
}
return mDelegate;
}
}

View File

@ -0,0 +1,149 @@
package space.neothefox.laytray;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.RectF;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.View;
import android.widget.LinearLayout;
import static android.graphics.Paint.ANTI_ALIAS_FLAG;
public class IconBuilderPreview extends View
{
private int mode;
private int textSize;
private boolean fakeBold;
private int textColor;
public IconBuilderPreview(Context context)
{
super(context);
initValues();
}
public IconBuilderPreview(Context context, @Nullable AttributeSet attrs)
{
super(context, attrs);
initValues();
}
public IconBuilderPreview(Context context, @Nullable AttributeSet attrs, int defStyleAttr)
{
super(context, attrs, defStyleAttr);
initValues();
}
public IconBuilderPreview(Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes)
{
super(context, attrs, defStyleAttr, defStyleRes);
initValues();
}
private void initValues()
{
textSize = 48 * 10;
fakeBold = true;
}
@Override
protected void onDraw(Canvas canvas)
{
super.onDraw(canvas);
mode = 2;
fakeBold = true;
int width = 48 * 10;
int height = 48 * 10;
textColor = Color.WHITE;
String text = "EN";
this.setLayoutParams(new LinearLayout.LayoutParams(height, width));
Paint paint = new Paint(ANTI_ALIAS_FLAG);
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_OUT));
paint.setTextSize(textSize);
paint.setFakeBoldText(fakeBold);
paint.setColor(textColor);
switch (mode)
{
case 1: {
canvas.drawCircle(width / 2f, height / 2f, width / 2f, paint);
//paint.setAlpha(255);
paint.setColor(Color.BLACK);
paint.setTextSize(textSize);
paint.setTextAlign(Paint.Align.CENTER);
canvas.drawText(text, width / 2f, height / 2f + textSize / 2f, paint);
return;
}
case 2: {
canvas.drawRoundRect(new RectF(0, 0, height, width), 5, 5, paint);
//paint.setAlpha(255);
paint.setColor(Color.BLACK);
paint.setTextSize(textSize);
paint.setTextAlign(Paint.Align.CENTER);
canvas.drawText(text, width / 2f, height / 2f + textSize / 2f, paint);
return ;
}
case 0:
default:
paint.setTextAlign(Paint.Align.LEFT);
float baseline = -paint.ascent(); // ascent() is negative
width = (int) (paint.measureText(text) + 0.5f); // round
height = (int) (baseline + paint.descent() + 0.5f);
Bitmap image = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
canvas.drawText(text, 0, baseline, paint);
return;
}
}
public int getMode()
{
return mode;
}
public int getTextSize()
{
return textSize;
}
public boolean isFakeBold()
{
return fakeBold;
}
public int getTextColor()
{
return textColor;
}
public void setMode(int mode)
{
this.mode = mode;
}
public void setTextSize(int textSize)
{
this.textSize = textSize * 10;
}
public void setFakeBold(boolean fakeBold)
{
this.fakeBold = fakeBold;
}
public void setTextColor(int textColor)
{
this.textColor = textColor;
}
}

View File

@ -3,33 +3,47 @@ package space.neothefox.laytray;
import android.accessibilityservice.AccessibilityService;
import android.accessibilityservice.AccessibilityServiceInfo;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.content.Context;
import android.content.SharedPreferences;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.RectF;
import android.graphics.drawable.Icon;
import android.os.Build;
import android.preference.PreferenceManager;
import android.util.Log;
import android.view.accessibility.AccessibilityEvent;
import static android.graphics.Paint.ANTI_ALIAS_FLAG;
@SuppressWarnings("SuspiciousNameCombination")
public class IconService extends AccessibilityService
implements SharedPreferences.OnSharedPreferenceChangeListener{
implements SharedPreferences.OnSharedPreferenceChangeListener
{
public String TAG = "layicon";
public static final String TAG = "layicon";
public static final String channelId = "space.neothefox.laytray.IC";
private final AccessibilityServiceInfo serviceInfo = new AccessibilityServiceInfo();
//Map<CharSequence, String> layoutText = new HashMap<>();
SharedPreferences layouts;
private SharedPreferences layouts;
private SharedPreferences iconsPrefs;
private SharedPreferences options;
private String lastToast;
NotificationManager iconManager;
private NotificationManager iconManager;
private NotificationChannel iconChannel;
@Override
protected void onServiceConnected() {
protected void onServiceConnected()
{
super.onServiceConnected();
Log.d(TAG, "Icon service started");
serviceInfo.eventTypes = AccessibilityEvent.TYPE_NOTIFICATION_STATE_CHANGED;
@ -38,41 +52,142 @@ implements SharedPreferences.OnSharedPreferenceChangeListener{
serviceInfo.notificationTimeout = 100;
this.setServiceInfo(serviceInfo);
layouts = getSharedPreferences("layouts", 0);
iconsPrefs = getSharedPreferences("icons", 0);
options = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
lastToast = "EMPT";
options.registerOnSharedPreferenceChangeListener(this);
iconManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
//layoutText.put("Русский", "RU");
//layoutText.put("Буквы (АБВ)", "EN");
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
{
try
{
iconChannel = iconManager.getNotificationChannel(channelId);
}
catch (NullPointerException e)
{
Log.d(TAG, "No NotificationChannel found");
}
if(iconChannel == null) {
iconChannel = new NotificationChannel(
channelId,
getString(R.string.title_icon_channel),
NotificationManager.IMPORTANCE_LOW);
iconChannel.setShowBadge(false);
iconChannel.enableLights(false);
iconChannel.enableVibration(false);
iconChannel.setLockscreenVisibility(Notification.VISIBILITY_SECRET);
iconManager.createNotificationChannel(iconChannel);
}
}
}
protected void updateNotification(String toast)
private void updateNotification(String toast)
{
Notification indicator;
String textIcon = layouts.getString(toast,"EMPT");
if(textIcon == "EMPT")
if(textIcon.equals("EMPT"))
{
SharedPreferences.Editor layoutsEditor = layouts.edit();
layoutsEditor.putString(toast, "??");
layoutsEditor.commit();
layoutsEditor.apply();
textIcon = "??";
}
Icon smallIcon = Icon.createWithBitmap(textAsBitmap(textIcon, 48, Color.WHITE));
Icon smallIcon;
if (Integer.parseInt(options.getString("textMode", "0")) == 4) {
// Icon selected
smallIcon = Icon.createWithResource(this, iconsPrefs.getInt(toast, R.drawable.ic_language_default));
} else {
// Text variations
smallIcon = Icon.createWithBitmap(textAsBitmap(textIcon,
Integer.parseInt(options.getString("textSize", "48")),
options.getBoolean("textFakeBold", true),
Integer.parseInt(options.getString("textMode", "0")),
Color.WHITE));
}
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
{
indicator = new Notification.Builder(this, channelId)
.setSmallIcon(smallIcon)
.setContentTitle(toast)
.setOngoing(true)
.setVisibility(Notification.VISIBILITY_SECRET)
.build();
}
else
{
indicator = new Notification.Builder(this)
.setSmallIcon(smallIcon)
.setContentTitle(toast)
.setOngoing(true)
.setPriority(Integer.parseInt(options.getString("notificationImportance", "0")))
.setVisibility(Notification.VISIBILITY_SECRET)
.build();
}
iconManager.notify(0, indicator);
return;
}
//Borrowed from Ted Hopp from StackOverflow
public Bitmap textAsBitmap(String text, float textSize, int textColor) {
public static Bitmap textAsBitmap(String text, float textSize, boolean fakeBold, int mode, int textColor)
{
Paint paint = new Paint(ANTI_ALIAS_FLAG);
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_OUT));
paint.setTextSize(textSize);
paint.setFakeBoldText(true);
paint.setFakeBoldText(fakeBold);
paint.setColor(textColor);
switch (mode)
{
case 1: {
int width = 48;
int height = 48;
Bitmap image = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(image);
canvas.drawCircle(width / 2f, height / 2f, width / 2f, paint);
paint.setAlpha(255);
paint.setColor(Color.TRANSPARENT);
paint.setTextSize(textSize);
paint.setTextAlign(Paint.Align.CENTER);
canvas.drawText(text, width/2f, ((height/2f) - (paint.descent()+paint.ascent())/2f), paint);
return image;
}
case 2: {
int width = 48;
int height = 48;
Bitmap image = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(image);
canvas.drawRoundRect(new RectF(0, 0, height, width), 5, 5, paint);
paint.setAlpha(255);
paint.setColor(Color.TRANSPARENT);
paint.setTextSize(textSize);
paint.setTextAlign(Paint.Align.CENTER);
canvas.drawText(text, width / 2f, ((height/2f) - (paint.descent()+paint.ascent())/2f), paint);
return image;
}
case 3: {
int width = 48;
int height = 48;
Bitmap image = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(image);
canvas.drawRoundRect(new RectF(0, 0, height, width), 5, 5, paint);
paint.setAlpha(255);
paint.setColor(Color.TRANSPARENT);
canvas.drawRoundRect(new RectF(2,2,height-2,width-2), 5, 5, paint);
paint.setColor(textColor);
paint.setTextSize(textSize);
paint.setTextAlign(Paint.Align.CENTER);
canvas.drawText(text, width / 2f, ((height/2f) - (paint.descent()+paint.ascent())/2f), paint);
return image;
}
case 0:
default:
paint.setTextAlign(Paint.Align.LEFT);
float baseline = -paint.ascent(); // ascent() is negative
int width = (int) (paint.measureText(text) + 0.5f); // round
@ -82,34 +197,36 @@ implements SharedPreferences.OnSharedPreferenceChangeListener{
canvas.drawText(text, 0, baseline, paint);
return image;
}
}
@Override
public void onAccessibilityEvent(AccessibilityEvent event) {
public void onAccessibilityEvent(AccessibilityEvent event)
{
Log.d(TAG, event.toString());
if(event.getEventType() == AccessibilityEvent.TYPE_NOTIFICATION_STATE_CHANGED)
{
Log.d(TAG, "Caught a Toast: ");
Log.d(TAG, (String)event.getPackageName());
String toast = (String)event.getText().get(0);
Log.d(TAG, toast);
lastToast = (String)event.getText().get(0);
Log.d(TAG, lastToast);
updateNotification(toast);
updateNotification(lastToast);
}
else
{
Log.d(TAG, "Caution! This service had been tampered with!");
}
}
@Override
public void onInterrupt() {
public void onInterrupt()
{
}
@Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
layouts = getSharedPreferences("layouts", 0);
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key)
{
options = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
updateNotification(lastToast);
}
}

View File

@ -0,0 +1,56 @@
package space.neothefox.laytray;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.Spinner;
public class IconsAdapter extends BaseAdapter {
private Context context;
private int flags[];
private LayoutInflater inflter;
public IconsAdapter(Context applicationContext, int[] flags) {
this.context = applicationContext;
this.flags = flags;
inflter = (LayoutInflater.from(applicationContext));
}
@Override
public int getCount() {
return flags.length;
}
@Override
public Object getItem(int i) {
return flags[i];
}
@Override
public long getItemId(int i) {
return 0;
}
public int getPosition(int value) {
int position = -1;
for (int i = 0; i < flags.length; i++) {
if (value == flags[i]) {
position = i;
break;
}
}
return position;
}
@Override
public View getView(int i, View convertView, ViewGroup parent) {
convertView = inflter.inflate(R.layout.spinner_item, null);
ImageView icon = (ImageView) convertView.findViewById(R.id.imageView);
icon.setImageResource(flags[i]);
return convertView;
}
}

View File

@ -1,149 +1,338 @@
package space.neothefox.laytray;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
import android.support.design.widget.FloatingActionButton;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.util.Log;
import java.util.List;
import android.widget.Space;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
import java.util.Map;
public class MainActivity extends AppCompatActivity
implements View.OnClickListener, SharedPreferences.OnSharedPreferenceChangeListener {
implements View.OnClickListener, DialogInterface.OnClickListener, SharedPreferences.OnSharedPreferenceChangeListener {
LinearLayout layoutLister;
SharedPreferences layouts;
public String TAG = "layiconActivity";
public final String TAG = "layiconActivity";
private LinearLayout layoutLister;
private SharedPreferences layouts;
private SharedPreferences iconsPrefs;
private boolean shouldRefresh = true;
@Override
protected void onCreate(Bundle savedInstanceState) {
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
layoutLister = findViewById(R.id.scrollLinearLayout);
layouts = getSharedPreferences("layouts", 0);
iconsPrefs = getSharedPreferences("icons", 0);
updateLayouts();
FloatingActionButton addButton = findViewById(R.id.floatingActionButton);
Button saveButton = findViewById(R.id.saveButton);
addButton.setOnClickListener(this);
saveButton.setOnClickListener(this);
layouts.registerOnSharedPreferenceChangeListener(this);
if (!isAccessibilitySettingsOn(getApplicationContext()))
{
Toast.makeText(this, R.string.toast_enableme,
Toast.LENGTH_LONG).show();
startActivity(new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS));
}
protected void updateLayouts()
if(!isPackageInstalled("com.blackberry.keyboard", getApplicationContext().getPackageManager()) && !BuildConfig.DEBUG)
{
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(R.string.unsupported_device)
.setMessage(R.string.unsupported_device_description)
.setNeutralButton(R.string.close, this)
.show();
}
}
private void updateLayouts()
{
layoutLister.removeAllViewsInLayout();
Log.d(TAG, "Updateing Layouts:");
Log.d(TAG, "Updating Layouts:");
Map<String,?> keys = layouts.getAll();
if(keys != null)
{
Log.d(TAG, "listing map:");
int i = 0;
for(Map.Entry<String,?> entry : keys.entrySet()){
for(Map.Entry<String,?> entry : keys.entrySet())
{
Log.d("map values",entry.getKey() + ": " +
entry.getValue().toString());
i++;
addLine(layoutLister, entry.getKey(), entry.getValue().toString());
if(!entry.getKey().equals("EMPT")) {
addLine(
layoutLister, entry.getKey(),
entry.getValue().toString(),
iconsPrefs.getInt(entry.getKey(), R.drawable.ic_language_default)
);
}
}
if(i == 0)
{
populateLayouts();
}
}
else
{
populateLayouts();
}
}
protected void populateLayouts()
private void populateLayouts()
{
Log.d("map values", "Shared Prefs are empty");
SharedPreferences.Editor layoutsEditor = layouts.edit();
SharedPreferences.Editor iconsEditor = iconsPrefs.edit();
iconsEditor.clear();
layoutsEditor.clear();
layoutsEditor.putString("Русский", "RU");
layoutsEditor.putString("Буквы (АБВ)", "EN");
layoutsEditor.commit();
layoutsEditor.putString("EMPT", "??");
shouldRefresh = false;
iconsEditor.apply();
shouldRefresh = true;
layoutsEditor.apply();
}
protected void addLine(LinearLayout parent)
private void addLine(LinearLayout parent, String name, String icon, int iconDrawableId)
{
addLine(parent, "Name", "ICO");
}
protected void addLine(LinearLayout parent, String name, String icon)
{
LinearLayout layoutLine = new LinearLayout(getApplicationContext());
final LinearLayout layoutLine = new LinearLayout(getApplicationContext());
layoutLine.setOrientation(LinearLayout.HORIZONTAL);
layoutLine.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT));
EditText layoutName = new EditText(getApplicationContext());
TextView layoutName = new TextView(getApplicationContext());
layoutName.setText(name);
//workaround for Priv
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.M) layoutName.setTextColor(Color.BLACK);
layoutLine.addView(layoutName);
EditText layoutIcon = new EditText(getApplicationContext());
//workaround for Priv
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.M) layoutIcon.setTextColor(Color.BLACK);
layoutIcon.setText(icon);
layoutLine.addView(layoutIcon);
// Icons Dropdown
final int[] iconFlags = {
R.drawable.ic_language_default,
R.drawable.ic_flag_russia,
R.drawable.ic_flag_gb,
R.drawable.ic_flag_belarus,
R.drawable.ic_flag_ukr
};
IconsAdapter arrayAdapter = new IconsAdapter(this, iconFlags);
final Spinner iconSpinner = new Spinner(this);
iconSpinner.setAdapter(arrayAdapter);
iconSpinner.setSelection(arrayAdapter.getPosition(iconDrawableId));
layoutLine.addView(iconSpinner);
iconSpinner.setSelection(arrayAdapter.getPosition(iconDrawableId));
Space space = new Space(getApplicationContext());
space.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT, 2));
layoutLine.addView(space);
final Button removeButton = new Button(getApplicationContext());
removeButton.setText("");
removeButton.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
ViewGroup.LayoutParams.WRAP_CONTENT));
removeButton.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v)
{
LinearLayout daddy = (LinearLayout)removeButton.getParent();
LinearLayout grandpa = (LinearLayout)daddy.getParent();
daddy.removeAllViewsInLayout();
grandpa.removeView(daddy);
}
});
layoutLine.addView(removeButton);
parent.addView(layoutLine);
}
protected void saveLayouts(LinearLayout parent)
private void saveLayouts(LinearLayout parent)
{
int count = parent.getChildCount();
Log.d(TAG, String.format("%d layouts to save", count));
if (count != 0)
{
SharedPreferences.Editor layoutsEditor = layouts.edit();
SharedPreferences.Editor iconsEditor = iconsPrefs.edit();
layoutsEditor.clear();
iconsEditor.clear();
for (int i=0; i < count; i++)
{
LinearLayout layoutLine = (LinearLayout)parent.getChildAt(i);
EditText layoutName = (EditText)layoutLine.getChildAt(0);
TextView layoutName = (TextView)layoutLine.getChildAt(0);
EditText layoutIcon = (EditText)layoutLine.getChildAt(1);
Spinner layoutDropdown = (Spinner)layoutLine.getChildAt(2);
String layoutNameValue = layoutName.getText().toString();
String layoutIconValue = layoutIcon.getText().toString();
if(layoutNameValue != "")
{
if(layoutIconValue != "")
int layoutDropdownValue = (int)layoutDropdown.getSelectedItem();
if(!layoutNameValue.equals(""))
{
if(!layoutIconValue.equals("")) {
layoutsEditor.putString(layoutNameValue, layoutIconValue);
}
else
{
iconsEditor.putInt(layoutNameValue, layoutDropdownValue);
} else {
layoutsEditor.putString(layoutNameValue, "??");
iconsEditor.putInt(layoutNameValue, layoutDropdownValue);
}
}
}
layoutsEditor.commit();
shouldRefresh = false;
iconsEditor.apply();
shouldRefresh = true;
layoutsEditor.apply();
} else {
populateLayouts();
}
}
//Accessibility check by Antoine Bolvy
private boolean isAccessibilitySettingsOn(Context mContext)
{
int accessibilityEnabled = 0;
final String service = getPackageName() + "/" + IconService.class.getCanonicalName();
try
{
accessibilityEnabled = Settings.Secure.getInt(
mContext.getApplicationContext().getContentResolver(),
android.provider.Settings.Secure.ACCESSIBILITY_ENABLED);
Log.v(TAG, "accessibilityEnabled = " + accessibilityEnabled);
}
catch (Settings.SettingNotFoundException e)
{
Log.e(TAG, "Error finding setting, default accessibility to not found: "
+ e.getMessage());
}
TextUtils.SimpleStringSplitter mStringColonSplitter = new TextUtils.SimpleStringSplitter(':');
if (accessibilityEnabled == 1)
{
Log.v(TAG, "Accessibility service enabled");
String settingValue = Settings.Secure.getString(
mContext.getApplicationContext().getContentResolver(),
Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES);
if (settingValue != null)
{
mStringColonSplitter.setString(settingValue);
while (mStringColonSplitter.hasNext())
{
String accessibilityService = mStringColonSplitter.next();
Log.v(TAG, "-------------- > accessibilityService :: " + accessibilityService + " " + service);
if (accessibilityService.equalsIgnoreCase(service))
{
Log.v(TAG, "We've found the correct setting - accessibility is switched on!");
return true;
}
}
}
}
else
Log.v(TAG, "Accessibility is disabled");
return false;
}
@Override
public void onClick(View v) {
public void onClick(View v)
{
switch(v.getId())
{
case R.id.floatingActionButton:
addLine(layoutLister);
break;
case R.id.saveButton:
saveLayouts(layoutLister);
Toast.makeText(this, R.string.toast_saved,
Toast.LENGTH_SHORT).show();
break;
}
}
@Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
layouts = getSharedPreferences("layouts", 0);
updateLayouts();
public boolean onCreateOptionsMenu(Menu menu)
{
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.menu, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item)
{
switch(item.getItemId())
{
case R.id.settings:
startActivity(new Intent(this, SettingsActivity.class));
return true;
case R.id.about:
startActivity(new Intent(this, AboutActivity.class));
return true;
default:
return super.onOptionsItemSelected(item);
}
}
@Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key)
{
if (shouldRefresh) {
layouts = getSharedPreferences("layouts", 0);
iconsPrefs = getSharedPreferences("icons", 0);
updateLayouts();
}
}
private boolean isPackageInstalled(String packageName, PackageManager packageManager)
{
try
{
packageManager.getPackageInfo(packageName, 0);
return true;
}
catch (PackageManager.NameNotFoundException e)
{
return false;
}
}
@Override
public void onClick(DialogInterface dialogInterface, int i)
{
//There is only one potential dialog
this.finish();
}
}

View File

@ -0,0 +1,337 @@
package space.neothefox.laytray;
import android.annotation.TargetApi;
import android.app.DialogFragment;
import android.app.FragmentManager;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Build;
import android.os.Bundle;
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceFragment;
import android.preference.PreferenceGroup;
import android.preference.PreferenceManager;
import android.provider.Settings;
import android.support.annotation.Nullable;
import android.support.v4.app.NavUtils;
import android.support.v7.app.ActionBar;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.SeekBar;
import java.util.List;
/**
* A {@link PreferenceActivity} that presents a set of application settings. On
* handset devices, settings are presented as a single list. On tablets,
* settings are split by category, with category headers shown to the left of
* the list of settings.
* <p>
* See <a href="http://developer.android.com/design/patterns/settings.html">
* Android Design: Settings</a> for design guidelines and the <a
* href="http://developer.android.com/guide/topics/ui/settings.html">Settings
* API Guide</a> for more information on developing a Settings UI.
*/
public class SettingsActivity extends AppCompatPreferenceActivity
{
/**
* A preference value change listener that updates the preference's summary
* to reflect its new value.
*/
private static Preference.OnPreferenceChangeListener sBindPreferenceSummaryToValueListener = new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object value)
{
String stringValue = value.toString();
if (preference instanceof ListPreference)
{
// For list preferences, look up the correct display value in
// the preference's 'entries' list.
ListPreference listPreference = (ListPreference) preference;
int index = listPreference.findIndexOfValue(stringValue);
// Set the summary to reflect the new value.
preference.setSummary(
index >= 0
? listPreference.getEntries()[index]
: null);
}
else
{
// For all other preferences, set the summary to the value's
// simple string representation.
preference.setSummary(stringValue);
}
return true;
}
};
/**
* Helper method to determine if the device has an extra-large screen. For
* example, 10" tablets are extra-large.
*/
private static boolean isXLargeTablet(Context context)
{
return (context.getResources().getConfiguration().screenLayout
& Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;
}
/**
* Binds a preference's summary to its value. More specifically, when the
* preference's value is changed, its summary (line of text below the
* preference title) is updated to reflect the value. The summary is also
* immediately updated upon calling this method. The exact display format is
* dependent on the type of preference.
*
* @see #sBindPreferenceSummaryToValueListener
*/
private static void bindPreferenceSummaryToValue(Preference preference)
{
// Set the listener to watch for value changes.
preference.setOnPreferenceChangeListener(sBindPreferenceSummaryToValueListener);
// Trigger the listener immediately with the preference's
// current value.
sBindPreferenceSummaryToValueListener.onPreferenceChange(preference,
PreferenceManager
.getDefaultSharedPreferences(preference.getContext())
.getString(preference.getKey(), ""));
}
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setupActionBar();
}
/**
* Set up the {@link android.app.ActionBar}, if the API is available.
*/
private void setupActionBar()
{
ActionBar actionBar = getSupportActionBar();
if (actionBar != null)
{
// Show the Up button in the action bar.
actionBar.setDisplayHomeAsUpEnabled(true);
}
}
@Override
public boolean onMenuItemSelected(int featureId, MenuItem item)
{
int id = item.getItemId();
if (id == android.R.id.home)
{
if (!super.onMenuItemSelected(featureId, item))
{
NavUtils.navigateUpFromSameTask(this);
}
return true;
}
return super.onMenuItemSelected(featureId, item);
}
/**
* {@inheritDoc}
*/
@Override
public boolean onIsMultiPane()
{
return isXLargeTablet(this);
}
/**
* {@inheritDoc}
*/
@Override
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public void onBuildHeaders(List<Header> target)
{
loadHeadersFromResource(R.xml.pref_headers, target);
}
/**
* This method stops fragment injection in malicious applications.
* Make sure to deny any unknown fragments here.
*/
protected boolean isValidFragment(String fragmentName)
{
return PreferenceFragment.class.getName().equals(fragmentName)
|| GeneralPreferenceFragment.class.getName().equals(fragmentName)
|| NotificationPreferenceFragment.class.getName().equals(fragmentName);
}
/**
* This fragment shows general preferences only. It is used when the
* activity is showing a two-pane settings UI.
*/
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public static class GeneralPreferenceFragment extends PreferenceFragment
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.pref_general);
setHasOptionsMenu(true);
// Bind the summaries of EditText/List/Dialog/Ringtone preferences
// to their values. When their values change, their summaries are
// updated to reflect the new value, per the Android Design
// guidelines.
bindPreferenceSummaryToValue(findPreference("default_app_name"));
}
@Override
public boolean onOptionsItemSelected(MenuItem item)
{
int id = item.getItemId();
if (id == android.R.id.home)
{
startActivity(new Intent(getActivity(), SettingsActivity.class));
return true;
}
return super.onOptionsItemSelected(item);
}
}
/**
* This fragment shows notification preferences only. It is used when the
* activity is showing a two-pane settings UI.
*/
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public static class NotificationPreferenceFragment extends PreferenceFragment
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.pref_notification);
setHasOptionsMenu(true);
// Bind the summaries of EditText/List/Dialog/Ringtone preferences
// to their values. When their values change, their summaries are
// updated to reflect the new value, per the Android Design
// guidelines.
//With Oreo this setting should be set by the system dialog
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
{
Preference notificationImportance = getPreferenceScreen().findPreference("notificationImportance");
PreferenceGroup parent = notificationImportance.getParent();
parent.removePreference(notificationImportance);
Preference notificationImportanceOreo = new Preference(parent.getContext());
notificationImportanceOreo.setTitle(R.string.pref_title_notification_importance);
notificationImportanceOreo.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener()
{
@Override
public boolean onPreferenceClick(Preference preference)
{
Intent intent = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS);
intent.putExtra(Settings.EXTRA_APP_PACKAGE, "space.neothefox.laytray");
intent.putExtra(Settings.EXTRA_CHANNEL_ID, IconService.channelId);
startActivity(intent);
return true;
}
});
parent.addPreference(notificationImportanceOreo);
}
else
bindPreferenceSummaryToValue(findPreference("notificationImportance"));
bindPreferenceSummaryToValue(findPreference("textMode"));
bindPreferenceSummaryToValue(findPreference("textSize"));
Preference iconBuilderPreference = getPreferenceScreen().findPreference("iconBuilderPreference");
iconBuilderPreference.setEnabled(false);
iconBuilderPreference.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
FragmentManager fragmentManager = getFragmentManager();
IconBuilderPreferenceFragment iconBuilderPreferenceFragment = new IconBuilderPreferenceFragment();
iconBuilderPreferenceFragment.show(fragmentManager, "Icon Builder");
return true;
}
});
}
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public static class IconBuilderPreferenceFragment extends DialogFragment implements View.OnClickListener
{
SeekBar xBar;
VerticalSeekBar yBar;
Button saveButton;
Button cancelButton;
IconBuilderPreview iconBuilderPreview;
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState)
{
return inflater.inflate(R.layout.fragment_icon_builder, container);
}
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState)
{
super.onViewCreated(view, savedInstanceState);
xBar = getView().findViewById(R.id.horSeekBar);
xBar.setMinimumHeight(10);
xBar.setMinimumWidth(100);
yBar = getView().findViewById(R.id.verSeekBar);
yBar.setMinimumHeight(100);
yBar.setMinimumWidth(10);
saveButton = getView().findViewById(R.id.saveButton);
saveButton.setOnClickListener(this);
cancelButton = getView().findViewById(R.id.closeButton);
cancelButton.setOnClickListener(this);
iconBuilderPreview = getView().findViewById(R.id.textureView);
}
@Override
public void onClick(View v)
{
switch (v.getId())
{
case R.id.saveButton:
return;
case R.id.closeButton:
this.dismiss();
return;
}
}
}
@Override
public boolean onOptionsItemSelected(MenuItem item)
{
int id = item.getItemId();
if (id == android.R.id.home)
{
startActivity(new Intent(getActivity(), SettingsActivity.class));
return true;
}
return super.onOptionsItemSelected(item);
}
}
}

View File

@ -0,0 +1,69 @@
package space.neothefox.laytray;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Canvas;
import android.support.v7.widget.AppCompatSeekBar;
import android.util.AttributeSet;
import android.view.MotionEvent;
public class VerticalSeekBar extends AppCompatSeekBar
{
public VerticalSeekBar(Context context)
{
super(context);
}
public VerticalSeekBar(Context context, AttributeSet attrs, int defStyle)
{
super(context, attrs, defStyle);
}
public VerticalSeekBar(Context context, AttributeSet attrs)
{
super(context, attrs);
}
protected void onSizeChanged(int w, int h, int oldw, int oldh)
{
super.onSizeChanged(h, w, oldh, oldw);
}
@Override
protected synchronized void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
{
super.onMeasure(heightMeasureSpec, widthMeasureSpec);
setMeasuredDimension(getMeasuredHeight(), getMeasuredWidth());
}
protected void onDraw(Canvas c)
{
c.rotate(-90);
c.translate(-getHeight(), 0);
super.onDraw(c);
}
@SuppressLint("ClickableViewAccessibility")
@Override
public boolean onTouchEvent(MotionEvent event)
{
if (!isEnabled())
return false;
switch (event.getAction())
{
case MotionEvent.ACTION_DOWN:
case MotionEvent.ACTION_MOVE:
case MotionEvent.ACTION_UP:
setProgress(getMax() - (int) (getMax() * event.getY() / getHeight()));
onSizeChanged(getWidth(), getHeight(), 0, 0);
break;
case MotionEvent.ACTION_CANCEL:
break;
}
return true;
}
}

View File

@ -0,0 +1,6 @@
<vector android:height="24dp" android:viewportHeight="2"
android:viewportWidth="3" android:width="32dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#66000000" android:pathData="M0,1h3v0.75h-3z"/>
<path android:fillColor="#99000000" android:pathData="M0,0h3v1h-3z"/>
<path android:fillColor="#FF000000" android:pathData="M0,0h0.5v1.75h-3z"/>
</vector>

View File

@ -0,0 +1,5 @@
<vector android:height="32dp" android:viewportHeight="25.1"
android:viewportWidth="40.9" android:width="48dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M18,0h5v10h18v5H23.1a3,3 0,0 0,-0.3 0,0.6 0.6,0 0,0 0,0.2v9.9H18V15H0v-5h18a1,1 0,0 0,0 -0.1z"/>
<path android:fillColor="#99000000" android:pathData="M15.6,0v7a1.4,1.4 0,0 1,-0.3 -0.1L4.3,0.2 4.2,0zM36.7,0a2.8,2.8 0,0 1,-0.3 0.2L25.7,6.8l-0.4,0.3L25.3,0zM4.2,25a2,2 0,0 1,0.3 -0.1l10.8,-6.7 0.3,-0.2v7zM25.3,25v-6.9l0.3,0.1 10.9,6.7a1.6,1.6 0,0 1,0.2 0.2zM0,2.2l0.3,0.1 8.3,5.1v0.2L0,7.6zM41,7.6h-8.8l0.3,-0.2 8,-5a4,4 0,0 1,0.4 -0.2zM0,17.5h8.7a2.6,2.6 0,0 1,-0.2 0.2l-8.1,5a2.3,2.3 0,0 1,-0.4 0.2zM41,22.9a1.4,1.4 0,0 1,-0.3 -0.1l-8.3,-5.1 -0.1,-0.2h8.6z"/>
</vector>

View File

@ -0,0 +1,6 @@
<vector android:height="24dp" android:viewportHeight="512.001"
android:viewportWidth="512.001" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M512,200.093H0V97.104c0,-4.875 3.953,-8.828 8.828,-8.828h494.345c4.875,0 8.828,3.953 8.828,8.828L512,200.093L512,200.093z"/>
<path android:fillColor="#88000000" android:pathData="M503.172,423.725H8.828c-4.875,0 -8.828,-3.953 -8.828,-8.828V311.909h512v102.988C512,419.773 508.047,423.725 503.172,423.725z"/>
<path android:fillColor="#22000000" android:pathData="M0,200.091h512v111.81h-512z"/>
</vector>

View File

@ -0,0 +1,5 @@
<vector android:height="24dp" android:viewportHeight="2"
android:viewportWidth="3" android:width="32dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#88000000" android:pathData="M0,1h3v1h-3z"/>
<path android:fillColor="#FF000000" android:pathData="M0,0h3v1h-3z"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zm1,15h-2v-6h2v6zm0,-8h-2V7h2v2z" />
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM18.92,8h-2.95c-0.32,-1.25 -0.78,-2.45 -1.38,-3.56 1.84,0.63 3.37,1.91 4.33,3.56zM12,4.04c0.83,1.2 1.48,2.53 1.91,3.96h-3.82c0.43,-1.43 1.08,-2.76 1.91,-3.96zM4.26,14C4.1,13.36 4,12.69 4,12s0.1,-1.36 0.26,-2h3.38c-0.08,0.66 -0.14,1.32 -0.14,2 0,0.68 0.06,1.34 0.14,2L4.26,14zM5.08,16h2.95c0.32,1.25 0.78,2.45 1.38,3.56 -1.84,-0.63 -3.37,-1.9 -4.33,-3.56zM8.03,8L5.08,8c0.96,-1.66 2.49,-2.93 4.33,-3.56C8.81,5.55 8.35,6.75 8.03,8zM12,19.96c-0.83,-1.2 -1.48,-2.53 -1.91,-3.96h3.82c-0.43,1.43 -1.08,2.76 -1.91,3.96zM14.34,14L9.66,14c-0.09,-0.66 -0.16,-1.32 -0.16,-2 0,-0.68 0.07,-1.35 0.16,-2h4.68c0.09,0.65 0.16,1.32 0.16,2 0,0.68 -0.07,1.34 -0.16,2zM14.59,19.56c0.6,-1.11 1.06,-2.31 1.38,-3.56h2.95c-0.96,1.65 -2.49,2.93 -4.33,3.56zM16.36,14c0.08,-0.66 0.14,-1.32 0.14,-2 0,-0.68 -0.06,-1.34 -0.14,-2h3.38c0.16,0.64 0.26,1.31 0.26,2s-0.1,1.36 -0.26,2h-3.38z"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M11.5,22c1.1,0 2,-0.9 2,-2h-4c0,1.1 0.9,2 2,2zm6.5,-6v-5.5c0,-3.07 -2.13,-5.64 -5,-6.32V3.5c0,-0.83 -0.67,-1.5 -1.5,-1.5S10,2.67 10,3.5v0.68c-2.87,0.68 -5,3.25 -5,6.32V16l-2,2v1h17v-1l-2,-2z" />
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01,-.25 1.97,-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0,-4.42,-3.58,-8,-8,-8zm0 14c-3.31 0,-6,-2.69,-6,-6 0,-1.01.25,-1.97.7,-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4,-4,-4,-4v3z" />
</vector>

View File

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".AboutActivity">
<ImageView
android:id="@+id/imageView"
android:contentDescription="@string/title_icon_channel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="138dp"
android:layout_marginStart="138dp"
android:layout_marginTop="16dp"
android:src="@mipmap/ic_launcher_foreground"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="163dp"
android:layout_marginStart="163dp"
android:layout_marginTop="68dp"
android:text="@string/about_text"
android:textAlignment="center"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="168dp"
android:layout_marginStart="168dp"
android:layout_marginTop="8dp"
android:text="@string/app_name"
android:textAppearance="@android:style/TextAppearance.Holo.Large"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView" />
</android.support.constraint.ConstraintLayout>

View File

@ -43,27 +43,10 @@
android:layout_marginBottom="24dp"
android:layout_marginEnd="24dp"
android:clickable="true"
android:focusable="true"
app:backgroundTint="?attr/colorPrimary"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:srcCompat="@android:drawable/ic_input_add" />
app:srcCompat="@android:drawable/ic_menu_save" />
<Button
android:id="@+id/saveButton"
android:layout_width="81dp"
android:layout_height="41dp"
android:layout_marginEnd="8dp"
android:text="Save"
app:layout_constraintEnd_toEndOf="parent"
tools:layout_editor_absoluteY="16dp" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginStart="8dp"
android:text="by NeoTheFox"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</android.support.constraint.ConstraintLayout>

View File

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="2"
android:gravity="center"
android:orientation="horizontal">
<space.neothefox.laytray.IconBuilderPreview
android:id="@+id/textureView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
<space.neothefox.laytray.VerticalSeekBar
android:id="@+id/verSeekBar"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1" />
</LinearLayout>
<SeekBar
android:id="@+id/horSeekBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="2" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="fill_horizontal"
android:orientation="horizontal">
<Button
android:id="@+id/saveButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Save" />
<Button
android:id="@+id/closeButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Close" />
</LinearLayout>
</LinearLayout>

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="@+id/imageView"
android:layout_width="40dp"
android:layout_height="40dp"
android:padding="5dp"
android:src="@drawable/ic_info_black_24dp" />
<!--
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="0dp"
android:text="Icon"
android:textColor="#000" />
-->
</LinearLayout>

View File

@ -0,0 +1,6 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/settings"
android:title="@string/title_activity_settings" />
<item android:id="@+id/about"
android:title="@string/title_about" />
</menu>

View File

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="service_description">Простая іконка раскладкі</string>
<string name="accessibility_summary">LayTray патрабуе доступ да спецыяльных магчымасцяў каб праглядаць паведамленні ад клавіятуры. LayTray не адсочвае набіранне тэкста і не адпраўляе аніякай інфармацыі аб Вашай дзейнасці ў Інтэрнэт.</string>
<string name="activity_info">Дадайце скарочаныя назвы для раскладак</string>
<string name="title_activity_settings">Налады</string>
<string name="toast_enableme">Вы мусіце ўключыць сэрвіс!</string>
<string name="toast_saved">Захаваны</string>
<string name="pref_header_general">Агульныя</string>
<string name="pref_title_default_app_name">Прыкладанне для назірання</string>
<string-array name="pref_default_app_name_list_titles">
<item>Blackberry Keyboard</item>
</string-array>
<string-array name="pref_default_app_name_list_values">
<item>com.blackberry.keyboard</item>
</string-array>
<string name="pref_title_notification_importance">Важнасць паведамлення</string>
<string-array name="pref_notification_importance_list_titles">
<item>Default</item>
<item>High</item>
<item>Low</item>
<item>Min</item>
</string-array>
<string-array name="pref_notification_importance_list_values">
<item>0</item>
<item>1</item>
<item>-1</item>
<item>-2</item>
</string-array>
<string name="pref_title_notification_mode">Форма іконкі</string>
<string-array name="pref_notification_mode_list_titles">
<item>Звычайны тэкст</item>
<item>Тэкст у крузе</item>
<item>Тэкст у квадраце</item>
<item>Тэкст у квадраце з абрысам</item>
<item>Іконка</item>
</string-array>
<string-array name="pref_notification_mode_list_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
</string-array>
<string name="pref_title_icon_builder">Рэдактар іконак</string>
<!-- Example settings for Notifications -->
<string name="pref_header_notifications">Іконка</string>
<string name="pref_title_text_fake_bold">Тоўсты шрыфт</string>
<string name="pref_title_text_size">Памер тэксту</string>
<string name="title_about">Аб праграме</string>
<string name="close">Зачыніць</string>
<string name="unsupported_device">Тэлефон не падтрымліваецца</string>
<string name="title_icon_channel">онкa раскладкі</string>
<string name="unsupported_device_description">Гэты тэлефон не хапае клавіятуры BlackBerry. LayTray не будзе працаваць без яго.</string>
</resources>

View File

@ -0,0 +1,64 @@
<resources>
<string name="service_description">Jednoduchá ikona rozvržení klávesnice</string>
<string name="accessibility_summary">LayTray je třeba zapnout v aplikaci zpřístupnění, protože jediný způsob, jak na Android zjistit rozvržení, je sledovat oznámení Toast. LayTray nemůže vidět co píšete a neodesílá žádná data o vaší aktivitě třetím stranám</string>
<string name="activity_info">Přiřadit název k ikoně rozvržení</string>
<string name="title_activity_settings">Nastavení</string>
<string name="toast_enableme">Je třeba službu zapnout!</string>
<string name="unsupported_device">Nepodporovaný telefon</string>
<string name="unsupported_device_description">Tento telefon postrádá BlackBerry klávesnici. LayTray bez ní nefunguje.</string>
<string name="close">Zavřít</string>
<string name="toast_saved">Uloženo</string>
<string name="title_icon_channel">Ikona rozvržení klávesnice</string>
<!-- Strings related to Settings -->
<!-- Example General settings -->
<string name="pref_header_general">Obecné</string>
<string name="pref_title_default_app_name">Aplikace pro dohlížení</string>
<string-array name="pref_default_app_name_list_titles">
<item>klávesnice Blackberry</item>
</string-array>
<string-array name="pref_default_app_name_list_values">
<item>com.blackberry.keyboard</item>
</string-array>
<string name="pref_title_notification_importance">Důležitost oznámení</string>
<string-array name="pref_notification_importance_list_titles">
<item>Výchozí</item>
<item>Vysoká</item>
<item>Nízká</item>
<item>Min</item>
</string-array>
<string-array name="pref_notification_importance_list_values">
<item>0</item>
<item>1</item>
<item>-1</item>
<item>-2</item>
</string-array>
<string name="pref_title_notification_mode">Notification shape</string>
<string-array name="pref_notification_mode_list_titles">
<item>Samotný text</item>
<item>Text v kruhu</item>
<item>Text ve čtverci</item>
<item>Text v obrysu čtverce</item>
<item>Ikona</item>
</string-array>
<string-array name="pref_notification_mode_list_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
</string-array>
<string name="pref_title_icon_builder">Vytváření ikony</string>
<!-- Example settings for Notifications -->
<string name="pref_header_notifications">Oznamování</string>
<string name="pref_title_text_fake_bold">Tučně</string>
<string name="pref_title_text_size">Velikost textu</string>
<string name="title_about">O aplikaci</string>
</resources>

View File

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="service_description">Простая иконка раскладки</string>
<string name="accessibility_summary">LayTray требуется доступ к специальным возможностям для того чтобы прослушивать уведомления от клавиатуры. LayTray не видит что вы печатаете и не отправляет никаких данных о вашей активности в интернет.</string>
<string name="activity_info">Введите краткие названия для раскладок</string>
<string name="title_activity_settings">Настройки</string>
<string name="toast_enableme">Необходимо включить сервис!</string>
<string name="toast_saved">Сохранено</string>
<string name="pref_header_general">Общие</string>
<string name="pref_title_default_app_name">Приложения для наблюдения</string>
<string-array name="pref_default_app_name_list_titles">
<item>Blackberry Keyboard</item>
</string-array>
<string-array name="pref_default_app_name_list_values">
<item>com.blackberry.keyboard</item>
</string-array>
<string name="pref_title_notification_importance">Важность уведомления</string>
<string-array name="pref_notification_importance_list_titles">
<item>Default</item>
<item>High</item>
<item>Low</item>
<item>Min</item>
</string-array>
<string-array name="pref_notification_importance_list_values">
<item>0</item>
<item>1</item>
<item>-1</item>
<item>-2</item>
</string-array>
<string name="pref_title_notification_mode">Форма иконки</string>
<string-array name="pref_notification_mode_list_titles">
<item>Текст</item>
<item>Текст в круге</item>
<item>Текст в квадрате</item>
<item>Текст в квадрате с обводкой</item>
<item>Иконка</item>
</string-array>
<string-array name="pref_notification_mode_list_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
</string-array>
<string name="pref_title_icon_builder">Редактор иконок</string>
<!-- Example settings for Notifications -->
<string name="pref_header_notifications">Иконка</string>
<string name="pref_title_text_fake_bold">Жирность</string>
<string name="pref_title_text_size">Размер текста</string>
<string name="title_about">О программе</string>
<string name="close">Закрыть</string>
<string name="unsupported_device">Телефон не поддерживается</string>
<string name="title_icon_channel">Иконка раскладки</string>
<string name="unsupported_device_description">На этом телефоне отсутствует клавиатура BlackBerry. LayTray не будет работать без него.</string>
</resources>

View File

@ -1,6 +1,71 @@
<resources>
<string name="app_name">LayTray</string>
<string name="app_name" translatable="false">LayTray</string>
<string name="service_description">A simple layout icon</string>
<string name="accessibility_summary">LayTray needs to be enabled as an accessibility app, because the only way to get layout info on Android is by monitoring the Toast notification. Right now it monitors Blackberry Keyboard exclusively.</string>
<string name="accessibility_summary">LayTray needs to be enabled as an accessibility app, because the only way to get layout info on Android is by monitoring the Toast notification. LayTray can not see what you are typing and doesn\'t send any data about you or your activity to the third parties</string>
<string name="activity_info">Associate layout name with layout icon</string>
<string name="title_activity_settings">Settings</string>
<string name="toast_enableme">You have to enable the service!</string>
<string name="unsupported_device">Unsupported phone</string>
<string name="unsupported_device_description">This phone is missing the BlackBerry Keyboard. LayTray will not work without it.</string>
<string name="close">Close</string>
<string name="toast_saved">Saved</string>
<string name="title_icon_channel">Layout icon</string>
<!-- Strings related to Settings -->
<!-- Example General settings -->
<string name="pref_header_general">General</string>
<string name="pref_title_default_app_name">App to monitor</string>
<string-array name="pref_default_app_name_list_titles">
<item>Blackberry Keyboard</item>
</string-array>
<string-array name="pref_default_app_name_list_values">
<item>com.blackberry.keyboard</item>
</string-array>
<string name="pref_title_notification_importance">Notification importance</string>
<string-array name="pref_notification_importance_list_titles">
<item>Default</item>
<item>High</item>
<item>Low</item>
<item>Min</item>
</string-array>
<string-array name="pref_notification_importance_list_values">
<item>0</item>
<item>1</item>
<item>-1</item>
<item>-2</item>
</string-array>
<string name="pref_title_notification_mode">Notification shape</string>
<string-array name="pref_notification_mode_list_titles">
<item>Plain Text</item>
<item>Text in circle</item>
<item>Text in a square</item>
<item>Text in a square outline</item>
<item>Icon</item>
</string-array>
<string-array name="pref_notification_mode_list_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
</string-array>
<string name="pref_title_icon_builder">Icon builder</string>
<!-- Example settings for Notifications -->
<string name="pref_header_notifications">Notifications</string>
<string name="pref_title_text_fake_bold">Bold</string>
<string name="pref_title_text_size">Text size</string>
<string name="title_about">About</string>
<string name="about_text" translatable="false">A layout icon by NeoTheFox \n
Distributed on the terms of GNU GPLv3 licence \n
\n
Translated by:\n
Belarusian - Edward Asviacinski\n
Czech - Pavel Borecki</string>
</resources>

View File

@ -0,0 +1,4 @@
<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android"
android:description="@string/accessibility_summary"
android:settingsActivity="space.neothefox.laytray.MainActivity"
/>

View File

@ -0,0 +1,9 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<ListPreference
android:key="default_app_name"
android:entryValues="@array/pref_default_app_name_list_values"
android:entries="@array/pref_default_app_name_list_titles"
android:title="@string/pref_title_default_app_name" />
</PreferenceScreen>

View File

@ -0,0 +1,15 @@
<preference-headers xmlns:android="http://schemas.android.com/apk/res/android">
<!-- These settings headers are only used on tablets. -->
<header
android:fragment="space.neothefox.laytray.SettingsActivity$GeneralPreferenceFragment"
android:icon="@drawable/ic_info_black_24dp"
android:title="@string/pref_header_general" />
<header
android:fragment="space.neothefox.laytray.SettingsActivity$NotificationPreferenceFragment"
android:icon="@drawable/ic_notifications_black_24dp"
android:title="@string/pref_header_notifications" />
</preference-headers>

View File

@ -0,0 +1,38 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<!-- A 'parent' preference, which enables/disables child preferences (below)
when checked/unchecked. -->
<ListPreference
android:defaultValue="0"
android:entries="@array/pref_notification_importance_list_titles"
android:entryValues="@array/pref_notification_importance_list_values"
android:key="notificationImportance"
android:negativeButtonText="@null"
android:positiveButtonText="@null"
android:title="@string/pref_title_notification_importance" />
<ListPreference
android:defaultValue="0"
android:entries="@array/pref_notification_mode_list_titles"
android:entryValues="@array/pref_notification_mode_list_values"
android:key="textMode"
android:title="@string/pref_title_notification_mode" />
<SwitchPreference
android:defaultValue="true"
android:key="textFakeBold"
android:title="@string/pref_title_text_fake_bold" />
<!-- NOTE: This preference will be enabled only when the checkbox above is checked. -->
<EditTextPreference
android:defaultValue="48"
android:key="textSize"
android:singleLine="true"
android:inputType="number"
android:title="@string/pref_title_text_size" />
<Preference
android:key="iconBuilderPreference"
android:title="@string/pref_title_icon_builder" />
</PreferenceScreen>

View File

@ -7,7 +7,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.android.tools.build:gradle:3.1.4'
// NOTE: Do not place your application dependencies here; they belong