Skip to content

Commit

Permalink
Merge pull request #36 from Kaljurand/multilang
Browse files Browse the repository at this point in the history
Use multiple service-language combinations on the speech keyboard
  • Loading branch information
Kaljurand committed Jun 2, 2015
2 parents a3c6688 + 3e514ed commit 8a2ad99
Show file tree
Hide file tree
Showing 27 changed files with 843 additions and 436 deletions.
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -25,10 +25,10 @@ Point to the SDK directory by setting the environment variable

Then run

gradle build
gradle lint
gradle installRelease
gradle ...
gradle makeIcons
gradle build
gradle lint
gradle assembleRelease

For the listing of more Gradle tasks, run:

Expand Down
4 changes: 4 additions & 0 deletions app/AndroidManifest.xml
Expand Up @@ -117,6 +117,10 @@
android:name=".DetailsActivity"
android:label="@string/labelActivityDetails"
android:theme="@style/Theme.K6nele.Dialog"></activity>
<activity
android:name=".ComboSelectorActivity"
android:label="@string/dialogTitleCombo"
android:parentActivityName=".Preferences"></activity>
<activity
android:name=".AppListActivity"
android:label="@string/labelActivityAppList"
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Expand Up @@ -23,8 +23,8 @@ android {
applicationId 'ee.ioc.phon.android.speak'
minSdkVersion 16
targetSdkVersion 22
versionCode 1108
versionName '1.1.08'
versionCode 1200
versionName '1.2.00'
}


Expand Down
10 changes: 10 additions & 0 deletions app/res/drawable/button_combo.xml
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">

<item android:state_pressed="true">
<shape android:shape="rectangle">
<solid android:color="@color/transparent_blue" />
</shape>
</item>
<item android:drawable="@android:color/transparent" />
</selector>
20 changes: 19 additions & 1 deletion app/res/layout-land/voice_ime_view.xml
Expand Up @@ -13,7 +13,7 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="@dimen/layoutMargin0">
android:padding="@dimen/layoutMargin4dp">

<ImageButton
android:id="@+id/bImeKeyboard"
Expand Down Expand Up @@ -51,6 +51,7 @@
android:ellipsize="start"
android:padding="@dimen/layoutMargin1"
android:singleLine="true"
android:text="@string/testComboLabel"
android:textColor="@color/grey300"
android:textSize="@dimen/textSize2" />

Expand All @@ -64,6 +65,23 @@
android:textColor="@color/grey200"
android:textSize="@dimen/textSize3" />

<Button
android:id="@+id/tvComboSelector"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tvMessage"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_margin="@dimen/layoutMargin1"
android:background="@drawable/button_combo"
android:ellipsize="end"
android:minHeight="@dimen/layoutMargin3"
android:minWidth="@dimen/layoutMargin3"
android:singleLine="true"
android:text="@string/testComboLabel"
android:textColor="@color/grey200"
android:textSize="@dimen/textSize10sp" />

<ee.ioc.phon.android.speak.MicButton
android:id="@+id/bImeStartStop"
android:layout_width="@dimen/layoutHeightButtonMicrophone"
Expand Down
29 changes: 29 additions & 0 deletions app/res/layout/list_item_combo.xml
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/layoutMargin1">

<TextView
android:id="@+id/language"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/grey50"
android:textSize="@dimen/textSize3" />

<TextView
android:id="@+id/service"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/language"
android:textSize="@dimen/textSize2" />

<CheckBox
android:id="@+id/check"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true" />

</RelativeLayout>
23 changes: 19 additions & 4 deletions app/res/layout/voice_ime_view.xml
Expand Up @@ -32,14 +32,15 @@
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_margin="@dimen/layoutMargin1"
android:layout_margin="@dimen/layoutMargin4dp"
android:layout_toEndOf="@+id/bImeKeyboard"
android:layout_toLeftOf="@+id/bImeGo"
android:layout_toRightOf="@+id/bImeKeyboard"
android:layout_toStartOf="@+id/bImeGo"
android:ellipsize="start"
android:gravity="center"
android:singleLine="true"
android:text="@string/testComboLabel"
android:textColor="@color/grey300"
android:textSize="@dimen/textSize2" />

Expand All @@ -61,8 +62,6 @@
android:layout_width="@dimen/layoutHeightButtonMicrophone"
android:layout_height="@dimen/layoutHeightButtonMicrophone"
android:layout_gravity="center"
android:layout_marginBottom="@dimen/layoutMargin1"
android:layout_marginTop="@dimen/layoutMargin0"
android:background="@drawable/button_mic"
android:contentDescription="@string/cdMicrophone"
android:gravity="center"
Expand All @@ -73,10 +72,26 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="@dimen/layoutMargin1"
android:layout_margin="@dimen/layoutMargin4dp"
android:gravity="center"
android:text="@string/buttonImeSpeak"
android:textColor="@color/grey200"
android:textSize="@dimen/textSize3" />

<Button
android:id="@+id/tvComboSelector"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="@dimen/layoutMargin1"
android:background="@drawable/button_combo"
android:ellipsize="end"
android:gravity="center"
android:minHeight="@dimen/layoutMargin3"
android:minWidth="@dimen/layoutMargin3"
android:singleLine="true"
android:text="@string/testComboLabel"
android:textColor="@color/grey200"
android:textSize="@dimen/textSize10sp" />

</ee.ioc.phon.android.speak.VoiceImeView>
15 changes: 6 additions & 9 deletions app/res/values-et/strings.xml
Expand Up @@ -52,9 +52,6 @@
<string name="summaryVoiceSearchDemo">Transkribeerib kõne ning edastab tulemused
infootsingu rakendusele</string>

<string name="titleRecognitionService">Kõnetuvastusteenus</string>
<string name="dialogTitleImeRecognitionService">Kõnetuvastusteenus</string>

<!-- RecognizerIntent activity -->
<string name="buttonSpeak">Lindista!</string>
<string name="buttonStop">Lõpeta!</string>
Expand Down Expand Up @@ -257,13 +254,13 @@
<string name="titleDefaultServiceHttp">HTTP-aadress</string>
<string name="titleDefaultServiceWs">WebSocket-aadress</string>
<string name="labelRecognitionServiceHttpWithComment">Kõnele (grammatikatoega). Ainuvõimalik valik Kõnele praeguses versioonis.</string>
<string name="labelDefaultRecognitionService">Süsteemne vaikeväärtus</string>
<string name="titleEnableIme">Kõneklaviatuuri sisse lülitamine</string>
<string name="summaryEnableIme">Kõnele klaviatuur pole praegu sisse lülitatud. Lülitage see Androidi sisestusmeetodite (IME) seadetes sisse.</string>
<string name="summaryEnableIme">Kõnele klaviatuur pole praegu sisse lülitatud. Vajutage siia nupule, et see Androidi sisestusmeetodite (IME) seadetes sisse lülitada.</string>
<string name="summaryImeHelpText">Näita kõneklaviatuuril abiteksti (teeb klaviatuuri sellevõrra suuremaks)</string>
<string name="titleImeHelpText">Abitekst</string>
<string name="dialogTitleImeRecognitionLanguage">Tuvastuskeel</string>
<string name="titleRecognitionLanguage">Tuvastuskeel</string>
<string name="noteRecognitionLanguageUndefined">(määramata)</string>
<string name="dialogTitleCombo">Keeled &amp; teenused</string>
<string name="titleCombo">Kõnetuvastuskeeled &amp; teenused</string>
<string name="summaryImeCombo">Uuendan…</string>
<string name="emptylistCombos">Praegu kasutatakse eesti keelt ja Kõnele (kiire tuvastusega) teenust. Keelte ja teenuste lisamiseks või muutmiseks vajutage nupule.</string>

</resources>
</resources>
2 changes: 1 addition & 1 deletion app/res/values/colors.xml
Expand Up @@ -30,7 +30,7 @@


<!-- 1 = top,lighter; 2 = bottom,darker -->
<color name="transparent">#00000000</color>
<!-- <color name="transparent">#00000000</color> -->
<color name="very_transparent">#11404040</color>
<color name="transparent_blue">#990099cc</color>
<color name="buttonNormal1">#ffcc00</color>
Expand Down
4 changes: 3 additions & 1 deletion app/res/values/dimens.xml
@@ -1,11 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="textSize10sp">10sp</dimen>
<dimen name="textSize1">12sp</dimen>
<dimen name="textSize2">14sp</dimen>
<dimen name="textSize3">18sp</dimen>
<dimen name="textSize4">22sp</dimen>
<dimen name="layoutHeightButtonMicrophone">80dp</dimen>
<dimen name="layoutMargin0">2dp</dimen>
<dimen name="layoutMargin4dp">4dp</dimen>
<dimen name="layoutMargin1">8dp</dimen>
<dimen name="layoutMargin2">16dp</dimen>
<dimen name="layoutMargin3">24dp</dimen>
</resources>

0 comments on commit 8a2ad99

Please sign in to comment.