Keresés

Hirdetés

Új hozzászólás Aktív témák

  • lanszelot

    addikt

    válasz rgeorge #3048 üzenetére

    Én nem látok semmilyen problémát a dohányzásnál:

    -------activity_main.xml részben-------

    <TextView
    android:layout_width="200dp"
    android:layout_height="wrap_content"
    android:layout_weight="1"
    android:text="@string/got_depression"
    android:textAppearance="?android:attr/textAppearanceMedium" />

    <CheckBox
    android:id="@+id/depressionCheckBox"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" />

    <TextView
    android:layout_width="200dp"
    android:layout_height="wrap_content"
    android:layout_weight="1"
    android:text="@string/got_smoking"
    android:textAppearance="?android:attr/textAppearanceMedium" />

    <CheckBox
    android:id="@+id/smokingCheckBox"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" />

    <TextView
    android:layout_width="200dp"
    android:layout_height="wrap_content"
    android:layout_weight="1"
    android:text="@string/got_alcohol"
    android:textAppearance="?android:attr/textAppearanceMedium" />

    <CheckBox
    android:id="@+id/alcoholCheckBox"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" />

    --------strings.xml részben----

    <string name="got_depression">Depression?</string>
    <string name="got_smoking">Smoking?</string>
    <string name="got_alcohol">Alcohol?</string>

    --------CustomSQLiteOpenHelper részben--------

    private static final String KEY_GOT_DEPRESSION = "gotDepression";
    private static final String KEY_GOT_SMOKE = "gotSmoke";
    private static final String KEY_GOT_ALCOHOL = "gotAlcohol";

    "gotDepression BOOLEAN," +
    "gotSmoking BOOLEAN," +
    "gotAlcohol BOOLEAN," +

    values.put(KEY_GOT_DEPRESSION, data.gotDepression);
    values.put(KEY_GOT_SMOKE, data.gotSmoking);
    values.put(KEY_GOT_ALCOHOL, data.gotAlcohol);

    ----Data részben------

    public boolean gotDepression;
    public boolean gotSmoking;
    public boolean gotAlcohol;

    , boolean gotDepression, boolean gotSmoking, boolean gotAlcohol,

    this.gotDepression = gotDepression;
    this.gotSmoking = gotSmoking;
    this.gotAlcohol = gotAlcohol;

    ----MainActivity részben------

    @InjectView(R.id.depressionCheckBox)
    CheckBox depressionCheckBox;

    @InjectView(R.id.smokingCheckBox)
    CheckBox smokingCheckBox;

    @InjectView(R.id.alcoholCheckBox)
    CheckBox alcoholCheckBox;

    , depressionCheckBox.isChecked(), smokingCheckBox.isChecked(), alcoholCheckBox.isChecked(),

    depressionCheckBox.setChecked(false);
    smokingCheckBox.setChecked(false);
    alcoholCheckBox.setChecked(false);

    ----Nem kötelező kitölteni. Így nincs több.

    Hozzá vettem az előtte és utána lévőt, hogy jól látható legyen.
    Ti láttok vmit?

Új hozzászólás Aktív témák