mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-25 18:15:49 +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.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
|
||||
|
@ -19,7 +19,7 @@
|
||||
android:text="@string/import_old_db_buttonlabel" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
android:id="@+id/textview_import_old_activitydata"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/button_import_old_activitydata"
|
||||
|
Loading…
Reference in New Issue
Block a user