Panduan Praktis Pembuatan Aplikasi Android/Widget
Tampilan
- Widget disusun di berkas /res/layout/main.xml
- Perbandingan widget Android dan kontrol Gambas:
Widget Android Widget Turunan Android Kontrol Gambas ActionBar ToolBar Button Button ToggleButton ToggleButton CheckBox CheckBox RadioGroup RadioButton.Parent RadioButton RadioButton ListView ListView ExpandableListView ReversibleExpandableListView TreeView Spinner ComboBox View Panel TextView ReversibleTextView Label AutoCompleteTextView <EditText [android:inputType="text"]
android:singleLine="true" />
TextBox <EditText [android:inputType="text"]
[android:singleLine="false"] />
TextEdit <EditText android:inputType="number"
android:singleLine="true" />
ValueBox SearchView ImageView ReversibleImageView PictureBox Gallery ImageSwitcher ScrollView ReversibleScrollView ScrollView GridView GridView WebView WebView ProgressBar ReversibleProgressBar ProgressBar SeekBar ReversibleSeekBar Slider ScrollBar
AnalogClock DigitalClock RatingBar TimePicker DatePicker DateChooser TabHost TabWidget
TabStrip SlidingDrawer Navigation Drawer
SidePanel
Atribut
[sunting]- Perbandingan atribut widget Android dan kontrol Gambas:
Atribut Widget Android Atribut Kontrol Gambas android:id kontrol.Name android:layout_height kontrol.Height android:layout_width kontrol.Width android:layout_height="wrap_content" android:layout_width="wrap_content"
kontrol.Wrap = True android:layout_height="fill_parent" android:layout_width="fill_parent"
android:layout_weight="1"
kontrol.Expand = True android:layout_marginLeft android:layout_x
kontrol.X android:layout_marginTop android:layout_y
kontrol.Y android:maxLength kontrol.MaxLength android:entries kontrol.List android:text android:prompt
kontrol.Text android:src kontrol.Picture android:visibility="visible" view.setVisibility([0|View.Visible]);
kontrol.Visible = True android:visibility="invisible" view.setVisibility([4|View.INVISIBLE]);
android:visibility="gone" view.setVisibility([5|View.GONE]);
kontrol.Visible = False