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 218
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
66414be
commit d4cf2e9
Showing
8 changed files
with
214 additions
and
2 deletions.
There are no files selected for viewing
68 changes: 68 additions & 0 deletions
68
app/src/common/shared/org/mozilla/vrbrowser/ui/keyboards/SwedishKeyboard.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,68 @@ | ||
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 SwedishKeyboard extends BaseKeyboard { | ||
private CustomKeyboard mKeyboard; | ||
private CustomKeyboard mSymbolsKeyboard; | ||
private Locale mLocale; | ||
|
||
public SwedishKeyboard(Context aContext) { | ||
super(aContext); | ||
mLocale = new Locale("sv", "SE"); | ||
} | ||
|
||
@NonNull | ||
@Override | ||
public CustomKeyboard getAlphabeticKeyboard() { | ||
if (mKeyboard == null) { | ||
mKeyboard = new CustomKeyboard(mContext.getApplicationContext(), R.xml.keyboard_qwerty_swedish); | ||
} | ||
return mKeyboard; | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public CustomKeyboard getSymbolsKeyboard() { | ||
if (mSymbolsKeyboard == null) { | ||
mSymbolsKeyboard = new CustomKeyboard(mContext.getApplicationContext(), R.xml.keyboard_symbols_swedish); | ||
} | ||
return mSymbolsKeyboard; | ||
} | ||
|
||
@Override | ||
public float getAlphabeticKeyboardWidth() { | ||
return WidgetPlacement.dpDimension(mContext, R.dimen.keyboard_alphabetic_width_swedish); | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public CandidatesResult getCandidates(String aText) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public String getKeyboardTitle() { | ||
return StringUtils.getStringByLocale(mContext, R.string.settings_language_swedish, getLocale()); | ||
} | ||
|
||
@Override | ||
public Locale getLocale() { | ||
return mLocale; | ||
} | ||
|
||
@Override | ||
public String getSpaceKeyText(String aComposingText) { | ||
return StringUtils.getStringByLocale(mContext, R.string.settings_language_swedish, getLocale()); | ||
} | ||
} |
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
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,62 @@ | ||
<?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="113" android:keyLabel="q" android:keyEdgeFlags="left" android:popupKeyboard="@xml/keyboard_popup" android:popupCharacters="@string/keyboard_popup_q" android:horizontalGap="@dimen/keyboard_left_margin_half" /> | ||
<Key android:codes="119" android:keyLabel="w" android:popupCharacters="@string/keyboard_popup_w" android:popupKeyboard="@xml/keyboard_popup" /> | ||
<Key android:codes="101" android:keyLabel="e" android:popupCharacters="@string/keyboard_sv_SE_popup_e" android:popupKeyboard="@xml/keyboard_popup" /> | ||
<Key android:codes="114" android:keyLabel="r" android:popupCharacters="@string/keyboard_popup_r" android:popupKeyboard="@xml/keyboard_popup" /> | ||
<Key android:codes="116" android:keyLabel="t" android:popupCharacters="@string/keyboard_popup_t" android:popupKeyboard="@xml/keyboard_popup" /> | ||
<Key android:codes="121" android:keyLabel="y" android:popupCharacters="@string/keyboard_popup_y" android:popupKeyboard="@xml/keyboard_popup" /> | ||
<Key android:codes="117" android:keyLabel="u" android:popupCharacters="@string/keyboard_sv_SE_popup_u" android:popupKeyboard="@xml/keyboard_popup" /> | ||
<Key android:codes="105" android:keyLabel="i" android:popupCharacters="@string/keyboard_popup_i" android:popupKeyboard="@xml/keyboard_popup" /> | ||
<Key android:codes="111" android:keyLabel="o" android:popupCharacters="@string/keyboard_sv_SE_popup_o" android:popupKeyboard="@xml/keyboard_popup" /> | ||
<Key android:codes="112" android:keyLabel="p" android:popupCharacters="@string/keyboard_popup_p" android:popupKeyboard="@xml/keyboard_popup" /> | ||
<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="97" android:keyLabel="a" android:popupCharacters="@string/keyboard_sv_SE_popup_a" android:popupKeyboard="@xml/keyboard_popup" android:keyEdgeFlags="left" /> | ||
<Key android:codes="115" android:keyLabel="s" android:popupCharacters="@string/keyboard_popup_s" android:popupKeyboard="@xml/keyboard_popup" /> | ||
<Key android:codes="100" android:keyLabel="d" android:popupCharacters="@string/keyboard_popup_d" android:popupKeyboard="@xml/keyboard_popup"/> | ||
<Key android:codes="102" android:keyLabel="f" android:popupCharacters="@string/keyboard_popup_f" android:popupKeyboard="@xml/keyboard_popup" /> | ||
<Key android:codes="103" android:keyLabel="g" android:popupCharacters="@string/keyboard_popup_g" android:popupKeyboard="@xml/keyboard_popup"/> | ||
<Key android:codes="104" android:keyLabel="h" android:popupCharacters="@string/keyboard_popup_h" android:popupKeyboard="@xml/keyboard_popup"/> | ||
<Key android:codes="106" android:keyLabel="j" android:popupCharacters="@string/keyboard_popup_j" android:popupKeyboard="@xml/keyboard_popup"/> | ||
<Key android:codes="107" android:keyLabel="k" android:popupCharacters="@string/keyboard_popup_k" android:popupKeyboard="@xml/keyboard_popup"/> | ||
<Key android:codes="108" android:keyLabel="l" android:popupCharacters="@string/keyboard_popup_l" android:popupKeyboard="@xml/keyboard_popup" /> | ||
<Key android:keyOutputText="ö" android:keyLabel="ö" android:popupCharacters="@string/keyboard_sv_SE_popup_ö" android:popupKeyboard="@xml/keyboard_popup" /> | ||
<Key android:keyOutputText="ä" android:keyLabel="ä" android:popupCharacters="@string/keyboard_sv_SE_popup_ä" android:popupKeyboard="@xml/keyboard_popup"/> | ||
<Key android:codes="-4" android:keyLabel="@string/keyboard_enter_label" android:keyWidth="@dimen/keyboard_key_enter_width_small" /> | ||
</Row> | ||
|
||
<Row> | ||
<Key android:codes="-1" android:keyIcon="@drawable/ic_icon_keyboard_shift_off" android:keyEdgeFlags="left" android:horizontalGap="@dimen/keyboard_left_margin" /> | ||
<Key android:codes="122" android:keyLabel="z" android:popupCharacters="@string/keyboard_popup_z" android:popupKeyboard="@xml/keyboard_popup"/> | ||
<Key android:codes="120" android:keyLabel="x" android:popupCharacters="@string/keyboard_popup_x" android:popupKeyboard="@xml/keyboard_popup"/> | ||
<Key android:codes="99" android:keyLabel="c" android:popupCharacters="@string/keyboard_popup_c" android:popupKeyboard="@xml/keyboard_popup"/> | ||
<Key android:codes="118" android:keyLabel="v" android:popupCharacters="@string/keyboard_popup_v" android:popupKeyboard="@xml/keyboard_popup" /> | ||
<Key android:codes="98" android:keyLabel="b" android:popupCharacters="@string/keyboard_popup_b" android:popupKeyboard="@xml/keyboard_popup" /> | ||
<Key android:codes="110" android:keyLabel="n" android:popupCharacters="@string/keyboard_popup_n" android:popupKeyboard="@xml/keyboard_popup" /> | ||
<Key android:codes="109" android:keyLabel="m" android:popupCharacters="@string/keyboard_popup_m" android:popupKeyboard="@xml/keyboard_popup" /> | ||
<Key android:codes="45" android:keyLabel="-" /> | ||
<Key android:codes="43" android:keyLabel="+" /> | ||
<Key android:codes="47" android:keyLabel="/" /> | ||
<Key android:codes="-1" android:keyIcon="@drawable/ic_icon_keyboard_shift_off" /> | ||
</Row> | ||
|
||
<Row> | ||
<Key android:codes="-2" android:keyLabel="%&=" android:keyEdgeFlags="left" android:horizontalGap="@dimen/keyboard_left_margin"/> | ||
<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="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,62 @@ | ||
<?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" android:horizontalGap="@dimen/keyboard_left_margin_half"/> | ||
<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="61" 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"/> | ||
<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="59" android:keyLabel=";"/> | ||
<Key android:codes="58" android:keyLabel=":"/> | ||
<Key android:codes="34" android:keyLabel="•"/> | ||
<Key android:codes="-4" android:keyLabel="@string/keyboard_enter_label" android:keyWidth="@dimen/keyboard_key_enter_width_small" /> | ||
</Row> | ||
|
||
<Row> | ||
<Key android:codes="-1" android:keyIcon="@drawable/ic_icon_keyboard_shift_on" android:keyEdgeFlags="left" android:horizontalGap="@dimen/keyboard_left_margin"/> | ||
<Key android:codes="60" android:keyLabel="<"/> | ||
<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="58" android:keyLabel="\\"/> | ||
<Key android:codes="45" android:keyLabel="-" /> | ||
<Key android:codes="43" android:keyLabel="+" /> | ||
<Key android:codes="47" android:keyLabel="/" /> | ||
<Key android:codes="-1" android:keyIcon="@drawable/ic_icon_keyboard_shift_on" /> | ||
</Row> | ||
|
||
<Row> | ||
<Key android:codes="-2" android:keyLabel="@string/keyboard_mode_change" android:keyEdgeFlags="left" android:horizontalGap="@dimen/keyboard_left_margin" /> | ||
<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="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> |