android: layout_below="@+id/textView"




Download 318,74 Kb.
bet7/8
Sana16.01.2024
Hajmi318,74 Kb.
#138880
1   2   3   4   5   6   7   8
Bog'liq
Diyorbek kurs ishi

android: 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"

Download 318,74 Kb.
1   2   3   4   5   6   7   8




Download 318,74 Kb.

Bosh sahifa
Aloqalar

    Bosh sahifa



android: layout_below="@+id/textView"

Download 318,74 Kb.