Added French support and many other changes:
* Updated gradle * Gradle build script changed to prompt for password in UI * Initial French support NOTE: Missing UI resources. * IntelliJ IDEA: Optimize Imports * Fixed dictionary loading UI oddity when loading multiple dicts
This commit is contained in:
parent
e7466a292f
commit
0ec529a6d3
21 changed files with 336715 additions and 110 deletions
336531
assets/fr-utf8.txt
Normal file
336531
assets/fr-utf8.txt
Normal file
File diff suppressed because it is too large
Load diff
46
build.gradle
46
build.gradle
|
|
@ -1,9 +1,10 @@
|
|||
import groovy.swing.SwingBuilder
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.14.0'
|
||||
classpath 'com.android.tools.build:gradle:1.0.0'
|
||||
}
|
||||
}
|
||||
apply plugin: 'android'
|
||||
|
|
@ -114,10 +115,10 @@ android {
|
|||
// http://stackoverflow.com/a/19130098
|
||||
signingConfigs {
|
||||
release {
|
||||
storeFile file(System.getenv("KEYSTORE"))
|
||||
storePassword project.ext.keyStorePass
|
||||
keyAlias System.getenv("KEYALIAS")
|
||||
keyPassword project.ext.keyPass
|
||||
//storeFile file(System.getenv("KEYSTORE"))
|
||||
//storePassword project.ext.keyStorePass
|
||||
//keyAlias System.getenv("KEYALIAS")
|
||||
//keyPassword project.ext.keyPass
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -144,8 +145,39 @@ task getDictSizes {
|
|||
}
|
||||
|
||||
task readPasswordFromInput << {
|
||||
android.signingConfigs.release.storePassword = String.valueOf(System.console().readPassword("\nKeyStore Password: "))
|
||||
android.signingConfigs.release.keyPassword = String.valueOf(System.console().readPassword("\nKey Password: "))
|
||||
// https://www.timroes.de/2014/01/19/using-password-prompts-with-gradle-build-files/
|
||||
new SwingBuilder().edt {
|
||||
dialog(modal: true, // Otherwise the build will continue running before you closed the dialog
|
||||
title: 'KeyStore password', // Dialog title
|
||||
alwaysOnTop: true, // pretty much what the name says
|
||||
resizable: false, // Don't allow the user to resize the dialog
|
||||
locationRelativeTo: null, // Place dialog in center of the screen
|
||||
pack: true, // We need to pack the dialog (so it will take the size of it's children
|
||||
show: true // Let's show it
|
||||
) {
|
||||
vbox { // Put everything below each other
|
||||
label(text: "Please enter key passphrase:")
|
||||
input = passwordField()
|
||||
button(defaultButton: true, text: 'OK', actionPerformed: {
|
||||
android.signingConfigs.release.storePassword = input.password; // Set pass variable to value of input field
|
||||
dispose(); // Close dialog
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
new SwingBuilder().edt {
|
||||
dialog(modal: true, title: 'Key password', alwaysOnTop: true, resizable: false,
|
||||
locationRelativeTo: null, pack: true, show: true // Let's show it
|
||||
) {
|
||||
vbox { // Put everything below each other
|
||||
label(text: "Please enter key passphrase:")
|
||||
input = passwordField()
|
||||
button(defaultButton: true, text: 'OK', actionPerformed: {
|
||||
android.signingConfigs.release.keyPassword = input.password; dispose();
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//http://stackoverflow.com/a/17484331
|
||||
|
|
|
|||
|
|
@ -15,11 +15,14 @@
|
|||
<item>English</item>
|
||||
<item>Russian</item>
|
||||
<item>German</item>
|
||||
<item>French</item>
|
||||
</string-array>
|
||||
<!--pref_lang_titles pair with pref_lang_values -->
|
||||
<integer-array translatable="false" name="pref_lang_values">
|
||||
<item>@integer/LANG_EN</item>
|
||||
<item>@integer/LANG_RU</item>
|
||||
<item>@integer/LANG_DE</item>
|
||||
<item>@integer/LANG_FR</item>
|
||||
</integer-array>
|
||||
|
||||
<string-array name="capsMode">
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- MAKE SURE THESE MATCH WITH LangHelper.java -->
|
||||
<!-- MAKE SURE THESE MATCH WITH LangHelper.java id -->
|
||||
<integer name="LANG_EN">1</integer>
|
||||
<integer name="LANG_RU">2</integer>
|
||||
<integer name="LANG_DE">4</integer>
|
||||
<integer name="LANG_FR">8</integer>
|
||||
|
||||
<integer name="INPUT_DICT">0</integer>
|
||||
<integer name="INPUT_TEXT">1</integer>
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
<string name="pref_help">"Show help</string>
|
||||
<string name="pref_loaddict">Load dictionary</string>
|
||||
<string name="pref_loaduserdict">Load user dictionary</string>
|
||||
<string translatable="false" name="pref_loaduserdictdesc">SDcard/traditionalt9/user.lang.dict (lang: en/ru/de)</string>
|
||||
<string translatable="false" name="pref_loaduserdictdesc">SDcard/traditionalt9/user.lang.dict (lang: en/ru/de/fr)</string>
|
||||
<string name="pref_nukedict">Nuke dictionary</string>
|
||||
<string name="pref_backupdict">Backup dictionary</string>
|
||||
<string name="pref_restoredict">Restore dictionary</string>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
package org.nyanya.android.traditionalt9;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.app.Activity;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.View;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
package org.nyanya.android.traditionalt9;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Canvas;
|
||||
|
|
@ -11,6 +8,9 @@ import android.graphics.Rect;
|
|||
import android.graphics.drawable.Drawable;
|
||||
import android.view.View;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CandidateView extends View {
|
||||
|
||||
private List<String> mSuggestions;
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
package org.nyanya.android.traditionalt9;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import org.nyanya.android.traditionalt9.LangHelper.LANGUAGE;
|
||||
|
||||
import java.util.AbstractList;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import org.nyanya.android.traditionalt9.LangHelper.LANGUAGE;
|
||||
|
||||
public class CharMap {
|
||||
protected static final AbstractList<Map<Character, Integer>> CHARTABLE = new ArrayList<Map<Character, Integer>>(LangHelper.NLANGS);
|
||||
static {
|
||||
|
|
@ -38,10 +38,11 @@ public class CharMap {
|
|||
enMap.put('v', 8); enMap.put('8', 8); enMap.put('w', 9);
|
||||
enMap.put('x', 9); enMap.put('y', 9); enMap.put('z', 9);
|
||||
enMap.put('9', 9); enMap.put('+', 0); enMap.put('0', 0);
|
||||
// for German support reusing the same table since it already had special characters
|
||||
enMap.put('€', 1);
|
||||
enMap.put('ß', 7);
|
||||
CHARTABLE.add(0, Collections.unmodifiableMap(enMap));
|
||||
// add extra characters for German and French maps.
|
||||
enMap.put('€', 1); enMap.put('ß', 7); // German chars
|
||||
enMap.put('î', 4); enMap.put('ù', 8); // French chars
|
||||
Map<Character, Integer> endefrmap = Collections.unmodifiableMap(enMap);
|
||||
CHARTABLE.add(0, endefrmap);
|
||||
|
||||
// Russian
|
||||
Map<Character, Integer> ruMap = new HashMap<Character, Integer>();
|
||||
|
|
@ -68,22 +69,23 @@ public class CharMap {
|
|||
ruMap.put('8', 8);
|
||||
ruMap.put('ь', 9); ruMap.put('э', 9); ruMap.put('ю', 9); ruMap.put('я', 9);
|
||||
ruMap.put('9', 9);
|
||||
ruMap.put('+', 0); ruMap.put('0', 0);
|
||||
ruMap.put('+', 0);
|
||||
ruMap.put('0', 0);
|
||||
CHARTABLE.add(1, Collections.unmodifiableMap(ruMap));
|
||||
|
||||
//German (lol pretty simple, hopefully.)
|
||||
CHARTABLE.add(2, Collections.unmodifiableMap(enMap));
|
||||
CHARTABLE.add(2, Collections.unmodifiableMap(endefrmap));
|
||||
CHARTABLE.add(3, Collections.unmodifiableMap(endefrmap));
|
||||
}
|
||||
|
||||
protected static final char[][] ENT9TABLE = { { '0', '+' },
|
||||
{ '.', ',', '?', '!', '"', '\'', '-', '@', '$', '%', '&', '*', '(', ')', '_', '1' },
|
||||
{ '.', ',', '?', '!', '"', '/', '-', '@', '$', '%', '&', '*', '(', ')', '_', '1' },
|
||||
{ 'a', 'b', 'c', 'A', 'B', 'C', '2' }, { 'd', 'e', 'f', 'D', 'E', 'F', '3' },
|
||||
{ 'g', 'h', 'i', 'G', 'H', 'I', '4' }, { 'j', 'k', 'l', 'J', 'K', 'L', '5' },
|
||||
{ 'm', 'n', 'o', 'M', 'N', 'O', '6' }, { 'p', 'q', 'r', 's', 'P', 'Q', 'R', 'S', '7' },
|
||||
{ 't', 'u', 'v', 'T', 'U', 'V', '8' }, { 'w', 'x', 'y', 'z', 'W', 'X', 'Y', 'Z', '9' },
|
||||
{ ' ', '\n' } };
|
||||
protected static final char[][] RUT9TABLE = { { '0', '+' },
|
||||
{ '.', ',', '?', '!', '"', '\'', '-', '@', '$', '%', '&', '*', '(', ')', '_', '1' },
|
||||
{ '.', ',', '?', '!', '"', '/', '-', '@', '$', '%', '&', '*', '(', ')', '_', '1' },
|
||||
{ 'а', 'б', 'в', 'г', 'А', 'Б', 'В', 'Г', '2' }, { 'д', 'е', 'ё', 'ж', 'з', 'Д', 'Е', 'Ё', 'Ж', 'З', '3' },
|
||||
{ 'и', 'й', 'к', 'л', 'И', 'Й', 'К', 'Л', '4' }, { 'м', 'н', 'о', 'п', 'М', 'Н', 'О', 'П', '5' },
|
||||
{ 'р', 'с', 'т', 'у', 'Р', 'С', 'Т', 'У', '6' }, { 'ф', 'х', 'ц', 'ч', 'Ф', 'Х', 'Ц', 'Ч', '7' },
|
||||
|
|
@ -101,7 +103,20 @@ public class CharMap {
|
|||
{ 't', 'u', 'v', 'T', 'U', 'V', 'ü', 'Ü', 'û', 'Û', '8' },
|
||||
{ 'w', 'x', 'y', 'z', 'W', 'X', 'Y', 'Z', '9' },
|
||||
{ '\n' } };
|
||||
protected static final char[][][] T9TABLE = {ENT9TABLE, RUT9TABLE, DET9TABLE};
|
||||
|
||||
protected static final char[][] FRT9TABLE = {
|
||||
{ ' ', '+', '0' },
|
||||
{ '.', ',', '?', '!', ':', ';', '"', '/', '-', '@', '^', '€', '$', '%', '&', '*', '(', ')', '_', '1' },
|
||||
{ 'a', 'b', 'c', 'A', 'B', 'C', 'ä', 'Ä','á', 'â', 'à', 'å', 'ç', 'Á', 'Â', 'À', 'Å', 'Ç', '2' },
|
||||
{ 'd', 'e', 'f', 'D', 'E', 'F', 'é','ë','è','ê', 'É', 'Ë', 'È', 'Ê', '3' },
|
||||
{ 'g', 'h', 'i', 'G', 'H', 'I', 'í', 'ï', 'Í', 'Ï', '4' },
|
||||
{ 'j', 'k', 'l', 'J', 'K', 'L', '5' },
|
||||
{ 'm', 'n', 'o', 'M', 'N', 'O', 'ö', 'Ö', 'ñ','ó','ô', 'Ñ', 'Ó', 'Ô', '6' },
|
||||
{ 'p', 'q', 'r', 's', 'P', 'Q', 'R', 'S', 'ß', '7' },
|
||||
{ 't', 'u', 'v', 'T', 'U', 'V', 'ü', 'Ü', 'û', 'Û', '8' },
|
||||
{ 'w', 'x', 'y', 'z', 'W', 'X', 'Y', 'Z', '9' },
|
||||
{ '\n' } };
|
||||
protected static final char[][][] T9TABLE = {ENT9TABLE, RUT9TABLE, DET9TABLE, FRT9TABLE};
|
||||
|
||||
protected static final int[] ENT9CAPSTART = { 0, 0, 3, 3, 3, 3, 3, 4, 3, 4, 0 };
|
||||
protected static final int [] RUT9CAPSTART = {0, 0, 4, 5, 4, 4, 4, 4, 4, 4, 0};
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
package org.nyanya.android.traditionalt9;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
import android.widget.ViewSwitcher;
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
package org.nyanya.android.traditionalt9;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import pl.wavesoftware.widget.MultiSelectListPreference;
|
||||
|
||||
public class LangHelper {
|
||||
protected static final Locale RUSSIAN = new Locale("ru","RU");
|
||||
public enum LANGUAGE {
|
||||
// MAKE SURE THESE MATCH WITH values/const.xml
|
||||
NONE(-1, -1), EN(0,1), RU(1,2), DE(2,4), ;
|
||||
public final int id;
|
||||
// (index, id) Where index is index in arrays like LOCALES and MUST increment and MUST be in
|
||||
// the same order as arrays.xml/pref_lang_values, and id is the identifier used in
|
||||
// the database and such. id should never change unless database update is done.
|
||||
// id MUST increment in doubles (as the enabled languages are stored as an integer)
|
||||
NONE(-1, -1), EN(0,1), RU(1,2), DE(2,4), FR(3,8);
|
||||
public final int index;
|
||||
public final int id;
|
||||
// lookup map
|
||||
private static final Map<Integer, LANGUAGE> lookup = new HashMap<Integer, LANGUAGE>();
|
||||
private static final LANGUAGE[] ids = LANGUAGE.values();
|
||||
|
|
@ -25,7 +25,7 @@ public class LangHelper {
|
|||
public static LANGUAGE get(int i) { return lookup.get(i);}
|
||||
}
|
||||
|
||||
protected static final Locale[] LOCALES = {Locale.ENGLISH, RUSSIAN, Locale.GERMAN};
|
||||
protected static final Locale[] LOCALES = {Locale.ENGLISH, RUSSIAN, Locale.GERMAN, Locale.FRENCH};
|
||||
//protected static final String[] LANGS = {"EN", "RU", "DE"};
|
||||
|
||||
public static final int LANG_DEFAULT = LANGUAGE.EN.id;
|
||||
|
|
@ -43,24 +43,30 @@ public class LangHelper {
|
|||
//[LANG][MODE][CAPSMODE] = iconref
|
||||
// first group en, first line LANG, second line TEXT, last line NUM
|
||||
protected static final int[][][] ICONMAP = {
|
||||
{
|
||||
//English resources
|
||||
{
|
||||
//English resources
|
||||
{R.drawable.ime_en_lang_lower, R.drawable.ime_en_lang_single, R.drawable.ime_en_lang_upper},
|
||||
{R.drawable.ime_en_text_lower, R.drawable.ime_en_text_single, R.drawable.ime_en_text_upper},
|
||||
{R.drawable.ime_number},
|
||||
},
|
||||
{
|
||||
// Russian resources
|
||||
{R.drawable.ime_en_text_lower, R.drawable.ime_en_text_single, R.drawable.ime_en_text_upper},
|
||||
{R.drawable.ime_number},
|
||||
},
|
||||
{
|
||||
// Russian resources
|
||||
{R.drawable.ime_ru_lang_lower, R.drawable.ime_ru_lang_single, R.drawable.ime_ru_lang_upper}, //LANG
|
||||
{R.drawable.ime_ru_text_lower, R.drawable.ime_ru_text_single, R.drawable.ime_ru_text_upper}, //TEXT
|
||||
{R.drawable.ime_number}, //NUM
|
||||
},
|
||||
{R.drawable.ime_ru_text_lower, R.drawable.ime_ru_text_single, R.drawable.ime_ru_text_upper}, //TEXT
|
||||
{R.drawable.ime_number}, //NUM
|
||||
},
|
||||
{
|
||||
// German resources
|
||||
{R.drawable.ime_de_lang_lower, R.drawable.ime_de_lang_single, R.drawable.ime_de_lang_upper}, //LANG
|
||||
{R.drawable.ime_en_text_lower, R.drawable.ime_en_text_single, R.drawable.ime_en_text_upper}, //TEXT
|
||||
{R.drawable.ime_number}, //NUM
|
||||
},
|
||||
{
|
||||
// French resources
|
||||
{R.drawable.ime_de_lang_lower, R.drawable.ime_de_lang_single, R.drawable.ime_de_lang_upper}, //LANG
|
||||
{R.drawable.ime_en_text_lower, R.drawable.ime_en_text_single, R.drawable.ime_en_text_upper}, //TEXT
|
||||
{R.drawable.ime_number}, //NUM
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,5 @@
|
|||
package org.nyanya.android.traditionalt9;
|
||||
|
||||
import java.util.AbstractList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
|
@ -22,6 +15,12 @@ import android.widget.Toast;
|
|||
|
||||
import org.nyanya.android.traditionalt9.LangHelper.LANGUAGE;
|
||||
|
||||
import java.util.AbstractList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class T9DB {
|
||||
|
||||
private static volatile T9DB instance = null;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
package org.nyanya.android.traditionalt9;
|
||||
|
||||
import java.util.AbstractList;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.content.res.Resources;
|
||||
import android.inputmethodservice.InputMethodService;
|
||||
|
|
@ -23,6 +18,10 @@ import android.widget.Toast;
|
|||
import org.nyanya.android.traditionalt9.LangHelper.LANGUAGE;
|
||||
import org.nyanya.android.traditionalt9.T9DB.DBSettings.SETTING;
|
||||
|
||||
import java.util.AbstractList;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class TraditionalT9 extends InputMethodService implements
|
||||
KeyboardView.OnKeyboardActionListener {
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,41 @@ package org.nyanya.android.traditionalt9;
|
|||
/*
|
||||
Source for English dictionary: http://wordlist.sourceforge.net/
|
||||
Source for Russian dictionary: Various sources from Russian user
|
||||
Source for German dictionary: Modified version from http://www.winedt.org/Dict/
|
||||
Source for French dictionary: http://www.pallier.org/ressources/dicofr/dicofr.html
|
||||
*/
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ListActivity;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Resources;
|
||||
import android.database.Cursor;
|
||||
import android.database.DatabaseUtils.InsertHelper;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.os.SystemClock;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.ListAdapter;
|
||||
import android.widget.ListView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.stackoverflow.answer.UnicodeBOMInputStream;
|
||||
|
||||
import org.nyanya.android.traditionalt9.LangHelper.LANGUAGE;
|
||||
import org.nyanya.android.traditionalt9.T9DB.DBSettings.SETTING;
|
||||
import org.nyanya.android.traditionalt9.settings.CustomInflater;
|
||||
import org.nyanya.android.traditionalt9.settings.Setting;
|
||||
import org.nyanya.android.traditionalt9.settings.SettingAdapter;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.Closeable;
|
||||
|
|
@ -26,38 +59,6 @@ import java.util.Locale;
|
|||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ListActivity;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Resources;
|
||||
import android.database.Cursor;
|
||||
import android.database.DatabaseUtils.InsertHelper;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.os.SystemClock;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.ListAdapter;
|
||||
import android.widget.ListView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.stackoverflow.answer.UnicodeBOMInputStream;
|
||||
|
||||
import org.nyanya.android.traditionalt9.settings.CustomInflater;
|
||||
import org.nyanya.android.traditionalt9.settings.Setting;
|
||||
import org.nyanya.android.traditionalt9.settings.SettingAdapter;
|
||||
import org.nyanya.android.traditionalt9.LangHelper.LANGUAGE;
|
||||
import org.nyanya.android.traditionalt9.T9DB.DBSettings.SETTING;
|
||||
|
||||
public class TraditionalT9Settings extends ListActivity implements
|
||||
DialogInterface.OnCancelListener {
|
||||
|
||||
|
|
@ -466,12 +467,12 @@ public class TraditionalT9Settings extends ListActivity implements
|
|||
if ((pos - last) > 4096) {
|
||||
// Log.d("doInBackground", "line: " + linecount);
|
||||
// Log.d("doInBackground", "word: " + word);
|
||||
publishProgress((int) ((float) pos / size * 10000));
|
||||
if (size >= 0) { publishProgress((int) ((float) pos / size * 10000)); }
|
||||
last = pos;
|
||||
}
|
||||
word = getLine(br, rpl, fname);
|
||||
}
|
||||
publishProgress(10000);
|
||||
publishProgress((int) ((float) pos / size * 10000));
|
||||
db.setTransactionSuccessful();
|
||||
} finally {
|
||||
db.setLockingEnabled(true);
|
||||
|
|
|
|||
|
|
@ -5,9 +5,7 @@ package org.nyanya.android.traditionalt9.settings;
|
|||
import android.content.Context;
|
||||
import android.content.res.XmlResourceParser;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
|
||||
import org.nyanya.android.traditionalt9.R;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package org.nyanya.android.traditionalt9.settings;
|
|||
// https://github.com/codepath/android_guides/wiki/Using-an-ArrayAdapter-with-ListView
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import android.app.AlertDialog;
|
|||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.nyanya.android.traditionalt9.LangHelper;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,6 @@
|
|||
package pl.wavesoftware.widget;
|
||||
// https://gist.github.com/cardil/4754571/07b4b6ffd37b440bbdec2cafa1ab7411c5ad3873
|
||||
// modified to work specifically for this service
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.Context;
|
||||
|
|
@ -16,6 +12,10 @@ import android.text.TextUtils;
|
|||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class MultiSelectListPreference extends ListPreference {
|
||||
|
||||
private String separator;
|
||||
|
|
@ -68,7 +68,7 @@ public class MultiSelectListPreference extends ListPreference {
|
|||
} else {
|
||||
String[] sa = ((String) val).split("\\"+DEFAULT_SEPARATOR);
|
||||
if (sa.length < 1) {
|
||||
Log.w("MultiSelectPref.defaultunpack", "split is less than 1");
|
||||
Log.w("MSLPref.defaultunpack", "split is less than 1");
|
||||
return new int[] {0}; //default pref
|
||||
}
|
||||
int[] ia = new int[sa.length];
|
||||
|
|
|
|||
25
store-res/playstore-ru.txt
Normal file
25
store-res/playstore-ru.txt
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
Title
|
||||
Traditional T9 Keypad IME
|
||||
|
||||
|
||||
Full description
|
||||
Traditional T9 Keypad IME – это уникальное приложение для андроид, позволяющее вводить текст в Т9, использовав при этом аппаратную цифровую клавиатуру.
|
||||
|
||||
Программа имеет горячие клавиши.
|
||||
Так например с помощью левой кнопки при выборанном режиме ввода Словарь(Т9), можно в словарь добавить слово, а при выбранном по-буквенному режиме ввода вставить нужный символ.
|
||||
|
||||
Правая кнопка, при коротком нажатии, позволяет выбирать нужный режим ввода (Словарь(Т9)->текст->только цифры). При длительном нажатии правой кнопки можно перейти в настройки программы.
|
||||
|
||||
При помощи кнопки «звездочка», можно менять регистр при коротком нажатии, а также вызывать диалог вставки смайлика при длительном нажатии.
|
||||
Пробел ставиться с помощью короткого нажатия «решетки», а новая строка с помощью длительного нажимания.
|
||||
|
||||
Английский словарь содержит 95694 слова.
|
||||
Русский словарь 28076 слова.
|
||||
Имеется возможность:
|
||||
Добавления своих слов в словарь;
|
||||
Загрузки своего словаря;
|
||||
Резервирование и восстановления словаря.
|
||||
|
||||
|
||||
Short description
|
||||
T9 метод ввода текста используя цифровую аппаратную клавиатуру!
|
||||
|
|
@ -2,21 +2,21 @@ Title
|
|||
Traditional T9 Keypad IME
|
||||
|
||||
|
||||
Description
|
||||
Full description
|
||||
T9 predictive text input method using your hardware keypad. This is not a software/on screen keyboard.
|
||||
Only makes sense to install this on a device with a hardware keypad.
|
||||
Input is only available via the numeric keypad.
|
||||
See website for help and support.
|
||||
|
||||
Multilingual support (English and Russian)
|
||||
Multilingual support (English, Russian, German and French)
|
||||
|
||||
|
||||
Promo text
|
||||
T9 predictive text input using your phone keypad! (English, Russian)
|
||||
Short description
|
||||
T9 predictive text input using your phone keypad! (English, Russian, German & French)
|
||||
|
||||
|
||||
Recent changes
|
||||
Multilingual support (English, Russian)
|
||||
Other fixes.
|
||||
What's new in this version?
|
||||
New language support (German, French)
|
||||
Other fixes and modifications.
|
||||
|
||||
See github for commit history and other history info.
|
||||
See github for commit history and other history info.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue