Skip to content

Commit

Permalink
Export RewritesSelector + minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaljurand committed Feb 19, 2017
1 parent 3410288 commit b5611f5
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 16 deletions.
11 changes: 5 additions & 6 deletions app/AndroidManifest.xml
Expand Up @@ -137,14 +137,11 @@ Also, failed to set the launchMode from the resource, INSTALL_PARSE_FAILED_UNEXP
</intent-filter>
</receiver>

<!--
The purpose of MAIN/DEFAULT/exported=true is to support the creation of "activity shortcut",
e.g. via Nova Launcher, i.e. the user can create an additional icon that launches directly
into the Preferences.
-->
<!-- Preferences are exported by default because they have intent filters.
But they should be not exported to avoid a security issue on older Androids (see lint check). -->
<activity
android:name=".activity.Preferences"
android:exported="true"
android:exported="false"
android:label="@string/labelActivityPreferences">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down Expand Up @@ -207,8 +204,10 @@ Also, failed to set the launchMode from the resource, INSTALL_PARSE_FAILED_UNEXP
android:name=".ServerListActivity"
android:label="@string/labelActivityServerList"
android:parentActivityName=".PreferencesRecognitionServiceHttp"></activity>
<!-- Exporting this to allow a shortcut to be created e.g. using Tasker. -->
<activity
android:name=".activity.RewritesSelectorActivity"
android:exported="true"
android:label="@string/labelActivityRewritesSelector"
android:parentActivityName=".activity.Preferences"></activity>
<activity
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Expand Up @@ -25,8 +25,8 @@ android {
applicationId 'ee.ioc.phon.android.speak'
minSdkVersion 14
targetSdkVersion 25
versionCode 1644
versionName '1.6.44'
versionCode 1646
versionName '1.6.46'
// Enable this when using the support library for the vector drawables
//vectorDrawables.useSupportLibrary = true
}
Expand Down
4 changes: 3 additions & 1 deletion app/res/layout/list_item_rewrites.xml
Expand Up @@ -2,14 +2,15 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/layoutMargin1">
android:padding="@dimen/layoutMargin2">

<TextView
android:id="@+id/rewritesId"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="?android:textColorPrimary" />

Expand All @@ -19,6 +20,7 @@
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:text="@string/check"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="?android:textColorPrimary" />
Expand Down
4 changes: 2 additions & 2 deletions app/res/values/strings.xml
Expand Up @@ -280,7 +280,7 @@

<!-- TODO: make separate docs for English -->
<string name="urlDoc" translatable="false">http://kaljurand.github.io/K6nele/docs/et/user_guide.html</string>
<string name="urlRewritesDoc" translatable="false">http://kaljurand.github.io/K6nele/docs/et/user_guide.html#mberkirjutusreeglid</string>
<string name="urlRewritesDoc" translatable="false">http://kaljurand.github.io/K6nele/docs/et/user_guide.html#Ümberkirjutusreeglid</string>

<string name="defaultAudioFormat" translatable="false">audio/x-raw</string>

Expand Down Expand Up @@ -377,4 +377,4 @@

<!-- Deprecated -->
<string name="buttonStop">Speak now!\nTap when finished</string>
</resources>
</resources>
Expand Up @@ -46,9 +46,9 @@
import ee.ioc.phon.android.speechutils.utils.PreferenceUtils;

/**
* Loads the rewrites from the EXTRAs of an incoming SEND-intent, or if they are missing,
* Loads the rewrites from the EXTRAs of an incoming VIEW- or SEND-intent, or if they are missing,
* then launches ACTION_GET_CONTENT to load the rewrites from its result data.
* In case of an incoming SEND-intent we only accept "text/tab-separated-values".
* In case of an incoming VIEW/SEND-intent we only accept "text/tab-separated-values" (see the manifest).
* However, if the user explicitly launches a file picker from Kõnele, then any "text/*" files
* can be picked.
*/
Expand Down
6 changes: 3 additions & 3 deletions docs/README.md
Expand Up @@ -7,7 +7,7 @@ Various documents, notes, examples

[intents.dot](intents.dot) is a diagram showing how information can flow from Kõnele to external devices/apps and back.

[Rewrite rule examples](http://kaljurand.github.io/K6nele/docs/et/user_guide.html#nited)
[Rewrite rule examples](http://kaljurand.github.io/K6nele/docs/et/user_guide.html#näited)
contains (mostly) Estonian rewrite rule tables (documented in English).
A rewrite rule table contains the following tab-separated columns:

Expand All @@ -21,7 +21,7 @@ A rewrite rule table contains the following tab-separated columns:
- Arg1. First argument of the command
- Arg2. Second argument of the command

The first line of the table is a header that names the columns. Only the Utterance and Replacement columns must be present.
The first line of the table is a header that names the columns. The header is optional if the table contains a single column (interpreted as Utterance) or 2 columns (interpreted as Utterance and Replacement).
Non-header lines can be commented out using an initial '#'.

Rewriting is done by:
Expand All @@ -30,4 +30,4 @@ Rewriting is done by:

The pre-defined commands cover cursor movement within the text and between fields, selection, replacement, copy/paste/cut,
and the editor actions `search`, `send`, `go`, and `done`. Most of the commands can be repeated or undone multiple times.
The arguments can reference expression groups by `$1`, `$2`, ... and the current selection by `{}`.
The arguments can reference expression groups by `$1`, `$2`, ... and the current selection by `@sel()`.

0 comments on commit b5611f5

Please sign in to comment.