Laboratoriya ishi №16 Mavzu: Voqealar (intents)


android:layout_alignStart="@+id/userlabel"


Download 444.29 Kb.
Pdf ko'rish
bet3/15
Sana14.12.2022
Hajmi444.29 Kb.
#1004913
1   2   3   4   5   6   7   8   9   ...   15
Bog'liq
Abduraximov Elbek 612 19 guruh, 4 deadline

android:layout_alignStart="@+id/userlabel" 
android:layout_below="@+id/userlabel" 
android:ems="10" 
android:inputType="textPersonName" 
android:text="the name" 
android:textSize="36sp" 
/> 
 
 

android:id="@+id/button_learn" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:layout_alignStart="@+id/username" 
android:layout_below="@+id/username" 
android:layout_marginTop="45dp" 
android:onClick="onClick" 
android:text="Practice" 
android:textSize="60dp" 
/> 
 
 
 
 
 
 
 
 
 
 
 


 
Laboratoriya ishi №17 
Mavzu: Fragmentlardan foydalanish 
Android Studioda fragment sinfini yaratish: 
Fragment yaratish uchun birinchi navbatda biz Fragment sinfini kengaytiramiz
so'ngra Faollik sinfidagi kabi ilova mantig'ini kiritish uchun asosiy hayot aylanish 
usullarini bekor qilamiz. Fragment yaratishda tartibni aniqlash va Fragmentni ishga 
tushirish uchun onCreateView() qayta qo'ng'iroq qilishimiz kerak. 
import android.os.Bundle; 
import android.support.v4.app.Fragment; 
import android.view.LayoutInflater; 
import android.view.ViewGroup; 
 
public class FirstFragment extends Fragment { 
@Override 
public View onCreateView(LayoutInflater inflater, ViewGroup container, 
Bundle savedInstanceState) { 
// Inflate the layout for this fragment 

Download 444.29 Kb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9   ...   15




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling