Yangi formatda davom etish uchun: https://uzfor.net/63490-android-ilovalar-tuzishni-organamiz.html?id=34
Android ilovalar tuzishni o'rganamiz
Mavzu fayllari (16)
Xabarlar
Hammaga salom!
Mavzu ochishimdan maqsad android ilovalar tuzishga barchamizda qiziqish bor.Hamma bu qanday tuzilishiga qiziqqan albatta.Men sizlarga shu borada batafsil malumot va namunalar berib otaman.
Xudo xohlasa bu mavzuga har haftada 2 ta maqola yoziladi.Tushunmagan narsalaringiz bolsa bemalol sorang.
Demak biz boshladik.Bu ilovalar tuzish uchun nimalar zarur?
Sizga kerak boladigan narsa bu PC yoki Android smartfonning ozi.
1) PCda Android Studio, Intellij IDEA yoki Eclipseda tuzish mumkin.
2) Androidda eng yaxshisi AIDE.Bundan yaxshisiniyam yomoniniyam topolmaysiz ;)
1.1) AIDE 2.6.7 Premium yuklaymiz va ornatamiz(Premiumni spaces yoki 4pda saytidan yuklab oling)
1.2) AIDEga kiramiz, unda ekranda 4 xil bolim chiqadi, bizga keragi bu "For Experts" bolimi, shunga kiramiz.
1.3) MyApp(buni xolagancha yozish mumkin)
com.mycompany.myapp(bu ham xohishga qarab, holasangiz saytingizni domeniga qoying.Masalan, uz.uzfor.app)
********
Hozir esa saytning oddiy clientini tuzamiz.
1.4) OK bosganimizdan keyin avtomatik main.xmlga otamiz.U yerdagi barcha kodlarni ochiring(xml fayllari oson) va orniga buni yozing:
*- nima bu degan savol paydo boldimi?
Bu main.xml fayli biz unga webviewni uladik.
android:layout_width- bu ekran kengligi
android:layout_height- bu ekran boyi.
Endi AIDEda yon menyuga kiramiz va u yerdan src/com/mycompany/myapp papkadagi MainActivity.java faylga bosamiz.Barcha kodlarni tozalaymiz.Va buni yozamiz.
AndroidManifest.xmlga internet permissiyasini ulaymiz.
Yana AIDEda menyuni bosib u yerdan AndroidManifest.xml topamiz va tozalab, keyin unga quyidagicha yozamiz.
*- bu yerda ozingiz ham sezdingiz, permissiya bu yerda faqat inetga ulandi:
<uses-permission
android:name="android.permission.INTERNET" />
*- endi MainActivity.javani AndroidManifest.xmlga ulaymiz:
<activity
android:label="@string/app_name"
android:name=".MainActivity" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
*- koryapmizki bu juda oson.bu yer .MainActivity- bu avval tuzgan MainActivity.java faylidir.
*- @string/app_name- bu res/values/strings.xml fayliga yozilgan boladi.Yozilishi oson:
<string name="app_name">Hello</string>
Tushundingiz deb oylayman.Yani <qator nomi="app_name">Hello</qatorni yopdik>
*- @drawable/ic_launcher- bu res/drawable papkadagi surat fayllari.Bu yerda ic_launcher bu ic_launcher.pngdir, yani dasturni ikonkasi.
*- action haqida gapirsak, bular ushbu dasturni ekranda korinishini taminlash uchun:
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
android:minSdkVersion="8"
- bu eng past android versiyasini korsatish, bu yerda u Android 1.6 korsatilgan.
Demak tushundingizmi @drawable- res papkadagi fayllar, @string- strings.xml faylidagi sozlar.
**********
Ertaga yana yozaman.Yangi funksiyalarni har kun qoshib organib boramiz.
Mavzu ochishimdan maqsad android ilovalar tuzishga barchamizda qiziqish bor.Hamma bu qanday tuzilishiga qiziqqan albatta.Men sizlarga shu borada batafsil malumot va namunalar berib otaman.
Xudo xohlasa bu mavzuga har haftada 2 ta maqola yoziladi.Tushunmagan narsalaringiz bolsa bemalol sorang.
Demak biz boshladik.Bu ilovalar tuzish uchun nimalar zarur?
Sizga kerak boladigan narsa bu PC yoki Android smartfonning ozi.
1) PCda Android Studio, Intellij IDEA yoki Eclipseda tuzish mumkin.
2) Androidda eng yaxshisi AIDE.Bundan yaxshisiniyam yomoniniyam topolmaysiz ;)
1.1) AIDE 2.6.7 Premium yuklaymiz va ornatamiz(Premiumni spaces yoki 4pda saytidan yuklab oling)
1.2) AIDEga kiramiz, unda ekranda 4 xil bolim chiqadi, bizga keragi bu "For Experts" bolimi, shunga kiramiz.
1.3) MyApp(buni xolagancha yozish mumkin)
com.mycompany.myapp(bu ham xohishga qarab, holasangiz saytingizni domeniga qoying.Masalan, uz.uzfor.app)
********
Hozir esa saytning oddiy clientini tuzamiz.
1.4) OK bosganimizdan keyin avtomatik main.xmlga otamiz.U yerdagi barcha kodlarni ochiring(xml fayllari oson) va orniga buni yozing:
<?xml version="1.0" encoding="utf-8"?> <WebView android:id="@ id/webView" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"/>
*- nima bu degan savol paydo boldimi?
Bu main.xml fayli biz unga webviewni uladik.
android:layout_width- bu ekran kengligi
android:layout_height- bu ekran boyi.
Endi AIDEda yon menyuga kiramiz va u yerdan src/com/mycompany/myapp papkadagi MainActivity.java faylga bosamiz.Barcha kodlarni tozalaymiz.Va buni yozamiz.
package com.mycompany.myapp; //com.mycompany.myapp bu paket nomi import android.app.*; import android.os.*; import android.webkit.*; //import orqali kerakli library va komponentlarni ulaymiz. public class MainActivity extends Activity { //MainActivityni Activity sifatida korsatdik. private WebView mWebView; //WebViewni mWebView sifatida yaratdik. public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); //R.java faylga layout.mainni uladik mWebView = (WebView) findViewById(R.id.webView); // JavaScriptni webviewga uladik va uni yoqdik true orqali mWebView.getSettings().setJavaScriptEnabled(true); // yuklanish uchun sahifani korsatdik. mWebView.setWebViewClient(new MyWebViewClient()); // havola mWebView.loadUrl("http://uzfor.uz"); } private class MyWebViewClient extends WebViewClient { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { view.loadUrl(url); //sahifani yukladik. return true; } } @Override public void onBackPressed() { if(mWebView.canGoBack()) { mWebView.goBack(); //Nazad knopka bosilganda avvalgi sahifaga qaytish yoqildi, agar sahifa eng birinchisiga qaytsa yana bosganimizda dasturdan chiqadigan qildik. } else { super.onBackPressed(); } } }
AndroidManifest.xmlga internet permissiyasini ulaymiz.
Yana AIDEda menyuni bosib u yerdan AndroidManifest.xml topamiz va tozalab, keyin unga quyidagicha yozamiz.
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.mycompany.myapp" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="11" /> <uses-permission android:name="android.permission.INTERNET" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name"> <activity android:label="@string/app_name" android:name=".MainActivity" > <intent-filter > <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
*- bu yerda ozingiz ham sezdingiz, permissiya bu yerda faqat inetga ulandi:
<uses-permission
android:name="android.permission.INTERNET" />
*- endi MainActivity.javani AndroidManifest.xmlga ulaymiz:
<activity
android:label="@string/app_name"
android:name=".MainActivity" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
*- koryapmizki bu juda oson.bu yer .MainActivity- bu avval tuzgan MainActivity.java faylidir.
*- @string/app_name- bu res/values/strings.xml fayliga yozilgan boladi.Yozilishi oson:
<string name="app_name">Hello</string>
Tushundingiz deb oylayman.Yani <qator nomi="app_name">Hello</qatorni yopdik>
*- @drawable/ic_launcher- bu res/drawable papkadagi surat fayllari.Bu yerda ic_launcher bu ic_launcher.pngdir, yani dasturni ikonkasi.
*- action haqida gapirsak, bular ushbu dasturni ekranda korinishini taminlash uchun:
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
android:minSdkVersion="8"
- bu eng past android versiyasini korsatish, bu yerda u Android 1.6 korsatilgan.
Demak tushundingizmi @drawable- res papkadagi fayllar, @string- strings.xml faylidagi sozlar.
**********
Ertaga yana yozaman.Yangi funksiyalarni har kun qoshib organib boramiz.
Biriktirilgan fayllar [3]:
— test.apk (251.68 KB) (167 ↴)
— test.zip (579.24 KB) (151 ↴)
— screen_20190603_0513.jpg (30.52 KB) (190 ↴)
— test.apk (251.68 KB) (167 ↴)
— test.zip (579.24 KB) (151 ↴)
— screen_20190603_0513.jpg (30.52 KB) (190 ↴)
Hammaga salom!
Demak davom etamiz.#1 postdagi kamchiliklarni togirlab yozaman.
Quyida bizga kerakli savollar:
1) Android nima ozi?
2) .apk va uning tarkibi qanday?
3) AndroidManifest.xml?
4) Librarylar nega va qanday ulayman?
5) Google xml batafsil?
Android- bu mobil, smartwatch, tablet, android auto va tvlar uchun operatsion sistema.Androidga Palo Alto, Californiada 2003 yilda Andy Rubin, Rich Miner, Nick Sears va Chris White tomonidan asos solingan.2005 yil iyul oyida Google bu kompaniyani 50 mln $ ga sotib oldi, 2003 yilda Android Inc. bahosi atiga 10,000$ pul ortidan rivojlangandi.
Android Versiyalari:
1) Android 1.0,2008(nomsiz prosta android, kopchilik android a dan boshlangani uchun unga nom qoyilmagan deydi)
2) Android 1.5,2009(Cupcake)
3) Android 1.6,2009(Donut)
4) Android 2.0-2.1,2009(Eclair)
5) Android 2.2,2010(Froyo)
6) Android 2.3,2011(Gingerbread)
7) Android 3.0,2011(HoneyComb)
8) Android 4.0,2011(ICS)
9) Android 4.1-4.3,2012(Jelly Bean)
10) Android 4.4,2013(Kitkat)
11) Android 5.0-5.1,2014(Lollipop)
12) Android 6.0,2015(Marshmallow)
13) Android 7.0-7.1,2016(Nougat)
14) Android 8.0-8.1,2017(Oreo)
15) Android 9,(Android P)
Android bu Linux 2.6 kernel moslashtirilib yaratilgan osdir, xuddi gnome, ubuntu, tizen va hokazo.
***********
Android .apk tuzilmasi va android arxitekturasi.
Android arxitekturasi: SYSTEM APPS=>E-MAIL,CAMERA,DIALER,CALENDAR
|=JAVA API FRAMEWORK[color=violet[
|=NATIVE C/C++=>WEBKIT=>OPENGL ES[/color]
|=ANDROID RUNTIME=>DALVIK VM=>ART=>CORE LIBRARIES
|=HARDWARE ABSTRACTION LAYER(HAL,ruscha jeleza)
|=BLUETOOTH,WIFI,SENSOR,AUDIO
|=LINUX KETNEL
|=DRIVERS=>BLUETOOTH,AUDIO,KEYPAD,WIFI,DISPLAY,USB,SHARED MEMORY
[color=red]
|=POWER MANAGEMENT
***********
Android paketlari haqida batafsil.
Android ozining .apk formatini qollaydi.
Apk tarkibida: .dex, .dex2, .arsc, AndroidManifest.xml, META-INF, res, assets, third_party, lib kabi papka va fayllar boladi.
.Dex- bu dalvik executable format, yani yuqorida yozganim DALVIK VM android uchun maxsus mashina u mazkur .dex faylni oqiydi.
.arsc- bu fayl ichida dasturimizdagi matnlar, va boshqa sozlar saqlanadi.Masalan, biror dastur menyusida "Sozlamalar" sozi ushbu .arsc ichida boladi.
AndroidManifest.xml- bu android ilovasining pasporti desak boladi, chunki kodlar bolgani bilan, ushbu kodga ruhsat har doim AndroidManifest.xml tomonidan beriladi.Xuddi siz forumda navzu ochasiz, ammo admin aktivlamasa befoyda bolgani kabi.Bu yerda siz .java kodsiz, admin bu AndroidManifest.
res- bu papka unda .xml, grafik va ovozli(raw papka) fayllar saqlanadi.Masalan, #1 dagi dasturda strings, values, menu kabi .xml fayllar bor, yoinki drawable papkadagi .png fayllar.
assets- bu yerda biror proyektdagi qoshimcha fayllar saqlanadi.
lib- bu yerda .so formatdagi library fayllar saqlanadi, ular c/c++ da yozilgan.
META-INF- bu papkada sertifikat va MANIFEST.MF bor, bu orqali paket ichidagi barcha fayllar ketma-ket qatorlab yozikadi(avto) va SHA-1 orqali encryp qilinadi.Masalan:
*************
Librarylar(*.jar, *.aar)
Bular dasturlardagi funksiya, dizayn va ui uchun oldindan tayyorlangan modullar.
Masalan, biror dastur bor uni ishlashi uchun "import" orqali kerakli libni import qilish kerak.Masalan: [code=html[package com.uzfor;
import android.webview.webkit.*;
//webkit dan song * qoydim yani kerakli activityni bir birdan qoshmasdan hammasini birdan qoshsim(massivga oxshash)
import android.os.*;
import android.support.support.v4.*;
public class MainActivity extends Activity(){
//tushunarli boldimi? Bu yerda MainActivity class fayli aktivity sifatida yaratildi.
}[/code]
*************
Google Xml- bu oddiy xmldan farqlanmaydi, lekin oziga yarasha teglari bor.U ham xmlga oxshab <?xml version="1.0" encoding="utf-8"?> kabi boshlanadi, ammo oziga yarasha teglari bor.Bu haqda keyinroq toxtalib otamiz.
*- Kechqurun yangi funksiyalar qoshilgan #1 ilovani korib chiqamiz, aytganimday har haftada 2 ta maqola qoshiladi, bu degani bitta ilovani 0 dan takomillashtirib boramiz va undagi resurslarni organamiz.
*- uzr men ozim tushuncham boyicha yozyapman, bazi birovlarga bular umuman tushunarsiz bolishi mumkin.Etibor bermanv, men ham boshida bularni juda qiyin, qandaydir galati tasavvur qilgandim.Keyin organib chiqsam oddiy javascriptdan uncha farq qilmaydi.
Demak davom etamiz.#1 postdagi kamchiliklarni togirlab yozaman.
Quyida bizga kerakli savollar:
1) Android nima ozi?
2) .apk va uning tarkibi qanday?
3) AndroidManifest.xml?
4) Librarylar nega va qanday ulayman?
5) Google xml batafsil?
Android- bu mobil, smartwatch, tablet, android auto va tvlar uchun operatsion sistema.Androidga Palo Alto, Californiada 2003 yilda Andy Rubin, Rich Miner, Nick Sears va Chris White tomonidan asos solingan.2005 yil iyul oyida Google bu kompaniyani 50 mln $ ga sotib oldi, 2003 yilda Android Inc. bahosi atiga 10,000$ pul ortidan rivojlangandi.
Android Versiyalari:
1) Android 1.0,2008(nomsiz prosta android, kopchilik android a dan boshlangani uchun unga nom qoyilmagan deydi)
2) Android 1.5,2009(Cupcake)
3) Android 1.6,2009(Donut)
4) Android 2.0-2.1,2009(Eclair)
5) Android 2.2,2010(Froyo)
6) Android 2.3,2011(Gingerbread)
7) Android 3.0,2011(HoneyComb)
8) Android 4.0,2011(ICS)
9) Android 4.1-4.3,2012(Jelly Bean)
10) Android 4.4,2013(Kitkat)
11) Android 5.0-5.1,2014(Lollipop)
12) Android 6.0,2015(Marshmallow)
13) Android 7.0-7.1,2016(Nougat)
14) Android 8.0-8.1,2017(Oreo)
15) Android 9,(Android P)
Android bu Linux 2.6 kernel moslashtirilib yaratilgan osdir, xuddi gnome, ubuntu, tizen va hokazo.
***********
Android .apk tuzilmasi va android arxitekturasi.
Android arxitekturasi: SYSTEM APPS=>E-MAIL,CAMERA,DIALER,CALENDAR
|=JAVA API FRAMEWORK[color=violet[
|=NATIVE C/C++=>WEBKIT=>OPENGL ES[/color]
|=ANDROID RUNTIME=>DALVIK VM=>ART=>CORE LIBRARIES
|=HARDWARE ABSTRACTION LAYER(HAL,ruscha jeleza)
|=BLUETOOTH,WIFI,SENSOR,AUDIO
|=LINUX KETNEL
|=DRIVERS=>BLUETOOTH,AUDIO,KEYPAD,WIFI,DISPLAY,USB,SHARED MEMORY
[color=red]
|=POWER MANAGEMENT
***********
Android paketlari haqida batafsil.
Android ozining .apk formatini qollaydi.
Apk tarkibida: .dex, .dex2, .arsc, AndroidManifest.xml, META-INF, res, assets, third_party, lib kabi papka va fayllar boladi.
.Dex- bu dalvik executable format, yani yuqorida yozganim DALVIK VM android uchun maxsus mashina u mazkur .dex faylni oqiydi.
.arsc- bu fayl ichida dasturimizdagi matnlar, va boshqa sozlar saqlanadi.Masalan, biror dastur menyusida "Sozlamalar" sozi ushbu .arsc ichida boladi.
AndroidManifest.xml- bu android ilovasining pasporti desak boladi, chunki kodlar bolgani bilan, ushbu kodga ruhsat har doim AndroidManifest.xml tomonidan beriladi.Xuddi siz forumda navzu ochasiz, ammo admin aktivlamasa befoyda bolgani kabi.Bu yerda siz .java kodsiz, admin bu AndroidManifest.
res- bu papka unda .xml, grafik va ovozli(raw papka) fayllar saqlanadi.Masalan, #1 dagi dasturda strings, values, menu kabi .xml fayllar bor, yoinki drawable papkadagi .png fayllar.
assets- bu yerda biror proyektdagi qoshimcha fayllar saqlanadi.
lib- bu yerda .so formatdagi library fayllar saqlanadi, ular c/c++ da yozilgan.
META-INF- bu papkada sertifikat va MANIFEST.MF bor, bu orqali paket ichidagi barcha fayllar ketma-ket qatorlab yozikadi(avto) va SHA-1 orqali encryp qilinadi.Masalan:
Manifest-Version: 1.0 Created-By: 1.0 (Xamarin) Name: res/menu/menu.xml SHA1-Digest: sPSGVTFAIwcDAmI8djl0pvTnbKI=
*************
Librarylar(*.jar, *.aar)
Bular dasturlardagi funksiya, dizayn va ui uchun oldindan tayyorlangan modullar.
Masalan, biror dastur bor uni ishlashi uchun "import" orqali kerakli libni import qilish kerak.Masalan: [code=html[package com.uzfor;
import android.webview.webkit.*;
//webkit dan song * qoydim yani kerakli activityni bir birdan qoshmasdan hammasini birdan qoshsim(massivga oxshash)
import android.os.*;
import android.support.support.v4.*;
public class MainActivity extends Activity(){
//tushunarli boldimi? Bu yerda MainActivity class fayli aktivity sifatida yaratildi.
}[/code]
*************
Google Xml- bu oddiy xmldan farqlanmaydi, lekin oziga yarasha teglari bor.U ham xmlga oxshab <?xml version="1.0" encoding="utf-8"?> kabi boshlanadi, ammo oziga yarasha teglari bor.Bu haqda keyinroq toxtalib otamiz.
*- Kechqurun yangi funksiyalar qoshilgan #1 ilovani korib chiqamiz, aytganimday har haftada 2 ta maqola qoshiladi, bu degani bitta ilovani 0 dan takomillashtirib boramiz va undagi resurslarni organamiz.
*- uzr men ozim tushuncham boyicha yozyapman, bazi birovlarga bular umuman tushunarsiz bolishi mumkin.Etibor bermanv, men ham boshida bularni juda qiyin, qandaydir galati tasavvur qilgandim.Keyin organib chiqsam oddiy javascriptdan uncha farq qilmaydi.
+ (1): Hanov_Dayko,
Hammaga salom!
Demak endi dasturlarimizda "SplashScreen" qoshishni organamiz.
*- Eslatib otaman, dasturlarimiz Google java va xml DTga asoslangan.
Tak birinchidan biz yangi proyekt tuzamiz.
Va keyin res/layout/ papkaga kiramiz, u yerda main.xml fayl bor, unga tegmaymiz.Yoniga qoshimcha splash.xml fayl yaratamiz, ichiga buni yozamiz:
*- yuqorida <ImageView ichida android:src="@drawable/logo kabi satr bor, demak res/drawable papka ichiga logo.png surat joylashimiz kerak.
----------------
Endi esa src/com/company/splash/ papkaga kirib u yerda SplashActivity.java fayl tuzamiz, keyin ichiga buni yozamiz:
Endi AndroidManifest.xmlga splashActivityni qoshib qoyamiz.
*- MainActivitydan oldin qoshamiz.
AIDE Menyusidan "RUN" bolimini bosamiz va kutamiz.
Ekranda: "Compiling, Dexing-Classes,Dexing-Merging,Building APK,Signing APK" yozuvlari chiqadi.
Compiling- bu kompilyatsiya qilmoqda
Dexing-Classes- MainActivity.java va SplashActivity.javani .dex(dalvik executable)ga otkazmoqda
Dexing-Merging-Merge qilmoqda
Building APK- apk tuzilmoqda
Signing APK- apk sertifikatlanmoqda(odatda testkey boladi)
Pastda esa namuna va isxodniy kodlar.
Demak endi dasturlarimizda "SplashScreen" qoshishni organamiz.
*- Eslatib otaman, dasturlarimiz Google java va xml DTga asoslangan.
Tak birinchidan biz yangi proyekt tuzamiz.
Va keyin res/layout/ papkaga kiramiz, u yerda main.xml fayl bor, unga tegmaymiz.Yoniga qoshimcha splash.xml fayl yaratamiz, ichiga buni yozamiz:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:background="#000000"> <ImageView android:id="@+id/logo" android:layout_width="match_parent" android:layout_height="250dp" android:layout_centerInParent="true" android:src="@drawable/logo" android:visibility="visible"/> <View android:layout_height="57dp" android:background="?android:attr/dividerVertical" android:layout_width="match_parent" android:visibility="invisible"/> <TextView android:layout_height="wrap_content" android:text="SplashScreen Demo" android:textAppearance="?android:attr/textAppearanceLarge" android:layout_width="wrap_content" android:layout_gravity="center" android:textColor="#FFFFFF" android:visibility="visible"/> <TextView android:layout_height="wrap_content" android:text="http://masteros.tk" android:textAppearance="?android:attr/textAppearanceSmall" android:layout_width="wrap_content" android:layout_gravity="center" android:textColor="#6090EF" android:visibility="visible"/> </LinearLayout>
*- yuqorida <ImageView ichida android:src="@drawable/logo kabi satr bor, demak res/drawable papka ichiga logo.png surat joylashimiz kerak.
----------------
Endi esa src/com/company/splash/ papkaga kirib u yerda SplashActivity.java fayl tuzamiz, keyin ichiga buni yozamiz:
package com.mos; //lib va modullarni import qilamiz. import android.os.Bundle; import android.os.Handler; import android.app.Activity; import android.content.Intent; import android.view.Menu; public class SplashActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.splash); // Thread yaratamiz Thread background = new Thread() { public void run() { try{ // 4 sekundlik thread sleep(4*1000); // 4 sekundlik splashdan song MainActivity.java intentga otkazamiz Intent i= new Intent(getBaseContext(),MainActivity.class); startActivity(i); //Splashni yoqotish finish(); } catch(Exception e) {}}}; // thread ochildi background.start(); } @Override protected void onDestroy() { super.onDestroy(); }}
Endi AndroidManifest.xmlga splashActivityni qoshib qoyamiz.
*- MainActivitydan oldin qoshamiz.
<application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:label="@string/app_name" android:name=".SplashActivity" > <intent-filter > <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>
AIDE Menyusidan "RUN" bolimini bosamiz va kutamiz.
Ekranda: "Compiling, Dexing-Classes,Dexing-Merging,Building APK,Signing APK" yozuvlari chiqadi.
Compiling- bu kompilyatsiya qilmoqda
Dexing-Classes- MainActivity.java va SplashActivity.javani .dex(dalvik executable)ga otkazmoqda
Dexing-Merging-Merge qilmoqda
Building APK- apk tuzilmoqda
Signing APK- apk sertifikatlanmoqda(odatda testkey boladi)
Pastda esa namuna va isxodniy kodlar.
+ (1): Hanov_Dayko,
dayko, # dayko (18.06.2019 / 20:44)
Bu mavzuni davom etmaymizmi Хозир иложи ёк
Bu mavzuni davom etmaymizmi Хозир иложи ёк
Ⓜⓐⓢⓣⓔⓡⓞⓢ, sava, menga juda yordamiz kerak. Men android studio IDE ni yukladim. ornatdim. endi SDK kerak ekan uni ham yukladim lekin qanday ornatishni bilmayapman. SDK bolmasa dastur tuzip bolmasakan. keyn offline ishlash uchun ham plugin yukladim. uni ornatishda yordam bersez yaxshi bolardi
BlackCat, # BlackCat (18.08.2019 / 09:19)
Ⓜⓐⓢⓣⓔⓡⓞⓢ, sava, menga juda yordamiz kerak. Men android studio IDE ni yukladim. ornatdim. endi SDK kerak ekan uni ham yukladim lekin qanday ornatishni bilmayapman. SDK bolmasa dastur tuzip bolmasakan. Java SDK ornata olmadingizmi?
Ⓜⓐⓢⓣⓔⓡⓞⓢ, sava, menga juda yordamiz kerak. Men android studio IDE ni yukladim. ornatdim. endi SDK kerak ekan uni ham yukladim lekin qanday ornatishni bilmayapman. SDK bolmasa dastur tuzip bolmasakan. Java SDK ornata olmadingizmi?
Ⓜⓐⓢⓣⓔⓡⓞⓢ, # Ⓜⓐⓢⓣⓔⓡⓞⓢ (18.08.2019 / 23:56)
BlackCat, Java SDK ornata olmadingizmi?yoq android studio uchun SDK TOOLS. bu bolmasa ishlab bolmas ekan dasturda. ornata olmayapman
BlackCat, Java SDK ornata olmadingizmi?yoq android studio uchun SDK TOOLS. bu bolmasa ishlab bolmas ekan dasturda. ornata olmayapman
Menda 1dasturdagi
//R.java faylga layout.mainni uladik
16.
mWebView = (WebView) findViewById(R.id.webView);
kodidagi id sözini dastur error deb körsatyapti negadur?
Iltimos kodlarni yashirin tarzda yozing (adashmasam edi) javada mavzuga kirsa sahifa hajmidan tel qotib qolyapti:-()))
//R.java faylga layout.mainni uladik
16.
mWebView = (WebView) findViewById(R.id.webView);
kodidagi id sözini dastur error deb körsatyapti negadur?
Iltimos kodlarni yashirin tarzda yozing (adashmasam
kod (+/-)
matn
Hammaga salom
Bugun Android dasturlar tuzish organuvchilarga .pdf qollanma va isxodniy kodlar taqdim etaman.
Tili: Russian
Hajmi: 12 mb
Isxodnik hajmi: 4 mb
Jami: 16 mb
Bugun Android dasturlar tuzish organuvchilarga .pdf qollanma va isxodniy kodlar taqdim etaman.
Tili: Russian
Hajmi: 12 mb
Isxodnik hajmi: 4 mb
Jami: 16 mb
+ (1): Fokuschi,
Biriktirilgan fayllar [1]:
— androiddew24hours.zip (16134.15 KB) (155 ↴)
— androiddew24hours.zip (16134.15 KB) (155 ↴)
Dangalchi, # Dangalchi (20.08.2019 / 23:01)
Menda 1dasturdagi
//R.java faylga layout.mainni uladik
16.
mWebView = (WebView) findViewById(R.id.webView);
kodidagi id sözini dastur error deb körsatyapti negadur?
Iltimos kodlarni yashirin tRi.javaga hech nima yozilmaydi, korgan bolsayiz.
R.java:
Auto created file Do not modified yozilgan. Demak R.java auto tuziladi, dastur tomonidan. Tushunmagan bolsayiz .zip qilib tashlaganman. Yuklab test qiling.
Menda 1dasturdagi
//R.java faylga layout.mainni uladik
16.
mWebView = (WebView) findViewById(R.id.webView);
kodidagi id sözini dastur error deb körsatyapti negadur?
Iltimos kodlarni yashirin tRi.javaga hech nima yozilmaydi, korgan bolsayiz.
R.java:
Auto created file Do not modified yozilgan. Demak R.java auto tuziladi, dastur tomonidan. Tushunmagan bolsayiz .zip qilib tashlaganman. Yuklab test qiling.
Demak mavzuni davom ettiradigan boldim. Kimga yoqmasa post yozib otirmang befoyda, postingizni baribir ochiraman.
Demak, kim dastur tuzishni organish xohlasa ushbu AIDE- eng songgi premium versiya.
Yuklab oling va ornating.
Yuklab oling va ornating.
Biriktirilgan fayllar [1]:
— aide.apk (26858.71 KB) (174 ↴)
— aide.apk (26858.71 KB) (174 ↴)
Ⓜⓐⓢⓣⓔⓡⓞⓢ, # Ⓜⓐⓢⓣⓔⓡⓞⓢ (01.09.2019 / 17:16)
Demak, kim dastur tuzishni organish xohlasa ushbu AIDE- eng songgi premium versiya.
Yuklab oling va ornating.Menda bor lekin darsni orihigacha bormaganman chunki reklamasini qoyaveradi keyin kirib ham bo'lmaydi reklamasi dastidan
Demak, kim dastur tuzishni organish xohlasa ushbu AIDE- eng songgi premium versiya.
Yuklab oling va ornating.Menda bor lekin darsni orihigacha bormaganman chunki reklamasini qoyaveradi keyin kirib ham bo'lmaydi reklamasi dastidan
TIMATI_13, # TIMATI_13 (01.09.2019 / 17:44)
Ⓜⓐⓢⓣⓔⓡⓞⓢ, Menda bor lekin darsni orihigacha bormaganman chunki reklamasini qoyaveradi keyin kirib ham bo'lmaydi reklamasi dastidanMenda reklama yoq. Tak meni mavzu moderi qivoring.
Ⓜⓐⓢⓣⓔⓡⓞⓢ, Menda bor lekin darsni orihigacha bormaganman chunki reklamasini qoyaveradi keyin kirib ham bo'lmaydi reklamasi dastidanMenda reklama yoq. Tak meni mavzu moderi qivoring.
Hammaga salom! Android uchun ilovalar tuzish orgataman. Narxlar 650 qiwidan boshlanadi. Albatta xohishingizga bogliq, kimdir aytishi mumkin, nax. 650 qiwiga deb, lekin siz bunga boshqa tomondan etibor bering. Masalan, men shu orqali 27 ming r ishladim Uzbda paytimda. Xohlang organing xohlang yoq, xohish ozingizdan, hech kim majburlayotgani yoq.
MasterOS, Siz qanchada o`rgandiz apk tuzishni?
ayni paytda men apk ishlab chiqishni bilmayman
qani bugundan hisoblab qo`yaylikchi necha kun(oy,yil)da apk tuza olar ekanman.
ayni paytda men apk ishlab chiqishni bilmayman
qani bugundan hisoblab qo`yaylikchi necha kun(oy,yil)da apk tuza olar ekanman.
Tavsiya etamiz:
- Hoziroq maydonlarni to'ldiring va reklamangizni joylashtiring!
Mavzuga oid xabarlar soni: 73 ta
So'ngi faollik vaqti: 00:49:40, 7 Jun 2021
Mavzu moderatori: Ⓜⓐⓢⓣⓔⓡⓞⓢ