This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
acbd7af
commit a2ce8ca
Showing
7 changed files
with
200 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
app/src/common/shared/org/mozilla/vrbrowser/ui/keyboards/RussianKeyboard.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
package org.mozilla.vrbrowser.ui.keyboards; | ||
|
||
import android.content.Context; | ||
|
||
import androidx.annotation.NonNull; | ||
import androidx.annotation.Nullable; | ||
|
||
import org.mozilla.vrbrowser.R; | ||
import org.mozilla.vrbrowser.input.CustomKeyboard; | ||
import org.mozilla.vrbrowser.ui.widgets.WidgetPlacement; | ||
import org.mozilla.vrbrowser.utils.StringUtils; | ||
|
||
import java.util.Locale; | ||
|
||
public class RussianKeyboard extends BaseKeyboard { | ||
private CustomKeyboard mKeyboard; | ||
private CustomKeyboard mSymbolsKeyboard; | ||
private Locale mLocale; | ||
|
||
public RussianKeyboard(Context aContext) { | ||
super(aContext); | ||
mLocale = new Locale("ru", "RU"); | ||
} | ||
|
||
@NonNull | ||
@Override | ||
public CustomKeyboard getAlphabeticKeyboard() { | ||
if (mKeyboard == null) { | ||
mKeyboard = new CustomKeyboard(mContext.getApplicationContext(), R.xml.keyboard_qwerty_russian); | ||
} | ||
return mKeyboard; | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public CustomKeyboard getSymbolsKeyboard() { | ||
if (mSymbolsKeyboard == null) { | ||
mSymbolsKeyboard = new CustomKeyboard(mContext.getApplicationContext(), R.xml.keyboard_symbols_russian); | ||
} | ||
return mSymbolsKeyboard; | ||
} | ||
|
||
@Override | ||
public float getAlphabeticKeyboardWidth() { | ||
return WidgetPlacement.dpDimension(mContext, R.dimen.keyboard_alphabetic_width_extra_column); | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public CandidatesResult getCandidates(String aText) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public String getKeyboardTitle() { | ||
return StringUtils.getStringByLocale(mContext, R.string.settings_language_italian, getLocale()); | ||
} | ||
|
||
@Override | ||
public Locale getLocale() { | ||
return mLocale; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:horizontalGap="@dimen/keyboard_horizontal_gap" | ||
android:verticalGap="@dimen/keyboard_vertical_gap" | ||
android:keyWidth="@dimen/keyboard_key_width" | ||
android:keyHeight="@dimen/keyboard_key_height"> | ||
<Row> | ||
<Key android:keyLabel="й" android:keyEdgeFlags="left" /> | ||
<Key android:keyLabel="ц" /> | ||
<Key android:keyLabel="у" /> | ||
<Key android:keyLabel="к" /> | ||
<Key android:keyLabel="е" android:popupCharacters="её" android:popupKeyboard="@xml/keyboard_popup" /> | ||
<Key android:keyLabel="н" /> | ||
<Key android:keyLabel="г" /> | ||
<Key android:keyLabel="ш" /> | ||
<Key android:keyLabel="щ" /> | ||
<Key android:keyLabel="з" /> | ||
<Key android:keyLabel="х" /> | ||
<Key android:keyLabel="ъ" /> | ||
<Key android:codes="-5" android:keyIcon="@drawable/ic_icon_keyboard_backspace" android:isRepeatable="true" android:keyWidth="@dimen/keyboard_key_backspace_width" /> | ||
</Row> | ||
|
||
<Row> | ||
<Key android:keyLabel="ф" android:keyEdgeFlags="left" android:horizontalGap="@dimen/keyboard_left_margin" /> | ||
<Key android:keyLabel="ы" /> | ||
<Key android:keyLabel="в" /> | ||
<Key android:keyLabel="а" /> | ||
<Key android:keyLabel="п" /> | ||
<Key android:keyLabel="р" /> | ||
<Key android:keyLabel="о" /> | ||
<Key android:keyLabel="л" /> | ||
<Key android:keyLabel="д" /> | ||
<Key android:keyLabel="ж" /> | ||
<Key android:keyLabel="э" /> | ||
<Key android:codes="-4" android:keyLabel="@string/keyboard_enter_label" android:keyWidth="@dimen/keyboard_key_enter_width" /> | ||
</Row> | ||
|
||
<Row> | ||
<Key android:codes="-1" android:keyIcon="@drawable/ic_icon_keyboard_shift_off" android:keyEdgeFlags="left"/> | ||
<Key android:keyLabel="я" /> | ||
<Key android:keyLabel="ч" /> | ||
<Key android:keyLabel="с" /> | ||
<Key android:keyLabel="м" /> | ||
<Key android:keyLabel="и" /> | ||
<Key android:keyLabel="т" /> | ||
<Key android:keyLabel="ь" /> | ||
<Key android:keyLabel="б" /> | ||
<Key android:keyLabel="ю" /> | ||
<Key android:keyLabel="ë" /> | ||
<Key android:keyLabel="/" /> | ||
<Key android:codes="-1" android:keyIcon="@drawable/ic_icon_keyboard_shift_off" /> | ||
</Row> | ||
|
||
<Row> | ||
<Key android:codes="-2" android:keyLabel="@string/keyboard_symbol" android:keyEdgeFlags="left"/> | ||
<Key android:codes="-12" android:keyIcon="@drawable/ic_icon_keyboard_globe" /> | ||
<Key android:codes="32" android:keyLabel="" android:keyWidth="@dimen/keyboard_key_space_width" android:isRepeatable="true"/> | ||
<Key android:codes="58" android:keyLabel=":"/> | ||
<Key android:codes="44" android:keyLabel=","/> | ||
<Key android:codes="46" android:keyLabel="."/> | ||
<Key android:codes="33" android:keyLabel="!" android:popupCharacters="!¡" android:popupKeyboard="@xml/keyboard_popup" /> | ||
<Key android:codes="63" android:keyLabel="\?" android:popupCharacters="\?¿" android:popupKeyboard="@xml/keyboard_popup" /> | ||
<Key android:codes="64" android:keyLabel="\@"/> | ||
</Row> | ||
</Keyboard> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:horizontalGap="@dimen/keyboard_horizontal_gap" | ||
android:verticalGap="@dimen/keyboard_vertical_gap" | ||
android:keyWidth="@dimen/keyboard_key_width" | ||
android:keyHeight="@dimen/keyboard_key_height"> | ||
<Row> | ||
<Key android:codes="8364" android:keyLabel="€" android:keyEdgeFlags="left"/> | ||
<Key android:codes="163" android:keyLabel="£"/> | ||
<Key android:codes="165" android:keyLabel="¥"/> | ||
<Key android:codes="36" android:keyLabel="$"/> | ||
<Key android:codes="199" android:keyLabel="ç"/> | ||
<Key android:codes="37" android:keyLabel="%"/> | ||
<Key android:codes="38" android:keyLabel="&"/> | ||
<Key android:codes="40" android:keyLabel="("/> | ||
<Key android:codes="41" android:keyLabel=")"/> | ||
<Key android:codes="61" android:keyLabel="="/> | ||
<Key android:codes="95" android:keyLabel="_"/> | ||
<Key android:keyOutputText="±" android:keyLabel="±"/> | ||
<Key android:codes="-5" android:keyIcon="@drawable/ic_icon_keyboard_backspace" android:isRepeatable="true" android:keyWidth="@dimen/keyboard_key_backspace_width"/> | ||
</Row> | ||
|
||
<Row> | ||
<Key android:codes="186" android:keyLabel="º" android:keyEdgeFlags="left" android:horizontalGap="@dimen/keyboard_left_margin"/> | ||
<Key android:codes="94" android:keyLabel="^" /> | ||
<Key android:codes="167" android:keyLabel="§" /> | ||
<Key android:codes="123" android:keyLabel="{"/> | ||
<Key android:codes="125" android:keyLabel="}"/> | ||
<Key android:codes="91" android:keyLabel="["/> | ||
<Key android:codes="93" android:keyLabel="]"/> | ||
<Key android:codes="124" android:keyLabel="|"/> | ||
<Key android:codes="39" android:keyLabel="'"/> | ||
<Key android:codes="59" android:keyLabel=";"/> | ||
<Key android:keyOutputText="º" android:keyLabel="º"/> | ||
<Key android:codes="-4" android:keyLabel="@string/keyboard_enter_label" android:keyWidth="@dimen/keyboard_key_enter_width" /> | ||
</Row> | ||
|
||
<Row> | ||
<Key android:codes="60" android:keyLabel="<" android:keyEdgeFlags="left"/> | ||
<Key android:codes="62" android:keyLabel=">"/> | ||
<Key android:codes="39" android:keyLabel="`"/> | ||
<Key android:codes="126" android:keyLabel="~"/> | ||
<Key android:codes="39" android:keyLabel="´"/> | ||
<Key android:codes="34" android:keyLabel="""/> | ||
<Key android:codes="92" android:keyLabel="\\" /> | ||
<Key android:codes="39" android:keyLabel="'"/> | ||
<Key android:keyOutputText="≠" android:keyLabel="≠" /> | ||
<Key android:codes="45" android:keyLabel="-" /> | ||
<Key android:codes="43" android:keyLabel="+" /> | ||
<Key android:codes="47" android:keyLabel="/" /> | ||
</Row> | ||
|
||
<Row> | ||
<Key android:codes="-2" android:keyLabel="@string/keyboard_mode_change" android:keyEdgeFlags="left" /> | ||
<Key android:codes="-12" android:keyIcon="@drawable/ic_icon_keyboard_globe" /> | ||
<Key android:codes="32" android:keyLabel="" android:keyWidth="@dimen/keyboard_key_german_space_width" android:isRepeatable="true"/> | ||
<Key android:codes="58" android:keyLabel=":"/> | ||
<Key android:codes="44" android:keyLabel=","/> | ||
<Key android:codes="46" android:keyLabel="."/> | ||
<Key android:codes="33" android:keyLabel="!" android:popupCharacters="!¡" android:popupKeyboard="@xml/keyboard_popup" /> | ||
<Key android:codes="63" android:keyLabel="\?" android:popupCharacters="\?¿" android:popupKeyboard="@xml/keyboard_popup" /> | ||
<Key android:codes="64" android:keyLabel="\@"/> | ||
</Row> | ||
</Keyboard> |