Hi
I don't know if it's the right place for this..
My friend give me the wpa_supplicant.conf file to recover The wi-fi passwords.
The problem is all passwords are encrypted
pleas how i can decrypt them
Here is the file:
ctrl_interface=/data/misc/wifi/sockets
update_config=1
device_name=e53gxx
manufacturer=samsung
model_name=SM-E500H
model_number=SM-E500H
serial_number=f442d6ba
device_type=10-0050F204-5
config_methods=physical_display virtual_push_button
p2p_oper_reg_class=81
p2p_oper_channel=1
p2p_disabled=1
okc=1
ss_enc=1
external_sim=1
network={
ssid="abo ali"
psk=7a2a38c1e4555cc2da99262f0a17b7bf
key_mgmt=WPA-PSK
priority=1
frequency=2462
autojoin=1
usable_internet=0
skip_internet_check=0
verified_password=1
}
network={
ssid="Hegab"
psk=06678d3b56aa13035bf3f3be94afcf3383bc93609aff0398d080886c19a8f1c4
key_mgmt=WPA-PSK
priority=2
frequency=2457
autojoin=1
usable_internet=0
skip_internet_check=0
verified_password=1
}
network={
ssid="Hegabo"
psk=26d616521dd8d2e72f34f084b3cbfae1
key_mgmt=WPA-PSK
priority=3
frequency=2442
autojoin=1
usable_internet=0
skip_internet_check=0
verified_password=1
}
network={
ssid="TP-LINK_0E82"
psk=8d23699565516da1dc80e2f341704b41
key_mgmt=WPA-PSK
priority=4
frequency=2452
autojoin=1
usable_internet=0
skip_internet_check=0
verified_password=0
}
network={
ssid="linksys"
key_mgmt=NONE
priority=5
frequency=2462
autojoin=1
usable_internet=0
skip_internet_check=0
verified_password=0
}
THANKS
Thread closed, please only post a thread once. Continue discussion here: https://forum.xda-developers.com/android/help/getting-wifi-password-t3530885
The Flash
Forum Moderator
Related
v2.1 Standart (XIP-SYS 23017)(21.08.2009)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Açıklamalar:
Romda microsoftun Tüm uygulamaları (Office, wlm...) Toshiba'nın (Java, picsel view hariç) tüm uygulamaları ve gerekli görülen uygulamalar koyulmuştur. Boş ram ve hız konusunda Lite'dan pek farklı değil ancak boş depolama alanı azaldı. Lütfen romu kullanmaya başlamadan önce bu iletideki notlar bölümünü okuyunuz.
İçindekiler:
* Net Compact Framework 3.5'e yükseltilmiştir
* SqlCE mobile 3.5'e yükseltilmiştir.
* Microsoft'un standart yazılımları (PIE, Media Player, Office, Live Messenger, Internet Sharing, Calculator, Oyunlar)
* Toshiba'nın standart yazılımları (Java, picsel view hariç tümü)
* Gprs Settings (Turkcell Avea Vodafone gprs ayarlrını yapılandırmak için)
* Office DoNew
* Resco Explorer
* XnView
* Vito Audio Notes
* TCPMP (Tüm pluginler ve son sürümleri)
* Celetask
* Flashlight
* Clock On Top
* T9 Türkçe
* SDHC 8GB içermektedir
* Sistem fontu Segoe
* Yeni WM6.5 temaları, Sliding Panel ve standart windows mobile temaları
* WM6.5 Menü görselliği
* Kamera çözünürlük ayarları eklendi.
Ayarlar:
Settings-Accessibility:
* Başlat menüsü kaydırma çubuğunu açma kapama eklendi.
* Ses açma kapatma tuşlarının (uzun basma özellikleri) kısayollarını değiştirme eklendi.
Settings-CPU Clock:
* İşlemci hızı ayarlama eklendi. Xscale106-420, 314 MHZ sabit, 520 MHZ sabit arasından seçilecek. (Uygulanması için telefon yeniden başlatılmalı)
Bilinen Hatalar:
* Görüntülü görüşmeyle ilgili hatalar var.
* Operada sorun var
Notlar:
* WM6.5 menü renklerini değiştirmek için Start Menu --> Accessiories --> WM6.5 Menu den istediğiniz rengi seçin ve telefonu yeniden başlatın...
* Telefonu Active Sync modunda çalıştırmak için Settings--> Connections-->USB to PC --> Enable advanced network.... ün işaretini kaldırın. Bu aynı zamanda Hafıza kartı kaybolma sorununu engelleyecektir.
* Görüntülü konuşma denenmedi
Download :
http://rapidshare.com/files/272041083/ToshibaG500_WM6.5_V2.1Standart_23017.rar
rom çalışmalarından dolayı mpx.gen.tr ye vede rom sahibi manyak52 ye sonsuz teşekkürler....
Thanks once again for a new ROM for the G500.
I am very much interested in the G500 as I think it is a great phone! However I notice that most of the ROM development comes from Turkish developers and posted in Turkisk of course! Is there any way we english readers can benefit as we would like to read about the ROM's before installing and also have instructions to follow in English.
Is there anyone who can help with the translation for this ROM?
Is it an engkish ROM and are there any screen shots?
Thanks in advance to my saviour.
Thanks once again for a new ROM for the G500.
I am very much interested in the G500 as I think it is a great phone! However I notice that most of the ROM development comes from Turkish developers and posted in Turkish of course! Is there any way we English readers can benefit as we would like to read about the ROM's before installing and also have instructions to follow in English.
Is there anyone who can help with the translation for this ROM?
Is it an English ROM and are there any screen shots?
Thanks in advance to my savior.
This is English rom bro.
That screenshots are from rom.
danGerfuLL said:
This is English rom bro.
That screenshots are from rom.
Click to expand...
Click to collapse
Very many thanks for the info.
Hope to try it soon.
Arkadaşım,
Açıklamalar ve çalışmaların için teşekkürler.
G500 için WM5 ten WM6.5'a geçmeden önce sormak istediğim, bahsettiğin küçük problemler çözüldümü? Görüntülü görüşme şimdi nasıl? Opera ne vaziyette?
Bilgilendirirsen sevinirim.
Cevaplarına göre geçiş yapacağım. Yoksa WM6.1 is tercih edeceğim. Onu da nereden bulabilirim. Linkini ve nasıl kurulacağının izahatını verirsen sevinirim.
Selamlar
drgun said:
Arkadaşım,
Açıklamalar ve çalışmaların için teşekkürler.
G500 için WM5 ten WM6.5'a geçmeden önce sormak istediğim, bahsettiğin küçük problemler çözüldümü? Görüntülü görüşme şimdi nasıl? Opera ne vaziyette?
Bilgilendirirsen sevinirim.
Cevaplarına göre geçiş yapacağım. Yoksa WM6.1 is tercih edeceğim. Onu da nereden bulabilirim. Linkini ve nasıl kurulacağının izahatını verirsen sevinirim.
Selamlar
Click to expand...
Click to collapse
görüntülü konuşma henüz tamamlanmadı... opera da aynı şekilde... zaten sürekli güncel versiyonu yayınlayacağımmm...
wm61 için ise sana ragor'un g500 wm6.1 versiyonunu öneririm...
rar şifresi : mpx.gen.tr
http://rapidshare.com/files/195523936/g500_wm6.1_standart_v2.rar
kurulum içinse
Sevgili Darkness_Boy'un açıklaması.
Alıntı:
indireceğin rom dosya içinde açıklamalı bir word dosyası olacaktır( ingilizce) burdan indirebilirsinn
http://www.4shared.com/file/120368308/41462aa4/SupperRUU_User_Guide_v002.html
ben yinede ordaki resimlerle anlatmaya çalışıyım
1. her romla birlikte( genelikle) geliyor SuperRUU.exe calıştıyorunuz rom yüklem araçı kendisi
2. açılan programdan "..." ile gösterilen yere tıklayıp rom dosyasını seciyorsun
(rom dosyasının uzunantısı dıp)
not burda üçtane yuvarlak button var üste "os" secili olcak
3. sonra SuperRUU da "Waiting Usb Connection" yazısı cıkcak
4.g500 kapalı halde sol yöntuşuna basılı halde usb kabloyu takcan
ekran beyaz olcak( tabi önce usb kablonun diğer ucunu bilgisayar takcan)
5. otomatik yükleme başlıcakk
6. yükme bittiğinde yükleme barı yeşil olur
pil cıkarılır hard reset atlırı(“*”+ sol yön tışu ve açma tuşun aynı anda baslır hard reset için)
NOT ÖNemli : rom yükleme işlemi riskli bir işlem dir cihaz da geri dönüşü olmayan kalıcı hasarlar oluşabilir lütfen bunu gözönünde bulundurun
izmir_delisi said:
görüntülü konuşma henüz tamamlanmadı... opera da aynı şekilde... zaten sürekli güncel versiyonu yayınlayacağımmm...
wm61 için ise sana ragor'un g500 wm6.1 versiyonunu öneririm...
rar şifresi : mpx.gen.tr
http://rapidshare.com/files/195523936/g500_wm6.1_standart_v2.rar
kurulum içinse
Sevgili Darkness_Boy'un açıklaması.
Alıntı:
indireceğin rom dosya içinde açıklamalı bir word dosyası olacaktır( ingilizce) burdan indirebilirsinn
http://www.4shared.com/file/120368308/41462aa4/SupperRUU_User_Guide_v002.html
ben yinede ordaki resimlerle anlatmaya çalışıyım
1. her romla birlikte( genelikle) geliyor SuperRUU.exe calıştıyorunuz rom yüklem araçı kendisi
2. açılan programdan "..." ile gösterilen yere tıklayıp rom dosyasını seciyorsun
(rom dosyasının uzunantısı dıp)
not burda üçtane yuvarlak button var üste "os" secili olcak
3. sonra SuperRUU da "Waiting Usb Connection" yazısı cıkcak
4.g500 kapalı halde sol yöntuşuna basılı halde usb kabloyu takcan
ekran beyaz olcak( tabi önce usb kablonun diğer ucunu bilgisayar takcan)
5. otomatik yükleme başlıcakk
6. yükme bittiğinde yükleme barı yeşil olur
pil cıkarılır hard reset atlırı(“*”+ sol yön tışu ve açma tuşun aynı anda baslır hard reset için)
NOT ÖNemli : rom yükleme işlemi riskli bir işlem dir cihaz da geri dönüşü olmayan kalıcı hasarlar oluşabilir lütfen bunu gözönünde bulundurun
Click to expand...
Click to collapse
Please, is there any possibility of getting the above translated into English? I am very much interested in this thread and would like to follow it.
Many thanks is advance to anyone who can help!!
izmir_delisi said:
görüntülü konuşma henüz tamamlanmadı... opera da aynı şekilde... zaten sürekli güncel versiyonu yayınlayacağımmm...
wm61 için ise sana ragor'un g500 wm6.1 versiyonunu öneririm...
rar şifresi : mpx.gen.tr
http://rapidshare.com/files/195523936/g500_wm6.1_standart_v2.rar
kurulum içinse
Sevgili Darkness_Boy'un açıklaması.
Alıntı:
indireceğin rom dosya içinde açıklamalı bir word dosyası olacaktır( ingilizce) burdan indirebilirsinn
http://www.4shared.com/file/120368308/41462aa4/SupperRUU_User_Guide_v002.html
ben yinede ordaki resimlerle anlatmaya çalışıyım
1. her romla birlikte( genelikle) geliyor SuperRUU.exe calıştıyorunuz rom yüklem araçı kendisi
2. açılan programdan "..." ile gösterilen yere tıklayıp rom dosyasını seciyorsun
(rom dosyasının uzunantısı dıp)
not burda üçtane yuvarlak button var üste "os" secili olcak
3. sonra SuperRUU da "Waiting Usb Connection" yazısı cıkcak
4.g500 kapalı halde sol yöntuşuna basılı halde usb kabloyu takcan
ekran beyaz olcak( tabi önce usb kablonun diğer ucunu bilgisayar takcan)
5. otomatik yükleme başlıcakk
6. yükme bittiğinde yükleme barı yeşil olur
pil cıkarılır hard reset atlırı(“*”+ sol yön tışu ve açma tuşun aynı anda baslır hard reset için)
NOT ÖNemli : rom yükleme işlemi riskli bir işlem dir cihaz da geri dönüşü olmayan kalıcı hasarlar oluşabilir lütfen bunu gözönünde bulundurun
Click to expand...
Click to collapse
Please, is there any possibility of getting the above translated into English? I am very much interested in this thread and would like to follow it.
Many thanks is advance to anyone who can help!!
google translate ......
video calls are not completed yet ... opera in the same way ... continuous current version is already yayınlayacağımmm ...
As for the version you wm61 suggest ragor'un G500 WM6.1 ...
rar password: mpx.gen.tr
for installation if
Dear Darkness_Boy'un description.
Quote:
in a word document will be annotated in rom file is (in English) here indirebilirsinn
http://www.4shared.com/file/12036830...uide_v002.html
I'm still trying to explain involvement with images
1. Each rom with (primarily) comes rom installation tool itself SuperRUU.exe calıştıyorunuz
2. drop from the program "..." Click the location indicated by the rom file seciyorsun
(rom file uzunantısı DIP)
There are not here üçtane round top button "os" with select olcak
3. SuperRUU after the "Waiting USB Connection" post cıkcak
Are printed as left yöntuşuna closed 4.g500 usb cable takcan
olcak white screen (of course the other end before the computer usb cable takcan)
5. automatic loading başlıcakk
6. When you are finished loading green bar will yükme
battery and open cıkarılır hard reset atlırı ("*"+ left direction key at the same time tışu for baslır hard reset)
NOT IMPORTANT: rom installation process is a risky transaction device without permanent damage may return, please keep this in mind
google translate ......
video calls are not completed yet ... opera in the same way ... continuous current version is already yayınlayacağımmm ...
As for the version you wm61 suggest ragor'un G500 WM6.1 ...
rar password: mpx.gen.tr
for installation if
Dear Darkness_Boy'un description.
Quote:
in a word document will be annotated in rom file is (in English) here indirebilirsinn
http://www.4shared.com/file/12036830...uide_v002.html
I'm still trying to explain involvement with images
1. Each rom with (primarily) comes rom installation tool itself SuperRUU.exe calıştıyorunuz
2. drop from the program "..." Click the location indicated by the rom file seciyorsun
(rom file uzunantısı DIP)
There are not here üçtane round top button "os" with select olcak
3. SuperRUU after the "Waiting USB Connection" post cıkcak
Are printed as left yöntuşuna closed 4.g500 usb cable takcan
olcak white screen (of course the other end before the computer usb cable takcan)
5. automatic loading başlıcakk
6. When you are finished loading green bar will yükme
battery and open cıkarılır hard reset atlırı ("*"+ left direction key at the same time tışu for baslır hard reset)
NOT IMPORTANT: rom installation process is a risky transaction device without permanent damage may return, please keep this in mind
Hi rceng ..
I think a large library looking for with G500 ...
Then I'll wait to www.mpx.gen.tr ..
http://www.mpx.gen.tr/forumdisplay.php?f=213
izmir_delisi said:
Hi rceng ..
I think a large library looking for with G500 ...
Then I'll wait to www.mpx.gen.tr ..
http://www.mpx.gen.tr/forumdisplay.php?f=213
Click to expand...
Click to collapse
Thanks Izmir, Much appreciated. I will follow up the links.
Hi Izmir,
Is there anyway to flash this phone by SD card? The mini usb port on my G500 is damaged and will only charge.
Thanks in advance.
Hi rceng
toshiba sd card for wm6.5 installed yet. sd cards are installed but wm.6.1 ...
link
Windows Mobile 6.1 Powered by Adil YILDIZ:
http://rapidshare.com/files/138795484/G500_3_English_Adil_YILDIZ.200808.1958.rar
ROM board only comes in English programs:
Office 6.1
Windows Live Messenger
ClearTemp
Esmertec Java 3D 2008
MoBlue
Vito Audio Notes
GPRS Manager
TCPMP Player
WM5torage
XnView
Picsel Viewer
Opera Browser
Theme Slide Panel
Hi Izmir,
Really appreciate your help.
My internet conection is terrible at the moment which is why I delay in responding.
I will follow up on the links when possible.
Thanks again.
I kindly request my brother.
vayy beee toshibayı satalı aylar oldu artık htcye geçtik ama konumuz hala duruyor...
Please link
Please help all links are dead . Someone post atleast in 4share or other.G500.
Another thing i need how to hardreset G500.
I have a problem running igo 8 on my Touch Diamond 2!!!
I tried lots of different versions and tried to change the DATA.ZIP and SYS.txt,
but everything failed!!!
Can anyone tell me, where i can find a complete version for my device, please?
The rollup topic in the ROM section links you to The Newbie Guide To Configure iGO8. Try to search a little next time.
I'm not stupid! I'v found these posts, but it didn't work!
Do you have another idea?
igo8 it's ok for me!
try to modify sys.txt by baltac. only one option in the sys.txt at time: or landscape or portrait.
"landscape"
[interface]
resolution_dir="400_240" ; <--- usi questa cartella perchè è sottomultiplo del tua risoluzione
[rawdisplay]
screen_x=800 ; Questa riga e la prossima vanno solo qui
screen_y=480 ; e preparano lo schermo ad accogliere la risoluzione scelta
class="landscape" ; o anche "wide"
highres=1 ;<--- questo "raddoppia" la risoluzione scelta
"portrait"
[interface]
resolution_dir="240_400"
[rawdisplay]
screen_x=480
screen_y=800
class="portrait"
highres=1
tts voice don't works on wm6.5 for now.
thecatman said:
tts voice don't works on wm6.5 for now.
Click to expand...
Click to collapse
Read this thread :
http://forum.xda-developers.com/showthread.php?t=598342
and try...
http://rapidshare.com/files/225633869/ogi324.rar
Pass : ppcwarez
http://cafe.mobil.hr/showthread.php?t=62995
this version I have installed and checked for.
it is Croatian.
used google translate.
http://translate.google.com/#sr|en|
all done as it is written in the first post, use Google Translate,
then download the map and replace the existing files to download.
for sys.txt, go copy / paste.
the file should look like the picture
and tell what you did.
Hello.
You just need to replace the data.zip file. You can find the good one here :
http://lazouille83.free.fr/divers/data.zip
The original data.zip is in storage card/IGO8/data.zip
It works fine for me (NOT in landscape mode)
Hi thecatman,
Newbie question: how can you tell what version build before you're installing an IGO8 program? What build are you using? I am having the same issue with various version of IGO8 to run in my topaz. So far, all tests failed.
Hi,
I'm using iGo8 v.8.3.2.124260 (Dec 16 2009).
This is my sys.txt
[project]
name="igo8_pda"
[folders]
app="%SDCARD%/iGO8"
[debug]
skip_eula=1
disable_outlookpoi=1
sound_q_length=200
queue_length=200
[interface]
maxzoom2d=6000000
show_exit=1
mapfontscale=160
vga=1
[rawdisplay]
highres=1
driver="GDI"
[map]
2dheadup=1
3dcarsizemin=4000
3dcarsizemax=6000
3dcarsizemul=6000
3d_max_tiltlevel=8600
3d_min_zoomlevel=20
3d_zfar_horizon_ratio = 200
[3d]
fade_distance_for_car=5
fade_distance_for_guidance_arrow=50
fade_overlap_tolerance=80
[roundaboutcam]
enabled=0
centery=50
[sound]
sound_q_length=200
queue_length=200
[warning]
warn_distances=110:500,80:350,60:300,40:250
Click to expand...
Click to collapse
You don't have to include [sound] section. It is for slow CPU devices
iGO8 for Topaz
You can use this one:
doxxdo said:
http://rapidshare.com/files/225633869/ogi324.rar
Pass : ppcwarez
http://cafe.mobil.hr/showthread.php?t=62995
this version I have installed and checked for.
it is Croatian.
used google translate.
http://translate.google.com/#sr|en|
all done as it is written in the first post, use Google Translate,
then download the map and replace the existing files to download.
for sys.txt, go copy / paste.
the file should look like the picture
and tell what you did.
Hello.
Click to expand...
Click to collapse
I would suggest you pull these links before a Mod discovers them and bans you for posting warez.
Be smarter about it and do not put this site at risk!
What has been optimized in this version for the TD2?
I got iGo8 running on my Topaz, along with TMC thanks to HyperGPS.
Maybe the secret is to keep sys.txt simple?
Code:
[rawdisplay]
highres=0
screen_x=800
screen_y=480
class="landscape"
driver="GDI"
[interface]
minzoom2d=40
how can i change start image on my igo?
Try change in data.zip and in dranding.zip but can't exchange it
ThrashMan said:
I got iGo8 running on my Topaz, along with TMC thanks to HyperGPS.
Maybe the secret is to keep sys.txt simple?
Code:
[rawdisplay]
highres=0
screen_x=800
screen_y=480
class="landscape"
driver="GDI"
[interface]
minzoom2d=40
Click to expand...
Click to collapse
You can use driver=GX
GDI is standart windows driver and it is a little bit slower
Cool...thanks for the tip arthur
How do i get it into landscape mode?
jonbaker76 said:
How do i get it into landscape mode?
Click to expand...
Click to collapse
Try this : copy it and add it to your igo8 folder as sys. file ( i only change the opslagkaart into sd card ) i don`t no if that is right for you
[folders]
app="sd card/iGo8"
[interface]
maxzoom2d=6000000
show_exit=1
popup_info=1
poi_show_all_btn=1
[rawdisplay]
highres=0
screen_x=800
screen_y=480
[debug]
show_oneway_3d=1
show_oneway=1
show_gps_pos=1
skip_eula=1
show_pedestrian=1
poi_labels=1
show_arrows_on_route=1
tts_min_ready_wav=1
tts_getaway_time=200
tts_expected_engine_delay=1400
reserve_memory=2097152
sound_q_length="200"
no_file_cache="0"
cache="1024"
enable_roadshadow=1
[map]
popup_info=1
show_labels=1
3d_max_tiltlevel=9000
[msnd]
msnd.start=0
[tts]
tts_buffer=131072
tts_logics=3
priority="HIGH"
always_say_road_names=1
announce_street_name=1
announce_exit_directions=1
skip_exit_numbers=0
[sound]
queue_length=200
jonbaker76 said:
How do i get it into landscape mode?
Click to expand...
Click to collapse
Hi mate, try this topic Click - section B. of first post.
BTW there is only 11 pages, but you can find very good info
Informations
This tutorial will be demonstrating how to build a simple android List View.
It is about creating list view and launching new activity on selecting single list item.
Below are two screenshots of the final output:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Guide
Let’s get start by creating a project in Eclipse IDE.
Create a new project by going to File ⇒ New Android Project. Fill all the details and name your activity as AndroidListViewActivity.
Once the project is created open your main activity java file (in this case AndroidListViewActivity.java) and extend the class from ListActivity.
Code:
[FONT="Courier New"][B][COLOR=#006699]public class[/COLOR][/B] AndroidListViewActivity [B][COLOR=#006699]extends[/COLOR][/B] ListActivity {[/FONT]
Now we need a string resources file to store all list item labels. So create an XML file under values folder and name it as list_data.xml and paste the following code.
( Right Click on res/values ⇒ New ⇒ Android XML File)
Code:
[FONT="Courier New"][COLOR=#819f07]list_data.xml[/COLOR]
<?[B][COLOR=#006699]xml[/COLOR][/B] [COLOR="Gray"]version[/COLOR]=[COLOR="Blue"]"1.0"[/COLOR] [COLOR="Gray"]encoding[/COLOR]=[COLOR="Blue"]"utf-8"[/COLOR]?>
<[B][COLOR=#006699]resources[/COLOR][/B]>
<[B][COLOR=#006699]string-array name[/COLOR][/B]=[COLOR="Blue"]"adobe_products"[/COLOR]>
<[B][COLOR=#006699]item[/COLOR][/B]>Adobe After Effects</[B][COLOR=#006699]item[/COLOR][/B]>
<[B][COLOR=#006699]item[/COLOR][/B]>Adobe Bridge</[B][COLOR=#006699]item[/COLOR][/B]>
<[B][COLOR=#006699]item[/COLOR][/B]>Adobe Dreamweaver</[B][COLOR=#006699]item[/COLOR][/B]>
<[B][COLOR=#006699]item[/COLOR][/B]>Adobe Edge</[B][COLOR=#006699]item[/COLOR][/B]>
<[B][COLOR=#006699]item[/COLOR][/B]>Adobe Fireworks</[B][COLOR=#006699]item[/COLOR][/B]>
<[B][COLOR=#006699]item[/COLOR][/B]>Adobe Flash</[B][COLOR=#006699]item[/COLOR][/B]>
<[B][COLOR=#006699]item[/COLOR][/B]>Adobe Photoshop</[B][COLOR=#006699]item[/COLOR][/B]>
<[B][COLOR=#006699]item[/COLOR][/B]>Adobe Premiere</[B][COLOR=#006699]item[/COLOR][/B]>
<[B][COLOR=#006699]item[/COLOR][/B]>Adobe Reader</[B][COLOR=#006699]item[/COLOR][/B]>
<[B][COLOR=#006699]item[/COLOR][/B]>Adobe Illustrator</[B][COLOR=#006699]item[/COLOR][/B]>
</[B][COLOR=#006699]string-array[/COLOR][/B]>
</[B][COLOR=#006699]resources[/COLOR][/B]>[/FONT]
In ListView each list item will be an xml layout, so we can customize each list item. Create an XML file under res/layout folder and name it as list_item.xml and type the following code. This xml layout will be single list item row.
( Right Click on res/layout ⇒ New ⇒ Android XML File)
Code:
[FONT="Courier New"]<?[B][COLOR=#006699]xml[/COLOR][/B] [COLOR="Gray"]version[/COLOR]=[COLOR="Blue"]"1.0"[/COLOR] [COLOR="Gray"]encoding[/COLOR]=[COLOR="Blue"]"utf-8"[/COLOR]?>
[COLOR=#819f07]<!-- Single List Item Design -->[/COLOR]
<[B][COLOR=#006699]TextView[/COLOR][/B] [COLOR="Gray"]xmlns:android[/COLOR]=[COLOR="Blue"]"http://schemas.android.com/apk/res/android"[/COLOR]
[COLOR="Gray"]android:id[/COLOR]=[COLOR="Blue"]"@+id/label"[/COLOR]
[COLOR="Gray"]android:layout_width[/COLOR]=[COLOR="Blue"]"fill_parent"[/COLOR]
[COLOR="Gray"]android:layout_height[/COLOR]=[COLOR="Blue"]"fill_parent"[/COLOR]
[COLOR="Gray"]android:padding[/COLOR]=[COLOR="Blue"]"10dip"[/COLOR]
[COLOR="Gray"]android:textSize[/COLOR]=[COLOR="Blue"]"16dip"[/COLOR]
[COLOR="Gray"]android:textStyle[/COLOR]=[COLOR="Blue"]"bold"[/COLOR] >
</[B][COLOR=#006699]TextView[/COLOR][/B]>[/FONT]
Now open your main activity java file (AndroidListViewActivity.java) and type the following code. In the following code I'm importing all XML resources data and storing them in an Array. On the next step I'm binding array to ListAdapter.
Code:
[FONT="Courier New"][COLOR=#819f07]AndroidListViewActivity.java[/color]
[B][COLOR=#006699]package[/COLOR][/B] com.androidhive.androidlistview;
[B][COLOR=#006699]import[/COLOR][/B] android.app.ListActivity;
[B][COLOR=#006699]import[/COLOR][/B] android.content.Intent;
[B][COLOR=#006699]import[/COLOR][/B] android.os.Bundle;
[B][COLOR=#006699]import[/COLOR][/B] android.view.View;
[B][COLOR=#006699]import[/COLOR][/B] android.widget.AdapterView;
[B][COLOR=#006699]import[/COLOR][/B] android.widget.AdapterView.OnItemClickListener;
[B][COLOR=#006699]import[/COLOR][/B] android.widget.ArrayAdapter;
[B][COLOR=#006699]import[/COLOR][/B] android.widget.ListView;
[B][COLOR=#006699]import[/COLOR][/B] android.widget.TextView;
[B][COLOR=#006699]public class[/COLOR][/B] AndroidListViewActivity [B][COLOR=#006699]extends[/COLOR][/B] ListActivity {
[COLOR="Gray"]@Override[/COLOR]
[B][COLOR=#006699]public void[/COLOR][/B] onCreate(Bundle savedInstanceState) {
[B][COLOR=#006699]super[/COLOR][/B].onCreate(savedInstanceState);
[COLOR=#819f07]// storing string resources into Array[/COLOR]
String[] adobe_products = getResources().getStringArray(R.array.adobe_products);
[COLOR=#819f07]// Binding resources Array to ListAdapter[/COLOR]
[B][COLOR=#006699]this[/COLOR][/B].setListAdapter([B][COLOR=#006699]new[/COLOR][/B] ArrayAdapter<String>([B][COLOR=#006699]this[/COLOR][/B], R.layout.list_item, R.id.label, adobe_products));
}
}[/FONT]
Now run your project you can see listview with list of array items. But on clicking single list item you can see no action. So we need to start new activity on selecting single list item.
Launching new Activity on selecting single list item.
Now create new activity class under src folder. Right Click on src/package folder ⇒ New ⇒ Class and name it as SingleListItem. (SingleListItem.java)
Open your AndroidListViewActivity.java and modify the code to following. In the following code i am getting the selected list item string(product name) and sending it to new Activity.
Code:
[FONT="Courier New"][COLOR=#819f07]AndroidListViewActivity.java[/color]
[B][COLOR=#006699]package[/COLOR][/B] com.androidhive.androidlistview;
[B][COLOR=#006699]import[/COLOR][/B] android.app.ListActivity;
[B][COLOR=#006699]import[/COLOR][/B] android.content.Intent;
[B][COLOR=#006699]import[/COLOR][/B] android.os.Bundle;
[B][COLOR=#006699]import[/COLOR][/B] android.view.View;
[B][COLOR=#006699]import[/COLOR][/B] android.widget.AdapterView;
[B][COLOR=#006699]import[/COLOR][/B] android.widget.AdapterView.OnItemClickListener;
[B][COLOR=#006699]import[/COLOR][/B] android.widget.ArrayAdapter;
[B][COLOR=#006699]import[/COLOR][/B] android.widget.ListView;
[B][COLOR=#006699]import[/COLOR][/B] android.widget.TextView;
[B][COLOR=#006699]public class[/COLOR][/B] AndroidListViewActivity [B][COLOR=#006699]extends[/COLOR][/B] ListActivity {
[COLOR="Gray"]@Override[/COLOR]
[B][COLOR=#006699]public void[/COLOR][/B] onCreate(Bundle savedInstanceState) {
[B][COLOR=#006699]super[/COLOR][/B].onCreate(savedInstanceState);
[COLOR=#819f07]// storing string resources into Array[/COLOR]
String[] adobe_products = getResources().getStringArray(R.array.adobe_products);
[COLOR=#819f07]// Binding resources Array to ListAdapter[/COLOR]
[B][COLOR=#006699]this[/COLOR][/B].setListAdapter([B][COLOR=#006699]new[/COLOR][/B] ArrayAdapter<String>([B][COLOR=#006699]this[/COLOR][/B], R.layout.list_item, R.id.label, adobe_products));
ListView lv = getListView();
[COLOR=#819f07]// listening to single list item on click[/COLOR]
lv.setOnItemClickListener([B][COLOR=#006699]new[/COLOR][/B] OnItemClickListener() {
[B][COLOR=#006699]public void[/COLOR][/B] onItemClick(AdapterView<?> parent, View view,
[B][COLOR=#006699]int[/COLOR][/B] position, [B][COLOR=#006699]long[/COLOR][/B] id) {
[COLOR=#819f07]// selected item [/COLOR]
String product = ((TextView) view).getText().toString();
[COLOR=#819f07]// Launching new Activity on selecting single List Item[/COLOR]
Intent i = [B][COLOR=#006699]new[/COLOR][/B] Intent(getApplicationContext(), SingleListItem.[B][COLOR=#006699]class[/COLOR][/B]);
[COLOR=#819f07]// sending data to new activity[/COLOR]
i.putExtra([COLOR="Blue"]"product"[/COLOR], product);
startActivity(i);
}
});
}
}[/FONT]
Now in new activity we need to display the received from listview activity.
Create a new xml file under res/layout and name it as single_list_item_view.xml and type the following code. This XML file will be layout for SingleListItem.java
Code:
[FONT="Courier New"][COLOR=#819f07]single_list_item_view.xml[/COLOR]
<?[B][COLOR=#006699]xml[/COLOR][/B] [COLOR="gray"]version[/COLOR]=[COLOR="Blue"]"1.0"[/COLOR] [COLOR="gray"]encoding[/COLOR]=[COLOR="Blue"]"utf-8"[/COLOR]?>
<[B][COLOR=#006699]LinearLayout[/COLOR][/B]
[COLOR="gray"]xmlns:android[/COLOR]=[COLOR="Blue"]"http://schemas.android.com/apk/res/android"[/COLOR]
[COLOR="gray"]android:orientation[/COLOR]=[COLOR="Blue"]"vertical"[/COLOR]
[COLOR="gray"]android:layout_width[/COLOR]=[COLOR="Blue"]"match_parent"[/COLOR]
[COLOR="gray"]android:layout_height[/COLOR]=[COLOR="Blue"]"match_parent"[/COLOR]>
<[B][COLOR=#006699]TextView[/COLOR][/B] [COLOR="Gray"]android:id[/COLOR]=[COLOR="Blue"]"@+id/product_label"[/COLOR]
[COLOR="gray"]android:layout_width[/COLOR]=[COLOR="Blue"]"fill_parent"[/COLOR]
[COLOR="gray"]android:layout_height[/COLOR]=[COLOR="Blue"]"wrap_content"[/COLOR]
[COLOR="gray"]android:textSize[/COLOR]=[COLOR="Blue"]"25dip"[/COLOR]
[COLOR="gray"]android:textStyle[/COLOR]=[COLOR="Blue"]"bold"[/COLOR]
[COLOR="gray"]android:padding[/COLOR]=[COLOR="Blue"]"10dip"[/COLOR]
[COLOR="gray"]android:textColor[/COLOR]=[COLOR="Blue"]"#ffffff"[/COLOR]/>
</[B][COLOR=#006699]LinearLayout[/COLOR][/B]>[/FONT]
Now open your second activity file i.e SingleListItem.java and paste the following code.
Code:
[FONT="Courier New"][COLOR=#819f07]SingleListItem.java[/COLOR]
[B][COLOR=#006699]package[/COLOR][/B] com.androidhive.androidlistview;
[B][COLOR=#006699]import[/COLOR][/B] android.app.Activity;
[B][COLOR=#006699]import[/COLOR][/B] android.content.Intent;
[B][COLOR=#006699]import[/COLOR][/B] android.os.Bundle;
[B][COLOR=#006699]import[/COLOR][/B] android.widget.TextView;
[B][COLOR=#006699]public class[/COLOR][/B] SingleListItem extends Activity{
[COLOR="Gray"]@Override[/COLOR]
[B][COLOR=#006699]public void[/COLOR][/B] onCreate(Bundle savedInstanceState) {
[B][COLOR=#006699]super[/COLOR][/B].onCreate(savedInstanceState);
[B][COLOR=#006699]this[/COLOR][/B].setContentView(R.layout.single_list_item_view);
TextView txtProduct = (TextView) findViewById(R.id.product_label);
Intent i = getIntent();
[COLOR=#819f07]// getting attached intent data[/COLOR]
String product = i.getStringExtra([COLOR="Blue"]"product"[/COLOR]);
[COLOR=#819f07]// displaying selected product name[/COLOR]
txtProduct.setText(product);
}
}[/FONT]
The final step is to add an entry of new activity name in AndroidManifest.xml file. Open you AndroidManifest.xml file and modify the code as below:
Code:
[FONT="Courier New"][COLOR=#819f07]AndroidManifest.xml[/COLOR]
<?[B][COLOR=#006699]xml[/COLOR][/B] [COLOR="Gray"]version[/COLOR]=[COLOR="blue"]"1.0"[/COLOR] [COLOR="gray"]encoding[/COLOR]=[COLOR="Blue"]"utf-8"[/COLOR]?>
<[B][COLOR=#006699]manifest[/COLOR][/B] [COLOR="gray"]xmlns:android[/COLOR]=[COLOR="blue"]"http://schemas.android.com/apk/res/android"[/COLOR]
[COLOR="gray"]package[/COLOR]=[COLOR="blue"]"com.androidhive.androidlistview"[/COLOR]
[COLOR="gray"]android:versionCode[/COLOR]=[COLOR="blue"]"1"[/COLOR]
[COLOR="gray"]android:versionName[/COLOR]=[COLOR="blue"]"1.0"[/COLOR]>
<[B][COLOR=#006699]uses-sdk[/COLOR][/B] [COLOR="gray"]android:minSdkVersion[/COLOR]=[COLOR="blue"]"8"[/COLOR] />
<[B][COLOR=#006699]application[/COLOR][/B] [COLOR="gray"]android:icon[/COLOR]=[COLOR="blue"]"@drawable/icon"[/COLOR] [COLOR="gray"]android:label[/COLOR]=[COLOR="blue"]"@string/app_name"[/COLOR]>
<[B][COLOR=#006699]activity[/COLOR][/B] [COLOR="gray"]android:name[/COLOR]=[COLOR="blue"]".AndroidListViewActivity"[/COLOR]
[COLOR="gray"]android:label[/COLOR]=[COLOR="blue"]"Android List View"[/COLOR]>
<[B][COLOR=#006699]intent-filter[/COLOR][/B]>
<[B][COLOR=#006699]action[/COLOR][/B] [COLOR="gray"]android:name[/COLOR]=[COLOR="blue"]"android.intent.action.MAIN"[/COLOR] />
<[B][COLOR=#006699]category[/COLOR][/B] [COLOR="gray"]android:name[/COLOR]=[COLOR="blue"]"android.intent.category.LAUNCHER"[/COLOR] />
</[B][COLOR=#006699]intent-filter[/COLOR][/B]>
</[B][COLOR=#006699]activity[/COLOR][/B]>
<[B][COLOR=#006699]activity[/COLOR][/B] [COLOR="gray"]android:name[/COLOR]=[COLOR="blue"]".SingleListItem"[/COLOR]
[COLOR="gray"]android:label[/COLOR]=[COLOR="blue"]"Single Item Selected"[/COLOR]>
</[B][COLOR=#006699]activity[/COLOR][/B]>
</[B][COLOR=#006699]application[/COLOR][/B]>
</[B][COLOR=#006699]manifest[/COLOR][/B]>[/FONT]
Finally run your project by Right Clicking on your Project Folder ⇒ Run As ⇒ 1 Android Application.
Credits
Me - For the topic design.
And I must thank 4 other guys that helped me understand the Android and they're still teaching me:
ihavenick - The first one who helped me understand the Android!
Volk204 - He's the guy that helps me with codes and makes me understand what they do.
Tigrouzen - Lmao! Your kernels are great dude!
Rebellos - He motivated me and I thank him very much!
thnks
it works fine thanks
rommo_911 said:
it works fine thanks
Click to expand...
Click to collapse
Thank you, rommo_911!
I appreciate!
Roach_ said:
Informations
This tutorial will be demonstrating how to build a simple android List View.
It is about creating list view and launching new activity on selecting single list item.
Below are two screenshots of the final output:
Guide
Let’s get start by creating a project in Eclipse IDE.
Create a new project by going to File ⇒ New Android Project. Fill all the details and name your activity as AndroidListViewActivity.
Once the project is created open your main activity java file (in this case AndroidListViewActivity.java) and extend the class from ListActivity.
Code:
[FONT="Courier New"][B][COLOR=#006699]public class[/COLOR][/B] AndroidListViewActivity [B][COLOR=#006699]extends[/COLOR][/B] ListActivity {[/FONT]
Now we need a string resources file to store all list item labels. So create an XML file under values folder and name it as list_data.xml and paste the following code.
( Right Click on res/values ⇒ New ⇒ Android XML File)
Code:
[FONT="Courier New"][COLOR=#819f07]list_data.xml[/COLOR]
<?[B][COLOR=#006699]xml[/COLOR][/B] [COLOR="Gray"]version[/COLOR]=[COLOR="Blue"]"1.0"[/COLOR] [COLOR="Gray"]encoding[/COLOR]=[COLOR="Blue"]"utf-8"[/COLOR]?>
<[B][COLOR=#006699]resources[/COLOR][/B]>
<[B][COLOR=#006699]string-array name[/COLOR][/B]=[COLOR="Blue"]"adobe_products"[/COLOR]>
<[B][COLOR=#006699]item[/COLOR][/B]>Adobe After Effects</[B][COLOR=#006699]item[/COLOR][/B]>
<[B][COLOR=#006699]item[/COLOR][/B]>Adobe Bridge</[B][COLOR=#006699]item[/COLOR][/B]>
<[B][COLOR=#006699]item[/COLOR][/B]>Adobe Dreamweaver</[B][COLOR=#006699]item[/COLOR][/B]>
<[B][COLOR=#006699]item[/COLOR][/B]>Adobe Edge</[B][COLOR=#006699]item[/COLOR][/B]>
<[B][COLOR=#006699]item[/COLOR][/B]>Adobe Fireworks</[B][COLOR=#006699]item[/COLOR][/B]>
<[B][COLOR=#006699]item[/COLOR][/B]>Adobe Flash</[B][COLOR=#006699]item[/COLOR][/B]>
<[B][COLOR=#006699]item[/COLOR][/B]>Adobe Photoshop</[B][COLOR=#006699]item[/COLOR][/B]>
<[B][COLOR=#006699]item[/COLOR][/B]>Adobe Premiere</[B][COLOR=#006699]item[/COLOR][/B]>
<[B][COLOR=#006699]item[/COLOR][/B]>Adobe Reader</[B][COLOR=#006699]item[/COLOR][/B]>
<[B][COLOR=#006699]item[/COLOR][/B]>Adobe Illustrator</[B][COLOR=#006699]item[/COLOR][/B]>
</[B][COLOR=#006699]string-array[/COLOR][/B]>
</[B][COLOR=#006699]resources[/COLOR][/B]>[/FONT]
In ListView each list item will be an xml layout, so we can customize each list item. Create an XML file under res/layout folder and name it as list_item.xml and type the following code. This xml layout will be single list item row.
( Right Click on res/layout ⇒ New ⇒ Android XML File)
Code:
[FONT="Courier New"]<?[B][COLOR=#006699]xml[/COLOR][/B] [COLOR="Gray"]version[/COLOR]=[COLOR="Blue"]"1.0"[/COLOR] [COLOR="Gray"]encoding[/COLOR]=[COLOR="Blue"]"utf-8"[/COLOR]?>
[COLOR=#819f07]<!-- Single List Item Design -->[/COLOR]
<[B][COLOR=#006699]TextView[/COLOR][/B] [COLOR="Gray"]xmlns:android[/COLOR]=[COLOR="Blue"]"http://schemas.android.com/apk/res/android"[/COLOR]
[COLOR="Gray"]android:id[/COLOR]=[COLOR="Blue"]"@+id/label"[/COLOR]
[COLOR="Gray"]android:layout_width[/COLOR]=[COLOR="Blue"]"fill_parent"[/COLOR]
[COLOR="Gray"]android:layout_height[/COLOR]=[COLOR="Blue"]"fill_parent"[/COLOR]
[COLOR="Gray"]android:padding[/COLOR]=[COLOR="Blue"]"10dip"[/COLOR]
[COLOR="Gray"]android:textSize[/COLOR]=[COLOR="Blue"]"16dip"[/COLOR]
[COLOR="Gray"]android:textStyle[/COLOR]=[COLOR="Blue"]"bold"[/COLOR] >
</[B][COLOR=#006699]TextView[/COLOR][/B]>[/FONT]
Now open your main activity java file (AndroidListViewActivity.java) and type the following code. In the following code I'm importing all XML resources data and storing them in an Array. On the next step I'm binding array to ListAdapter.
Code:
[FONT="Courier New"][COLOR=#819f07]AndroidListViewActivity.java[/color]
[B][COLOR=#006699]package[/COLOR][/B] com.androidhive.androidlistview;
[B][COLOR=#006699]import[/COLOR][/B] android.app.ListActivity;
[B][COLOR=#006699]import[/COLOR][/B] android.content.Intent;
[B][COLOR=#006699]import[/COLOR][/B] android.os.Bundle;
[B][COLOR=#006699]import[/COLOR][/B] android.view.View;
[B][COLOR=#006699]import[/COLOR][/B] android.widget.AdapterView;
[B][COLOR=#006699]import[/COLOR][/B] android.widget.AdapterView.OnItemClickListener;
[B][COLOR=#006699]import[/COLOR][/B] android.widget.ArrayAdapter;
[B][COLOR=#006699]import[/COLOR][/B] android.widget.ListView;
[B][COLOR=#006699]import[/COLOR][/B] android.widget.TextView;
[B][COLOR=#006699]public class[/COLOR][/B] AndroidListViewActivity [B][COLOR=#006699]extends[/COLOR][/B] ListActivity {
[COLOR="Gray"]@Override[/COLOR]
[B][COLOR=#006699]public void[/COLOR][/B] onCreate(Bundle savedInstanceState) {
[B][COLOR=#006699]super[/COLOR][/B].onCreate(savedInstanceState);
[COLOR=#819f07]// storing string resources into Array[/COLOR]
String[] adobe_products = getResources().getStringArray(R.array.adobe_products);
[COLOR=#819f07]// Binding resources Array to ListAdapter[/COLOR]
[B][COLOR=#006699]this[/COLOR][/B].setListAdapter([B][COLOR=#006699]new[/COLOR][/B] ArrayAdapter<String>([B][COLOR=#006699]this[/COLOR][/B], R.layout.list_item, R.id.label, adobe_products));
}
}[/FONT]
Now run your project you can see listview with list of array items. But on clicking single list item you can see no action. So we need to start new activity on selecting single list item.
Launching new Activity on selecting single list item.
Now create new activity class under src folder. Right Click on src/package folder ⇒ New ⇒ Class and name it as SingleListItem. (SingleListItem.java)
Open your AndroidListViewActivity.java and modify the code to following. In the following code i am getting the selected list item string(product name) and sending it to new Activity.
Code:
[FONT="Courier New"][COLOR=#819f07]AndroidListViewActivity.java[/color]
[B][COLOR=#006699]package[/COLOR][/B] com.androidhive.androidlistview;
[B][COLOR=#006699]import[/COLOR][/B] android.app.ListActivity;
[B][COLOR=#006699]import[/COLOR][/B] android.content.Intent;
[B][COLOR=#006699]import[/COLOR][/B] android.os.Bundle;
[B][COLOR=#006699]import[/COLOR][/B] android.view.View;
[B][COLOR=#006699]import[/COLOR][/B] android.widget.AdapterView;
[B][COLOR=#006699]import[/COLOR][/B] android.widget.AdapterView.OnItemClickListener;
[B][COLOR=#006699]import[/COLOR][/B] android.widget.ArrayAdapter;
[B][COLOR=#006699]import[/COLOR][/B] android.widget.ListView;
[B][COLOR=#006699]import[/COLOR][/B] android.widget.TextView;
[B][COLOR=#006699]public class[/COLOR][/B] AndroidListViewActivity [B][COLOR=#006699]extends[/COLOR][/B] ListActivity {
[COLOR="Gray"]@Override[/COLOR]
[B][COLOR=#006699]public void[/COLOR][/B] onCreate(Bundle savedInstanceState) {
[B][COLOR=#006699]super[/COLOR][/B].onCreate(savedInstanceState);
[COLOR=#819f07]// storing string resources into Array[/COLOR]
String[] adobe_products = getResources().getStringArray(R.array.adobe_products);
[COLOR=#819f07]// Binding resources Array to ListAdapter[/COLOR]
[B][COLOR=#006699]this[/COLOR][/B].setListAdapter([B][COLOR=#006699]new[/COLOR][/B] ArrayAdapter<String>([B][COLOR=#006699]this[/COLOR][/B], R.layout.list_item, R.id.label, adobe_products));
ListView lv = getListView();
[COLOR=#819f07]// listening to single list item on click[/COLOR]
lv.setOnItemClickListener([B][COLOR=#006699]new[/COLOR][/B] OnItemClickListener() {
[B][COLOR=#006699]public void[/COLOR][/B] onItemClick(AdapterView<?> parent, View view,
[B][COLOR=#006699]int[/COLOR][/B] position, [B][COLOR=#006699]long[/COLOR][/B] id) {
[COLOR=#819f07]// selected item [/COLOR]
String product = ((TextView) view).getText().toString();
[COLOR=#819f07]// Launching new Activity on selecting single List Item[/COLOR]
Intent i = [B][COLOR=#006699]new[/COLOR][/B] Intent(getApplicationContext(), SingleListItem.[B][COLOR=#006699]class[/COLOR][/B]);
[COLOR=#819f07]// sending data to new activity[/COLOR]
i.putExtra([COLOR="Blue"]"product"[/COLOR], product);
startActivity(i);
}
});
}
}[/FONT]
Now in new activity we need to display the received from listview activity.
Create a new xml file under res/layout and name it as single_list_item_view.xml and type the following code. This XML file will be layout for SingleListItem.java
Code:
[FONT="Courier New"][COLOR=#819f07]single_list_item_view.xml[/COLOR]
<?[B][COLOR=#006699]xml[/COLOR][/B] [COLOR="gray"]version[/COLOR]=[COLOR="Blue"]"1.0"[/COLOR] [COLOR="gray"]encoding[/COLOR]=[COLOR="Blue"]"utf-8"[/COLOR]?>
<[B][COLOR=#006699]LinearLayout[/COLOR][/B]
[COLOR="gray"]xmlns:android[/COLOR]=[COLOR="Blue"]"http://schemas.android.com/apk/res/android"[/COLOR]
[COLOR="gray"]android:orientation[/COLOR]=[COLOR="Blue"]"vertical"[/COLOR]
[COLOR="gray"]android:layout_width[/COLOR]=[COLOR="Blue"]"match_parent"[/COLOR]
[COLOR="gray"]android:layout_height[/COLOR]=[COLOR="Blue"]"match_parent"[/COLOR]>
<[B][COLOR=#006699]TextView[/COLOR][/B] [COLOR="Gray"]android:id[/COLOR]=[COLOR="Blue"]"@+id/product_label"[/COLOR]
[COLOR="gray"]android:layout_width[/COLOR]=[COLOR="Blue"]"fill_parent"[/COLOR]
[COLOR="gray"]android:layout_height[/COLOR]=[COLOR="Blue"]"wrap_content"[/COLOR]
[COLOR="gray"]android:textSize[/COLOR]=[COLOR="Blue"]"25dip"[/COLOR]
[COLOR="gray"]android:textStyle[/COLOR]=[COLOR="Blue"]"bold"[/COLOR]
[COLOR="gray"]android:padding[/COLOR]=[COLOR="Blue"]"10dip"[/COLOR]
[COLOR="gray"]android:textColor[/COLOR]=[COLOR="Blue"]"#ffffff"[/COLOR]/>
</[B][COLOR=#006699]LinearLayout[/COLOR][/B]>[/FONT]
Now open your second activity file i.e SingleListItem.java and paste the following code.
Code:
[FONT="Courier New"][COLOR=#819f07]SingleListItem.java[/COLOR]
[B][COLOR=#006699]package[/COLOR][/B] com.androidhive.androidlistview;
[B][COLOR=#006699]import[/COLOR][/B] android.app.Activity;
[B][COLOR=#006699]import[/COLOR][/B] android.content.Intent;
[B][COLOR=#006699]import[/COLOR][/B] android.os.Bundle;
[B][COLOR=#006699]import[/COLOR][/B] android.widget.TextView;
[B][COLOR=#006699]public class[/COLOR][/B] SingleListItem extends Activity{
[COLOR="Gray"]@Override[/COLOR]
[B][COLOR=#006699]public void[/COLOR][/B] onCreate(Bundle savedInstanceState) {
[B][COLOR=#006699]super[/COLOR][/B].onCreate(savedInstanceState);
[B][COLOR=#006699]this[/COLOR][/B].setContentView(R.layout.single_list_item_view);
TextView txtProduct = (TextView) findViewById(R.id.product_label);
Intent i = getIntent();
[COLOR=#819f07]// getting attached intent data[/COLOR]
String product = i.getStringExtra([COLOR="Blue"]"product"[/COLOR]);
[COLOR=#819f07]// displaying selected product name[/COLOR]
txtProduct.setText(product);
}
}[/FONT]
The final step is to add an entry of new activity name in AndroidManifest.xml file. Open you AndroidManifest.xml file and modify the code as below:
Code:
[FONT="Courier New"][COLOR=#819f07]AndroidManifest.xml[/COLOR]
<?[B][COLOR=#006699]xml[/COLOR][/B] [COLOR="Gray"]version[/COLOR]=[COLOR="blue"]"1.0"[/COLOR] [COLOR="gray"]encoding[/COLOR]=[COLOR="Blue"]"utf-8"[/COLOR]?>
<[B][COLOR=#006699]manifest[/COLOR][/B] [COLOR="gray"]xmlns:android[/COLOR]=[COLOR="blue"]"http://schemas.android.com/apk/res/android"[/COLOR]
[COLOR="gray"]package[/COLOR]=[COLOR="blue"]"com.androidhive.androidlistview"[/COLOR]
[COLOR="gray"]android:versionCode[/COLOR]=[COLOR="blue"]"1"[/COLOR]
[COLOR="gray"]android:versionName[/COLOR]=[COLOR="blue"]"1.0"[/COLOR]>
<[B][COLOR=#006699]uses-sdk[/COLOR][/B] [COLOR="gray"]android:minSdkVersion[/COLOR]=[COLOR="blue"]"8"[/COLOR] />
<[B][COLOR=#006699]application[/COLOR][/B] [COLOR="gray"]android:icon[/COLOR]=[COLOR="blue"]"@drawable/icon"[/COLOR] [COLOR="gray"]android:label[/COLOR]=[COLOR="blue"]"@string/app_name"[/COLOR]>
<[B][COLOR=#006699]activity[/COLOR][/B] [COLOR="gray"]android:name[/COLOR]=[COLOR="blue"]".AndroidListViewActivity"[/COLOR]
[COLOR="gray"]android:label[/COLOR]=[COLOR="blue"]"Android List View"[/COLOR]>
<[B][COLOR=#006699]intent-filter[/COLOR][/B]>
<[B][COLOR=#006699]action[/COLOR][/B] [COLOR="gray"]android:name[/COLOR]=[COLOR="blue"]"android.intent.action.MAIN"[/COLOR] />
<[B][COLOR=#006699]category[/COLOR][/B] [COLOR="gray"]android:name[/COLOR]=[COLOR="blue"]"android.intent.category.LAUNCHER"[/COLOR] />
</[B][COLOR=#006699]intent-filter[/COLOR][/B]>
</[B][COLOR=#006699]activity[/COLOR][/B]>
<[B][COLOR=#006699]activity[/COLOR][/B] [COLOR="gray"]android:name[/COLOR]=[COLOR="blue"]".SingleListItem"[/COLOR]
[COLOR="gray"]android:label[/COLOR]=[COLOR="blue"]"Single Item Selected"[/COLOR]>
</[B][COLOR=#006699]activity[/COLOR][/B]>
</[B][COLOR=#006699]application[/COLOR][/B]>
</[B][COLOR=#006699]manifest[/COLOR][/B]>[/FONT]
Finally run your project by Right Clicking on your Project Folder ⇒ Run As ⇒ 1 Android Application.
Credits
Me - For the topic design.
And I must thank 4 other guys that helped me understand the Android and they're still teaching me:
ihavenick - The first one who helped me understand the Android!
Volk204 - He's the guy that helps me with codes and makes me understand what they do.
Tigrouzen - Lmao! Your kernels are great dude!
Rebellos - He motivated me and I thank him very much!
Click to expand...
Click to collapse
hey man could you help-me how can I add this feature (listview) in my own source build ???
I know a lot off nexus 4 roms have this implemented but I like to add this in my source, and I'm a little noob in editing the android source code =/
thank's a lot BTW
Can you show a tutorial on how to use Listview in Navigation drawer (material design) ?
Today I read about the file "gps.conf"
On my PACMAN ROM v22.3 it looks like this :
NTP_SERVER=europe.pool.ntp.org
XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin
XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin
XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
SUPL_HOST=supl.google.com
SUPL_PORT=7276
Now I read about supl.nokia.com and how it would improve gpsfix. I also read it works on Samsung and LG.
Does anyone dare to explain why this is considered to be "better" ?
I found this (for Samsung)
SUPL_HOST=supl.nokia.com
SUPL_PORT=7275
and this for LG p920 :
SUPL_HOST=supl.nokia.com
SUPL_PORT=6
What is it with the ports ? Any answer is welcome