Android Application Development Cookbook: 93 Recipes for Building Winning Apps



Download 32,34 Mb.
Pdf ko'rish
bet56/56
Sana26.02.2022
Hajmi32,34 Mb.
#470540
1   ...   48   49   50   51   52   53   54   55   56
Bog'liq
Android Application Development Cookbook


note
This book makes the assumption that you are familiar with how permis-
sions work in context, so it will list only the permission line itself; see the section 
titled “A Note About Permissions” in the Introduction.
Figure 2-11 shows the 
WebView
displaying an image loaded from the web.
Figure 2-11 
www.it-ebooks.info


60

ChAPter 2
using Views to design the user interFAce
loading from a string
Besides loading the content of the 
WebView
from the web, you can also load it from a string, like this:
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
WebView webView = (WebView) findViewById(R.id.WebView01);
webView.setWebViewClient(new Callback());
WebSettings webSettings = webView.getSettings();
webSettings.setBuiltInZoomControls(true);
//---Part 1---
//webView.loadUrl(
"http://www.android.com/images/whatsnew/jb-new-logo.png");

final String mimeType = "text/html";
final String encoding = "UTF-8";
String html = 
"

A simple HTML page

" +

"
The quick brown fox jumps over the lazy dog
The quick brown fox jumps over the lazy dog
market_icon.png" />
" +
"
The quick brown fox jumps over the lazy dog

Download 32,34 Mb.

Do'stlaringiz bilan baham:
1   ...   48   49   50   51   52   53   54   55   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