Методические указания по выполнению лабораторных работ по дисциплине «программирование мобильных устройств»
жүктеу/скачать
3,51 Mb.
Pdf көрінісі
бет
29/30
Дата
20.10.2023
өлшемі
3,51 Mb.
#186972
түрі
Методические указания
1
...
22
23
24
25
26
27
28
29
30
Байланысты:
15.-Metod LR Programmirovanie-mobil nyh-ustroistv 09.03.02 2021
1-Зертхана
,
Linux3lab (1)
Бұл бет үшін навигация:
EditText android:id="@+id/etEmail" android:hint="Email" android:layout_width="match_parent" android:layout_height="wrap_content"
_Button android:id="@+id/btnAdd" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Add" > Button
_Button android:id="@+id/btnClear" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Clear" > Button
Приложение
Е
Пример приложения «Телефонная книга»
Листинг activity_main.xml
<
EditText
android:id="@+id/etName"
android:hint="Name"
android:layout_width="match_parent" android:layout_height="wrap_content"
>
EditText
>
<
EditText android:id="@+id/etEmail" android:hint="Email"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
EditText
>
<
LinearLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<
Button android:id="@+id/btnAdd"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="Add"
>
Button
>
<
Button android:id="@+id/btnRead"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="Read"
>
Button
>
<
Button android:id="@+id/btnClear"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="Clear"
>
Button
>
87
Листинг
MainActivity.java
package
ru.omgtu.myapplication;
import
android.database.Cursor;
import
android.database.sqlite.SQLiteDatabase;
import
android.os.Bundle;
import
android.support.v7.app.AppCompatActivity;
import
android.util.Log;
import
android.view.View;
import
android.widget.Button;
import
android.widget.EditText;
жүктеу/скачать
3,51 Mb.
Достарыңызбен бөлісу:
1
...
22
23
24
25
26
27
28
29
30
©engime.org 2024
әкімшілігінің қараңыз
Басты бет