From 93b165ee96ce9c60511dbce5a485f27b04ad5574 Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Mon, 29 Aug 2016 00:31:37 +0200 Subject: [PATCH] onboarding: use the text area not the button itself for displaying the info text ;) --- .../gadgetbridge/activities/OnboardingActivity.java | 7 +++++-- app/src/main/res/layout/activity_onboarding.xml | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/OnboardingActivity.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/OnboardingActivity.java index 0311dbc31..043c3741c 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/OnboardingActivity.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/OnboardingActivity.java @@ -5,6 +5,7 @@ import android.os.AsyncTask; import android.os.Bundle; import android.view.View; import android.widget.Button; +import android.widget.TextView; import android.widget.Toast; import nodomain.freeyourgadget.gadgetbridge.GBApplication; @@ -18,6 +19,7 @@ import nodomain.freeyourgadget.gadgetbridge.util.GB; public class OnboardingActivity extends GBActivity { private Button importOldActivityDataButton; + private TextView importOldActivityDataText; @Override protected void onCreate(Bundle savedInstanceState) { @@ -26,15 +28,16 @@ public class OnboardingActivity extends GBActivity { Bundle extras = getIntent().getExtras(); - GBDevice device = null; + GBDevice device; if (extras != null) { device = extras.getParcelable(GBDevice.EXTRA_DEVICE); } else { throw new IllegalArgumentException("Must provide a device when invoking this activity"); } + importOldActivityDataText = (TextView) findViewById(R.id.textview_import_old_activitydata); + importOldActivityDataText.setText(String.format(getString(R.string.import_old_db_information), device.getName())); importOldActivityDataButton = (Button) findViewById(R.id.button_import_old_activitydata); - importOldActivityDataButton.setText(String.format(getString(R.string.import_old_db_information), device.getName())); final GBDevice finalDevice = device; importOldActivityDataButton.setOnClickListener(new View.OnClickListener() { @Override diff --git a/app/src/main/res/layout/activity_onboarding.xml b/app/src/main/res/layout/activity_onboarding.xml index a68804e50..8a13c540d 100644 --- a/app/src/main/res/layout/activity_onboarding.xml +++ b/app/src/main/res/layout/activity_onboarding.xml @@ -19,7 +19,7 @@ android:text="@string/import_old_db_buttonlabel" />