SWInfotext
This commit is contained in:
parent
61a7d69a65
commit
ed43eddc83
|
@ -42,7 +42,11 @@ public class SWDefinition {
|
||||||
|
|
||||||
SWDefinition() {
|
SWDefinition() {
|
||||||
// List all the screens here
|
// List all the screens here
|
||||||
add(new SWScreen(R.string.language)
|
add(new SWScreen(R.string.nav_setupwizard)
|
||||||
|
.add(new SWInfotext()
|
||||||
|
.label(R.string.welcometosetupwizard) )
|
||||||
|
)
|
||||||
|
.add(new SWScreen(R.string.language)
|
||||||
.skippable(false)
|
.skippable(false)
|
||||||
.add(new SWRadioButton()
|
.add(new SWRadioButton()
|
||||||
.option(R.array.languagesArray, R.array.languagesValues)
|
.option(R.array.languagesArray, R.array.languagesValues)
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
package info.nightscout.androidaps.startupwizard;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.text.Editable;
|
||||||
|
import android.text.InputType;
|
||||||
|
import android.text.TextWatcher;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
|
||||||
|
public class SWInfotext extends SWItem {
|
||||||
|
private static Logger log = LoggerFactory.getLogger(SWInfotext.class);
|
||||||
|
|
||||||
|
public SWInfotext() {
|
||||||
|
super(Type.TEXT);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void generateDialog(View view, LinearLayout layout) {
|
||||||
|
Context context = view.getContext();
|
||||||
|
|
||||||
|
TextView l = new TextView(context);
|
||||||
|
l.setId(view.generateViewId());
|
||||||
|
l.setText(label);
|
||||||
|
layout.addView(l);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -16,6 +16,7 @@ public class SWItem {
|
||||||
|
|
||||||
enum Type {
|
enum Type {
|
||||||
NONE,
|
NONE,
|
||||||
|
TEXT,
|
||||||
URL,
|
URL,
|
||||||
STRING,
|
STRING,
|
||||||
NUMBER,
|
NUMBER,
|
||||||
|
|
|
@ -88,7 +88,7 @@ public class SetupWizardActivity extends AppCompatActivity {
|
||||||
|
|
||||||
private void updateButtons() {
|
private void updateButtons() {
|
||||||
SWScreen currentScreen = screens.get(currentWizardPage);
|
SWScreen currentScreen = screens.get(currentWizardPage);
|
||||||
if (currentScreen.validator.isValid() || currentScreen.skippable) {
|
if (currentScreen.validator == null || currentScreen.validator.isValid() || currentScreen.skippable) {
|
||||||
if (currentWizardPage == screens.size() - 1) {
|
if (currentWizardPage == screens.size() - 1) {
|
||||||
findViewById(R.id.finish_button).setVisibility(View.VISIBLE);
|
findViewById(R.id.finish_button).setVisibility(View.VISIBLE);
|
||||||
findViewById(R.id.next_button).setVisibility(View.GONE);
|
findViewById(R.id.next_button).setVisibility(View.GONE);
|
||||||
|
|
|
@ -1060,5 +1060,6 @@
|
||||||
|
|
||||||
<string name="dummy_content">DUMMY\nCONTENT</string>
|
<string name="dummy_content">DUMMY\nCONTENT</string>
|
||||||
<string name="enable_nsclient">Enable NSClient</string>
|
<string name="enable_nsclient">Enable NSClient</string>
|
||||||
|
<string name="welcometosetupwizard">Welcome to setup wizard. It will guide you through the setup process</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in a new issue