|
android: layout_below="@+id/textView"
|
bet | 7/8 | Sana | 16.01.2024 | Hajmi | 318,74 Kb. | | #138880 |
Bog'liq Diyorbek kurs ishiandroid: layout_below="@+id/textView"
android:layout_alignLeft="@+id/buttonCreateTempFile"
android:layout_alignStart="@+id/ buttonCreateTempFile"
android:clickable="true"/>
<tugma
android:layout_width="wrap_content"
android:layout_height="wrap_content" ;
android:text="CreateTempFile"
android:id="@+id/buttonCreateTempFile"
android: layout_below="@+id/buttonCreateFile"
android:layout_toRightOf="@+id/textView"
android:layout_toEndOf="@+id/ textView"
android:layout_marginTop="41dp"/>
RelativeLayout>
Keyinchalik, fayllarni yaratish uchun klik hodisasi ishlov beruvchilarini bog'laymiz.
MainActivity.java da ikkita usul stubini yarating
publicvoidsendFileMessage(Viewview){
//Dosomethinginresponsetobuttonclick
}
publicvoidsendCacheFileMessage(Ko‘rish){
//Dosomethinginresponsetobuttonclick
}
Keyinchalik, tartib faylida bosish hodisalarini bog'laymiz.
<tugma
android_layout_width="o'rash_kontent"
android_layout_height="o'rash_kontent"
android_text="Fayl yaratish"
android_id="@+id/buttonCreateFile"
android_layout_below="@+id/textView"
android_layout_alignLeft="@+id/buttonCreateTempFile"
android_layout_alignStart="@+id/buttonCreateTempFile"
android_clickable="to'g'ri"
android:onClick="sendFileMessage"/>
<tugma
android_layout_width="o'rash_kontent"
android_layout_height="o'rash_kontent"
android_text="TempFile yaratish"
android_id="@+id/buttonCreateTempFile"
android_layout_below="@+id/buttonCreateFile"
android_layout_toRightOf="@+id/textView"
android_layout_toEndOf="@+id/textView"
|
| |