Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for display/voice/content languages (#1474)
* Add support for display/voice/content languages * Fixed crash when running using an applicationId suffix
- Loading branch information
Showing
56 changed files
with
2,034 additions
and
155 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
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
20 changes: 20 additions & 0 deletions
20
app/src/common/shared/org/mozilla/vrbrowser/ui/adapters/BindingAdapters.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 |
---|---|---|
@@ -1,13 +1,33 @@ | ||
package org.mozilla.vrbrowser.ui.adapters; | ||
|
||
import android.graphics.Typeface; | ||
import android.view.View; | ||
import android.widget.TextView; | ||
|
||
import androidx.databinding.BindingAdapter; | ||
|
||
|
||
public class BindingAdapters { | ||
|
||
@BindingAdapter("visibleGone") | ||
public static void showHide(View view, boolean show) { | ||
view.setVisibility(show ? View.VISIBLE : View.GONE); | ||
} | ||
|
||
@BindingAdapter("visibleInvisible") | ||
public static void showInvisible(View view, boolean show) { | ||
view.setVisibility(show ? View.VISIBLE : View.INVISIBLE); | ||
} | ||
|
||
@BindingAdapter("typeface") | ||
public static void setTypeface(TextView v, String style) { | ||
switch (style) { | ||
case "bold": | ||
v.setTypeface(null, Typeface.BOLD); | ||
break; | ||
default: | ||
v.setTypeface(null, Typeface.NORMAL); | ||
break; | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
app/src/common/shared/org/mozilla/vrbrowser/ui/adapters/Language.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,25 @@ | ||
package org.mozilla.vrbrowser.ui.adapters; | ||
|
||
public class Language { | ||
|
||
public Language(String id, String name) { | ||
this.id = id; | ||
this.name = name; | ||
} | ||
|
||
private String name; | ||
private String id; | ||
|
||
public String getId() { | ||
return this.id; | ||
} | ||
|
||
public String getName() { | ||
return this.name; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return id.hashCode(); | ||
} | ||
} |
Oops, something went wrong.