Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Rebase updates
Browse files Browse the repository at this point in the history
  • Loading branch information
keianhzo committed Oct 23, 2019
1 parent 915dea2 commit 7b8685c
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.graphics.Point;
import android.graphics.drawable.Drawable;
import android.text.Html;
import android.util.AttributeSet;
import android.util.Log;
Expand All @@ -29,7 +30,6 @@
import org.mozilla.vrbrowser.R;
import org.mozilla.vrbrowser.VRBrowserApplication;
import org.mozilla.vrbrowser.audio.AudioEngine;
import org.mozilla.vrbrowser.browser.Services;
import org.mozilla.vrbrowser.browser.Accounts;
import org.mozilla.vrbrowser.browser.engine.SessionStack;
import org.mozilla.vrbrowser.browser.engine.SessionStore;
Expand Down Expand Up @@ -157,7 +157,7 @@ private void initialize() {
PackageInfo pInfo = getContext().getPackageManager().getPackageInfo(getContext().getPackageName(), 0);
String app_name = getResources().getString(R.string.app_name);
String[] app_name_parts = app_name.split(" ");
versionText.setText(Html.fromHtml("<b>" + app_name_parts[0] + "</b>" +
mBinding.versionText.setText(Html.fromHtml("<b>" + app_name_parts[0] + "</b>" +
" " + app_name_parts[1] + " " +
" <b>" + pInfo.versionName + "</b>",
Html.FROM_HTML_MODE_LEGACY));
Expand All @@ -168,7 +168,6 @@ private void initialize() {

mBinding.buildText.setText(StringUtils.versionCodeToDate(getContext(), BuildConfig.VERSION_CODE));

TextView settingsMasthead = findViewById(R.id.buildText);
final GestureDetector gd = new GestureDetector(getContext(), new VersionGestureListener());
mBinding.settingsMasthead.setOnTouchListener((view, motionEvent) -> {
if (gd.onTouchEvent(motionEvent)) {
Expand All @@ -177,14 +176,12 @@ private void initialize() {
return view.performClick();
});

TextView surveyLink = findViewById(R.id.surveyLink);
surveyLink.setOnClickListener(v -> {
mBinding.surveyLink.setOnClickListener(v -> {
mWidgetManager.getFocusedWindow().getSessionStack().newSessionWithUrl(getResources().getString(R.string.survey_link));
exitWholeSettings();
});

HoneycombButton reportButton = findViewById(R.id.helpButton);
reportButton.setOnClickListener(view -> {
mBinding.helpButton.setOnClickListener(view -> {
if (mAudio != null) {
mAudio.playSound(AudioEngine.Sound.CLICK);
}
Expand Down

0 comments on commit 7b8685c

Please sign in to comment.