Added a disabled button and a second text edit in View / Controls
Change-Id: I2e0e9b480609289fa7f9546614af51d4ce293a9c
This commit is contained in:
@@ -1581,7 +1581,7 @@
|
||||
</activity>
|
||||
|
||||
<activity android:name=".view.Controls2"
|
||||
android:label="Views/Controls/2. Default Theme"
|
||||
android:label="Views/Controls/2. Dark Theme"
|
||||
android:theme="@android:style/Theme">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
@@ -23,23 +23,46 @@
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<Button android:id="@+id/button"
|
||||
android:text="@string/controls_1_save"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
<Button android:id="@+id/button_disabled"
|
||||
android:text="@string/controls_1_save"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<EditText android:id="@+id/edit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
<EditText android:id="@+id/edit2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<CheckBox android:id="@+id/check1"
|
||||
android:paddingBottom="24sp"
|
||||
android:paddingTop="24sp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/controls_1_checkbox_1" />
|
||||
|
||||
|
||||
<CheckBox android:id="@+id/check2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -22,8 +22,9 @@ import com.example.android.apis.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.Spinner;
|
||||
|
||||
|
||||
/**
|
||||
@@ -37,6 +38,9 @@ public class Controls1 extends Activity {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.controls_1);
|
||||
|
||||
Button disabledButton = (Button) findViewById(R.id.button_disabled);
|
||||
disabledButton.setEnabled(false);
|
||||
|
||||
Spinner s1 = (Spinner) findViewById(R.id.spinner1);
|
||||
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
|
||||
android.R.layout.simple_spinner_item, mStrings);
|
||||
|
||||
Reference in New Issue
Block a user