Android Application Development Cookbook: 93 Recipes for Building Winning Apps


Permissions None Source Code to Download at Wrox.com



Download 32,34 Mb.
Pdf ko'rish
bet16/56
Sana26.02.2022
Hajmi32,34 Mb.
#470540
1   ...   12   13   14   15   16   17   18   19   ...   56
Bog'liq
Android Application Development Cookbook

Permissions
None
Source Code to Download at Wrox.com
Linking.zip
Unless you are writing a Hello World application, chances are good that your application con-
tains several activities that you need to connect in order to form a cohesive application. This 
recipe shows you the various ways to link to another activity in your Android application. 
1
www.it-ebooks.info


2

ChAPter 1
Android FundAmentAls
solution
Suppose you have two activities in your application. The following 
AndroidManifest.xml
file 
shows the two activities classes, 
MainActivity
and 
Activity2
:
package="net.learn2develop.linking"
android:versionCode="1"
android:versionName="1.0" >
android:minSdkVersion="8"
android:targetSdkVersion="15" />
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >

android:name=".MainActivity"
android:label="@string/title_activity_main" >






android:name=".Activity2"
android:label="@string/app_name" >





 


Assuming you are currently in the 
MainActivity
activity, to link to 
Activity2
you can use the fol-
lowing code snippet:
package net.learn2develop.linking;
import android.app.Activity;

Download 32,34 Mb.

Do'stlaringiz bilan baham:
1   ...   12   13   14   15   16   17   18   19   ...   56




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

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish