mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-03 17:02:13 +01:00
onboarding: use the text area not the button itself for displaying the info text ;)
This commit is contained in:
parent
bcb07ccacd
commit
93b165ee96
@ -5,6 +5,7 @@ import android.os.AsyncTask;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
||||||
@ -18,6 +19,7 @@ import nodomain.freeyourgadget.gadgetbridge.util.GB;
|
|||||||
public class OnboardingActivity extends GBActivity {
|
public class OnboardingActivity extends GBActivity {
|
||||||
|
|
||||||
private Button importOldActivityDataButton;
|
private Button importOldActivityDataButton;
|
||||||
|
private TextView importOldActivityDataText;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
@ -26,15 +28,16 @@ public class OnboardingActivity extends GBActivity {
|
|||||||
|
|
||||||
Bundle extras = getIntent().getExtras();
|
Bundle extras = getIntent().getExtras();
|
||||||
|
|
||||||
GBDevice device = null;
|
GBDevice device;
|
||||||
if (extras != null) {
|
if (extras != null) {
|
||||||
device = extras.getParcelable(GBDevice.EXTRA_DEVICE);
|
device = extras.getParcelable(GBDevice.EXTRA_DEVICE);
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("Must provide a device when invoking this activity");
|
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 = (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;
|
final GBDevice finalDevice = device;
|
||||||
importOldActivityDataButton.setOnClickListener(new View.OnClickListener() {
|
importOldActivityDataButton.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
android:text="@string/import_old_db_buttonlabel" />
|
android:text="@string/import_old_db_buttonlabel" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textView2"
|
android:id="@+id/textview_import_old_activitydata"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_above="@+id/button_import_old_activitydata"
|
android:layout_above="@+id/button_import_old_activitydata"
|
||||||
|
Loading…
Reference in New Issue
Block a user