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.
Keyboard updates: Polish, Danish UIS-6 and bug fixing (#1890)
* Keyboard updated Added Danish and Polish and updated the Spec to UIS-6_Keyboard_021 * Added Danish and Polish to display and voice languages * Fixed spacebar strings for polish and Danish * Updated Polski language string
- Loading branch information
1 parent
1bb6b98
commit e8a2dad
Showing
33 changed files
with
603 additions
and
50 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
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
68 changes: 68 additions & 0 deletions
68
app/src/common/shared/org/mozilla/vrbrowser/ui/keyboards/DanishKeyboard.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 DanishKeyboard extends BaseKeyboard { | ||
private CustomKeyboard mKeyboard; | ||
private CustomKeyboard mSymbolsKeyboard; | ||
private Locale mLocale; | ||
|
||
public DanishKeyboard(Context aContext) { | ||
super(aContext); | ||
mLocale = new Locale("da", "DK"); | ||
} | ||
|
||
@NonNull | ||
@Override | ||
public CustomKeyboard getAlphabeticKeyboard() { | ||
if (mKeyboard == null) { | ||
mKeyboard = new CustomKeyboard(mContext.getApplicationContext(), R.xml.keyboard_qwerty_danish); | ||
} | ||
return mKeyboard; | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public CustomKeyboard getSymbolsKeyboard() { | ||
if (mSymbolsKeyboard == null) { | ||
mSymbolsKeyboard = new CustomKeyboard(mContext.getApplicationContext(), R.xml.keyboard_symbols_danish); | ||
} | ||
return mSymbolsKeyboard; | ||
} | ||
|
||
@Override | ||
public float getAlphabeticKeyboardWidth() { | ||
return WidgetPlacement.dpDimension(mContext, R.dimen.keyboard_alphabetic_width_danish); | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public CandidatesResult getCandidates(String aText) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public String getKeyboardTitle() { | ||
return StringUtils.getStringByLocale(mContext, R.string.settings_language_danish, getLocale()); | ||
} | ||
|
||
@Override | ||
public Locale getLocale() { | ||
return mLocale; | ||
} | ||
|
||
@Override | ||
public String getSpaceKeyText(String aComposingText) { | ||
return StringUtils.getStringByLocale(mContext, R.string.settings_language_danish, 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
68 changes: 68 additions & 0 deletions
68
app/src/common/shared/org/mozilla/vrbrowser/ui/keyboards/PolishKeyboard.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 PolishKeyboard extends BaseKeyboard { | ||
private CustomKeyboard mKeyboard; | ||
private CustomKeyboard mSymbolsKeyboard; | ||
private Locale mLocale; | ||
|
||
public PolishKeyboard(Context aContext) { | ||
super(aContext); | ||
mLocale = new Locale("pl", "PL"); | ||
} | ||
|
||
@NonNull | ||
@Override | ||
public CustomKeyboard getAlphabeticKeyboard() { | ||
if (mKeyboard == null) { | ||
mKeyboard = new CustomKeyboard(mContext.getApplicationContext(), R.xml.keyboard_qwerty_polish); | ||
} | ||
return mKeyboard; | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public CustomKeyboard getSymbolsKeyboard() { | ||
if (mSymbolsKeyboard == null) { | ||
mSymbolsKeyboard = new CustomKeyboard(mContext.getApplicationContext(), R.xml.keyboard_symbols_polish); | ||
} | ||
return mSymbolsKeyboard; | ||
} | ||
|
||
@Override | ||
public float getAlphabeticKeyboardWidth() { | ||
return WidgetPlacement.dpDimension(mContext, R.dimen.keyboard_alphabetic_width); | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public CandidatesResult getCandidates(String aText) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public String getKeyboardTitle() { | ||
return StringUtils.getStringByLocale(mContext, R.string.settings_language_polish, getLocale()); | ||
} | ||
|
||
@Override | ||
public Locale getLocale() { | ||
return mLocale; | ||
} | ||
|
||
@Override | ||
public String getSpaceKeyText(String aComposingText) { | ||
return StringUtils.getStringByLocale(mContext, R.string.settings_language_polish, 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
Oops, something went wrong.