Re: [android-developers] Re: NFC Secure Element

2012-01-05 Thread s.rawat
I did re-flashing from the patched Android Source and again the same
thing.Here are the logcat logs on clicking the NFC Settings :

D/dalvikvm(  298): GC_EXPLICIT freed 91K, 45% free 3160K/5703K, external
4731K/5234K, paused 290ms
I/ActivityManager(  106): Starting: Intent { act=android.intent.action.MAIN
cmp=com.android.settings/.WirelessSettings } from pid 493
D/dalvikvm(  493): GC_EXTERNAL_ALLOC freed 55K, 50% free 2933K/5831K,
external 2878K/3220K, paused 20ms
E/NFC (  493): could not retrieve NFC service
I/ActivityManager(  106): Displayed com.android.settings/.WirelessSettings:
+351ms
D/dalvikvm(  493): GC_EXTERNAL_ALLOC freed 43K, 49% free 3022K/5831K,
external 3171K/3241K, paused 21ms
I/ActivityManager(  106): Starting: Intent { act=android.intent.action.MAIN
cmp=com.android.settings/.nfc.NfcSettings } from pid 493
I/ActivityManager(  106): Displayed com.android.settings/.nfc.NfcSettings:
+261ms


Any clue on this.
Rgds,
Saurabh


..pain is temporary.quitting lasts forever..



2012/1/4 Fernando Miguélez fernando.migue...@gmail.com

 Well, options are enabled in cascade. The problem comes because the first
 option is not enabled. Besides, if you look at the Wireless Settings
 screen, there is only the NFC Settings option, but not the one that lets
 you enalbe/disable NFC directly from that screen. That is beacuse the Nfc
 service in not available. Connection to a computer in debug mode will draw
 some light.

 Instead of compiling the whole image again I suggest you to compile just
 the Nfc.apk system application and replace the original one. You must
 remount /system partition in read/write mode and overwrite the apk inside
 /system/app. Then you must kill the nfc service by means of DDMS view of
 the ADT (you must connnect the phone in debug mode and since you have
 compiled in userdebug mode you will see all the running proccesses). The
 service will restart automatically.

 When it comes to read/write the card by means of an external reader, any
 Mifare Classic 4K compatible RFID reader will do. If you try to access
 directly to the SE from an Android application I am afraid to disappoint
 you but that is not possible, at least I wasn't successful at it and nobody
 I know either. The reasons are well described in other posts and on
 stackoverflow.

 Regards


 On Wed, Jan 4, 2012 at 2:56 PM, s.rawat imsaurabhra...@gmail.com wrote:

 Thanks !
 I will also try from my side recompiling it.So you mean I should get the
 Check boxes enabled for
  *Only Card EmulationMode*
 and
  *Use External SE*

 My main aim is to write to the NFC card in card emulation mode so that it
 can be read by any Card Reader.is it possible after your patches are
 applied using teh android SDKs or do we have to write some native
 application.
 Rgds,
 Softy
 ..pain is temporary.quitting lasts forever..




 2012/1/4 Fernando Miguélez fernando.migue...@gmail.com

 Great work.

 Obviously there is something wrong with the compilation. Have you tried
 to connect in debug mode the phone to a computer with Android Development
 Tools and see what the traces look like. They may offer a clue. My
 suspicion is that NfcService is crashing. I will review my notes tomorrow
 if I find something different to the steps you followed to build the image.

 On Wed, Jan 4, 2012 at 9:17 AM, softy imsaurabhra...@gmail.com wrote:

 Hi All,
 Thanks Fernando Miguélez Palomo for posting the patches.I have applied
 it to 2.3.4-r1 Android gingerbread and compiled /flashed it on Samsung
 Nexus S and was able to see the NFC Settings changed(though i cant select
 them, they are disabled)
 I have blogged the whole steps 
 herehttp://techshek4u.blogspot.com/2012/01/applying-card-emulation-patch-to_03.html.Plz
  let me know if I miss something.

 @ Fernando Miguélez Palomo
 What next after that.How can i test this.Any source code or tool /card
 reader description will be enlightening.
 Rgds,
 softy

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to
 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this 

Re: [android-developers] android contacts..

2012-01-05 Thread tamil maran
how to load and display the document file from url link into webview

this is the link which :
http://122.183.217.133:8080/Intranet/datafileupload.htm?fileid=4

which link contain the one document ,which contain the resume of
employee.her i need to display this resume into webview or textview .how to
achieve this.please help me

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: NFC Secure Element

2012-01-05 Thread Fernando Miguélez
Hi Saurabdh,

I reviewed my notes and I definetly built the image with lunch
full_crespo-eng. Try building in engineer mode so the traces can be more
verbose. Apart from that the process to compile the firmware is the same
you described in your blog.



On Thu, Jan 5, 2012 at 9:31 AM, s.rawat imsaurabhra...@gmail.com wrote:

 I did re-flashing from the patched Android Source and again the same
 thing.Here are the logcat logs on clicking the NFC Settings :

 D/dalvikvm(  298): GC_EXPLICIT freed 91K, 45% free 3160K/5703K, external
 4731K/5234K, paused 290ms
 I/ActivityManager(  106): Starting: Intent {
 act=android.intent.action.MAIN cmp=com.android.settings/.WirelessSettings }
 from pid 493
 D/dalvikvm(  493): GC_EXTERNAL_ALLOC freed 55K, 50% free 2933K/5831K,
 external 2878K/3220K, paused 20ms
 E/NFC (  493): could not retrieve NFC service
 I/ActivityManager(  106): Displayed
 com.android.settings/.WirelessSettings: +351ms
 D/dalvikvm(  493): GC_EXTERNAL_ALLOC freed 43K, 49% free 3022K/5831K,
 external 3171K/3241K, paused 21ms
 I/ActivityManager(  106): Starting: Intent {
 act=android.intent.action.MAIN cmp=com.android.settings/.nfc.NfcSettings }
 from pid 493
 I/ActivityManager(  106): Displayed com.android.settings/.nfc.NfcSettings:
 +261ms


 Any clue on this.
 Rgds,
 Saurabh



 ..pain is temporary.quitting lasts forever..



 2012/1/4 Fernando Miguélez fernando.migue...@gmail.com

 Well, options are enabled in cascade. The problem comes because the first
 option is not enabled. Besides, if you look at the Wireless Settings
 screen, there is only the NFC Settings option, but not the one that lets
 you enalbe/disable NFC directly from that screen. That is beacuse the Nfc
 service in not available. Connection to a computer in debug mode will draw
 some light.

 Instead of compiling the whole image again I suggest you to compile just
 the Nfc.apk system application and replace the original one. You must
 remount /system partition in read/write mode and overwrite the apk inside
 /system/app. Then you must kill the nfc service by means of DDMS view of
 the ADT (you must connnect the phone in debug mode and since you have
 compiled in userdebug mode you will see all the running proccesses). The
 service will restart automatically.

 When it comes to read/write the card by means of an external reader, any
 Mifare Classic 4K compatible RFID reader will do. If you try to access
 directly to the SE from an Android application I am afraid to disappoint
 you but that is not possible, at least I wasn't successful at it and nobody
 I know either. The reasons are well described in other posts and on
 stackoverflow.

 Regards


 On Wed, Jan 4, 2012 at 2:56 PM, s.rawat imsaurabhra...@gmail.com wrote:

 Thanks !
 I will also try from my side recompiling it.So you mean I should get the
 Check boxes enabled for
  *Only Card EmulationMode*
 and
  *Use External SE*

 My main aim is to write to the NFC card in card emulation mode so that
 it can be read by any Card Reader.is it possible after your patches are
 applied using teh android SDKs or do we have to write some native
 application.
 Rgds,
 Softy
 ..pain is temporary.quitting lasts forever..




 2012/1/4 Fernando Miguélez fernando.migue...@gmail.com

 Great work.

 Obviously there is something wrong with the compilation. Have you tried
 to connect in debug mode the phone to a computer with Android Development
 Tools and see what the traces look like. They may offer a clue. My
 suspicion is that NfcService is crashing. I will review my notes tomorrow
 if I find something different to the steps you followed to build the image.

 On Wed, Jan 4, 2012 at 9:17 AM, softy imsaurabhra...@gmail.com wrote:

 Hi All,
 Thanks Fernando Miguélez Palomo for posting the patches.I have applied
 it to 2.3.4-r1 Android gingerbread and compiled /flashed it on Samsung
 Nexus S and was able to see the NFC Settings changed(though i cant select
 them, they are disabled)
 I have blogged the whole steps 
 herehttp://techshek4u.blogspot.com/2012/01/applying-card-emulation-patch-to_03.html.Plz
  let me know if I miss something.

 @ Fernando Miguélez Palomo
 What next after that.How can i test this.Any source code or tool /card
 reader description will be enlightening.
 Rgds,
 softy

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to
 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to
 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 

Re: [android-developers]

2012-01-05 Thread Narendra Bagade
pls.refer
http://htcdev.com/


On Thu, Jan 5, 2012 at 1:05 AM, TreKing treking...@gmail.com wrote:

 On Wed, Jan 4, 2012 at 1:30 PM, jaggu mjagadeeshb...@gmail.com wrote:

 i want to intsall htc desire sdk for my eclipse which version and
 avd also what the scale display size.


 http://developer.android.com/index.html


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Regards,
Narendra
.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Mapview adding point

2012-01-05 Thread Duygu Kahraman
Hi All;

I am working on google maps. I am using this
http://codemagician.wordpress.com/2010/05/06/android-google-mapview-tutorial-done-right/
.

my problem is i dont want to see screen gettin dark when i add point.

İ dont want to see 
http://codemagician.files.wordpress.com/2010/05/end-result-2.jpg?w=630
.

Can anybody help me?

THX.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Mapview adding point

2012-01-05 Thread Duygu Kahraman
Hi All;

I am working on google maps. I am using this
http://codemagician.wordpress.com/2010/05/06/android-google-mapview-tutorial-done-right/
.

my problem is i dont want to see screen gettin dark when i add point.

İ dont want to see 
http://codemagician.files.wordpress.com/2010/05/end-result-2.jpg?w=630
.

Can anybody help me?

THX.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Unable to execute Bluetooth HDP Demo

2012-01-05 Thread Chenchen
Dear Raul,

I'm playing around with UA-767PBT-C, and find that I could be able to
get the association request by printing log in read thread:
01-04 13:46:49.652: I/BluetoothHDPService(7249):
e200
0032
8000
0001002a
5079
0026
8000
8000 //?? not 0xA0
8000

0080
0008
00091e8002be
02bc
0081  //?? 0x01, 0x00
0100

However, I don't know what is the right now to write association
response back.

On Dec 16 2011, 6:54 am, Raul Ruiz spekwh...@gmail.com wrote:
 Well we have same trouble. I have UA-767PBT-C device too and with HDP
 Demo doesnt connect.

 Im doing a program that receive ACL_CONNECT from device and opens a
 channel.
 In the program, Health service is use by android BT and the link is
 connected but device is in CONNECTING_STATE and then drops down.
 Using a BT sniffer like HCIDUMP, i watch that android BT doest send
 CONNECT RSP to device and I think that this is the problem.

 If you want some help tell me i will continue working in this.

 PD: Me too check this in linux, and it works finelly.I think that dbus
 library is different.

 On 16 dic, 12:29, jfernandez jorge.fernandez.gonza...@gmail.com
 wrote:







  On 16 dic, 11:31, Raul Ruiz spekwh...@gmail.com wrote:

   Hi  Jorge,

  Hi Raul,

   What device are you using? I have a same problem using Nonin 9560BT
   pulseoximeter. It conects and disconnects and any data had received in
   the Android.

  I'm working with a board which is able to simulate several biomedical
  devices.

  On the other hand, I have a real device (blood pressure monitor
  UA-767PBT-C). In that case, the device opens the HDP channel
  automatically with the smartphone which acts as sink. But the truth is
  that I don't see anything in the LogCat related to this channel.
  However, if I try opening the connection channel from the HDP Demo
  Application, I obtain the same error.

  Anyway, I have checked all of this in a Linux laptop using the same
  BlueZ stack that we have in Android and everything works fine.

   Do you have any solution?

  Not yet. I'm expecting some feedback.

   Thanks

   On Dec 15, 6:30 pm, jfernandez jorge.fernandez.gonza...@gmail.com
   wrote:

Hi all,

I'm executing the BluetoothHDPDemo [1]  (offered from Android 4.0
Ice Cream Sandwich) in my Android smartphone. When I have registered
the application in order to receive data, and I have paired the
biomedical device with the smartphone, I try to open the channel
connection and I can see that the device starts sending data to the
smartphone. However, the smartphone is unable to open the channel
connectionHDP.

At the end of this message you can see the output obtained in the
LogCat.

Has anybody achieved to run successfully this sample about the use of
theBluetoothHealth Profile API? Any ideas?

Thanks. Regards.

[1]http://developer.android.com/resources/samples/BluetoothHDP/index.html

This is the log that I obtain:

12-15 16:40:54.048: I/BluetoothHDPService(1105): connectChannel()
12-15 16:40:54.068: D/BluetoothService(147): CONNECTION_STATE_CHANGE:
00:80:25:14:A1:BC: 0 - 1
12-15 16:40:55.169: D/ConnectivityService(147):
handleInetConditionHoldEnd: net=1, condition=0, published condition=0
12-15 16:40:59.393: D/BluetoothEventLoop(147): Device property
changed: 00:80:25:14:A1:BC property: Connected value: true
12-15 16:41:00.024: D/BluetoothEventLoop(147): Health Device :
devicePath: /org/bluez/278/hci0/dev_00_80_25_14_A1_BC:channelPath:/org/
bluez/278/hci0/dev_00_80_25_14_A1_BC/chan3115:existstrue
12-15 16:41:00.034: E/BluetoothService.cpp(147):
getChannelApplicationNative
12-15 16:41:00.044: E/bluetooth_common.cpp(147):
dbus_func_args_timeout_valist: D-Bus error in Acquire:
org.bluez.Error.HealthError (Cannot reconnect: MDL is not closed)
12-15 16:41:00.044: E/BluetoothHealthProfileHandler(147): Error
obtaining fd for channel:/org/bluez/278/hci0/dev_00_80_25_14_A1_BC/
chan3115
12-15 16:41:00.074: E/BluetoothService.cpp(147): destroyChannelNative
12-15 16:41:00.074: E/BluetoothEventLoop.cpp(147):
onHealthDeviceConnectionResult: D-Bus error:
org.bluez.Error.HealthError (Mdl is not created)
12-15 16:41:00.074: D/BluetoothEventLoop(147):
onHealthDeviceConnectionResult 2 6001
12-15 16:41:00.214: D/BluetoothEventLoop(147):
onHealthDeviceConnectionResult 2 6000
12-15 16:41:00.214: D/BluetoothEventLoop(147): Health Device : Name of
Property is: MainChannel Value:/org/bluez/278/hci0/
dev_00_80_25_14_A1_BC/chan3115

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Android VS Embedded Linux

2012-01-05 Thread Abhishek Joshi
Dear All,

I am new to this forum and writing first time. We were debating
internally about deciding a OS for our chip. We were contemplating
between Android and custom embedded linux. Before we decide, I wanted
to get answers for following questions:

•   Customization of Android
o   Is it possible to remove unwanted libraries and services, how thin
or light weight android can be
o   Customization of libraries e.g is it possible to modify enhance
WebKit to support OpenCV
•   What kind of applications does Android's media framework,
StageFright, support
•   Is there any support in Android for gesture based applications? If
yes, which framework is used for gesture based applications are
supported?
•   What are the minimum processor requirements for Android?
•   How much is JVM overhead?
•   Is android a feasible platform for set-top box platform?

Thanks in Advance.

Best Regards,
Abhi

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] my first android program ever I usually code in python

2012-01-05 Thread aikidoguy
I apologize I understand this is a more advance list but I don't know
where else to turn

This is my first android program ever I usually code in python... I've
watch a ton of java tutorials but Java is so different  I'm having
trouble ...so here is what I need to do... I have my Main class and it
collects user input  and returns the variable public string username
and public string password then I have a gps Class and it return the
variable public double longitudes and public double latitude... in
python I would make these global variable(ie self.username ... etc )
collect the data into in a method and send it to the server in mysql
format... I have a new class  and Its called GetdataandSend

public calss GetdataandSend(){
I want to collect the variables from my Main Class and gps class
store the variables and then send to the server the data (using Mysql
fomat)
}

Do I have to use a bunch of classes or is it possible to use top down
coding while Im new since this app is relatively simple I getting the
user name, password and longitude and latitude and every 15 seconds or
onResume send that to my (Mysql db)php server ...can some one point me
in a direction of some tutorials or examples of this ... thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Issues about ffmpeg,thanks for attention

2012-01-05 Thread bixiaopeng2...@yahoo.com.cn
I'm working on transplanting the ffmpeg to android platform.however in
the project I use the .so file from android 2.2 and it do not work on
my incredible S which platform version is 2.3 .does it mean I have to
use the specific files which related to the running platform in the
project?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Android Contact

2012-01-05 Thread Krishnamoorthy Paavadai
Hi...
I m a beginner to android ..
i would like to add birthday column in android contact...kindly
suggest to me...

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Android dhcp client

2012-01-05 Thread shulik
Hi! Find next trouble. If via dhcp server send to android parameters
as:
# MS routes: adds extras to supplement routers option
option ms-classless-static-routes code 249 = array of unsigned integer
8;
# RFC3442 routes: overrides routers option
option rfc3442-classless-static-routes code 121 = array of unsigned
integer 8;
android got only ip address and netmask, and didn't got default
gateway, dns server.
If I disable on server this parameters - android got ip, netmask, dns
and gateway.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] [ContactsContract] Get contact id from google talk contact

2012-01-05 Thread Jonas
Hi,
suppose I have a gtalk contact, this means I know IM_HANDLE and
PROTOCOL from 
http://developer.android.com/reference/android/provider/ContactsContract.StatusUpdates.html
.

How can I now more informations about the contact? In my case I need
the latest status update.
Whatever I try, I always get no such column, im_handle.

The only thing that I can retrieve via IM_HANDLE and PROTOCOL is the
presence. =/

Any help is appreciated.

Thanks in advance,
jonas

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Android Crash When Using NumberPicker Widget

2012-01-05 Thread Said
Please help me with the following crash.

I got NumberPicker widget code from some web page and with little
modification was using in one of my project. It is displayed properly
when I compile the java file. But I need to use it in multiple
projects, so I thought of making a jar file from it.

The first error was due to duplicate entry of manifest file. So I
removed manifest from the jar. It compiled and when I run I'm getting
the following error.

I have separate R.java created in both the library and application
using it. Don't know whether that is the issue and if it is, how to
fix that.

I had posted the issue in stackoverflow few weeks before. There are
more than 80 views without any help :(
http://stackoverflow.com/questions/8478778/android-crash-when-using-numberpicker-widget


From LogCat


12-12 22:57:30.106: ERROR/AndroidRuntime(583): FATAL EXCEPTION: main
12-12 22:57:30.106: ERROR/AndroidRuntime(583):
java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.nessaid.nessalarm/
com.nessaid.nessalarm.AlarmDetails}: android.view.InflateException:
Binary XML file line #77: Error inflating class
com.nessaid.numberpicker.NumberPicker
12-12 22:57:30.106: ERROR/AndroidRuntime(583): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2663)

 Skipped Bottom Stack ---

12-12 22:57:30.106: ERROR/AndroidRuntime(583): Caused by:
android.view.InflateException: Binary XML file line #77: Error
inflating class com.nessaid.numberpicker.NumberPicker
12-12 22:57:30.106: ERROR/AndroidRuntime(583): at
android.view.LayoutInflater.createView(LayoutInflater.java:513)
12-12 22:57:30.106: ERROR/AndroidRuntime(583): at
android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)

 Skipped Bottom Stack ---

12-12 22:57:30.106: ERROR/AndroidRuntime(583): at
com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:
198)
12-12 22:57:30.106: ERROR/AndroidRuntime(583): at
android.app.Activity.setContentView(Activity.java:1647)
12-12 22:57:30.106: ERROR/AndroidRuntime(583): at
com.nessaid.nessalarm.AlarmDetails.onCreate(AlarmDetails.java:37)
12-12 22:57:30.106: ERROR/AndroidRuntime(583): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1047)
12-12 22:57:30.106: ERROR/AndroidRuntime(583): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2627)
12-12 22:57:30.106: ERROR/AndroidRuntime(583): ... 11 more

12-12 22:57:30.106: ERROR/AndroidRuntime(583): Caused by:
java.lang.reflect.InvocationTargetException
12-12 22:57:30.106: ERROR/AndroidRuntime(583): at
com.nessaid.numberpicker.NumberPicker.init(NumberPicker.java:111)
12-12 22:57:30.106: ERROR/AndroidRuntime(583): at
java.lang.reflect.Constructor.constructNative(Native Method)
12-12 22:57:30.106: ERROR/AndroidRuntime(583): at
java.lang.reflect.Constructor.newInstance(Constructor.java:446)
12-12 22:57:30.106: ERROR/AndroidRuntime(583): at
android.view.LayoutInflater.createView(LayoutInflater.java:500)
12-12 22:57:30.106: ERROR/AndroidRuntime(583): ... 23 more
12-12 22:57:30.106: ERROR/AndroidRuntime(583): Caused by:
android.view.InflateException: Binary XML file line #77: Error
inflating class unknown
12-12 22:57:30.106: ERROR/AndroidRuntime(583): at
android.view.LayoutInflater.createView(LayoutInflater.java:513)
12-12 22:57:30.106: ERROR/AndroidRuntime(583): at
android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)
12-12 22:57:30.106: ERROR/AndroidRuntime(583): at
android.view.LayoutInflater.rInflate(LayoutInflater.java:618)

12-12 22:57:30.106: ERROR/AndroidRuntime(583): Caused by:
java.lang.reflect.InvocationTargetException
12-12 22:57:30.106: ERROR/AndroidRuntime(583): at
com.nessaid.numberpicker.NumberPicker.init(NumberPicker.java:111)
12-12 22:57:30.106: ERROR/AndroidRuntime(583): at
java.lang.reflect.Constructor.constructNative(Native Method)
12-12 22:57:30.106: ERROR/AndroidRuntime(583): at
java.lang.reflect.Constructor.newInstance(Constructor.java:446)
12-12 22:57:30.106: ERROR/AndroidRuntime(583): at
android.view.LayoutInflater.createView(LayoutInflater.java:500)
12-12 22:57:30.106: ERROR/AndroidRuntime(583): ... 34 more
12-12 22:57:30.106: ERROR/AndroidRuntime(583): Caused by:
android.view.InflateException: Binary XML file line #77: Error
inflating class unknown
12-12 22:57:30.106: ERROR/AndroidRuntime(583): at
android.view.LayoutInflater.createView(LayoutInflater.java:513)
12-12 22:57:30.106: ERROR/AndroidRuntime(583): at
android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)
12-12 22:57:30.106: ERROR/AndroidRuntime(583): at
android.view.LayoutInflater.rInflate(LayoutInflater.java:618)

Here's my NumberPicker xml file

merge xmlns:android=http://schemas.android.com/apk/res/android;

NumberPickerButton android:id=@+id/increment
android:layout_width=fill_parent

[android-developers] Re: How to invoke sim unlock pin screen

2012-01-05 Thread bixiaopeng2...@yahoo.com.cn
Maybe you can reference the devicepolicymanager api (I think)

On 2011年12月29日, 下午9时43分, Giacomo Federici giacomo.feder...@gmail.com
wrote:
 As the title, how can I invoke programmatically the default screen to
 unlock the sim card? (The one that appears at the boot of the phone if
 the sim PIN is required).

 Thank you very much!!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] RTSP example needed

2012-01-05 Thread hanan ahmad
Till now i saw tutorials on streaming which plays video and audio
files by downloading into a folder and play.
Is there any examples which explains how to use RTSP  for
streaming media ?

regards

hanan ahmed

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Dalvik error code 1 using ProGuard

2012-01-05 Thread Alex Curran
I'm trying to build my app ready for release but keep hitting the dreaded 
Dalvik error 1, and can't figure out why. I was hoping people here would be 
able to diagnose my problem!

My app uses lots of libraries sort of daisy-chained into each other because 
some are dependent on others, and it looks like this. I don't know if this 
is the correct way to do this because I can't find sufficient documentation 
on it:
Library A is referenced in Library B, which is referenced in Library C, 
which is referenced in my app.

Furthermore, I only get this error when using ProGuard; commenting the 
proguard line in the project.properties makes the app build correctly. 
Setting the console output to verbose seemingly gives nothing of value, the 
final few lines are:
lots of stuff about new resources
[2012-01-04 20:05:12 - FormulaePro]   Writing symbols for class R.
[2012-01-04 20:05:12 - FormulaePro]   Writing symbols for class R.
[2012-01-04 20:05:12 - FormulaePro]   Writing symbols for class R.
[2012-01-04 20:05:12 - FormulaePro]   Writing symbols for class R.
[2012-01-04 20:05:14 - FormulaePro] Starting full Package build.
[2012-01-04 20:05:14 - FormulaePro] Skipping over Post Compiler.

I've cleaned the project, removed all things on the build path but Android 
x.x, fixed project properties, updated ProGuard (to 4.7) and everything, 
but I still can't get it to work. Please help!!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] IDM 6.07 Build 16 + Patch 32 64 bits + Serial Final

2012-01-05 Thread yssssn fh
IDM 6.07 Build 16 + Patch 32  64 bits + Serial Final

to download

http://adf.ly/4Y1V5

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: I require Code for Cloud printer

2012-01-05 Thread Doug
Please tell us more about the cloud print facility.

Doug

On Jan 2, 4:10 am, aru padam deepesh...@gmail.com wrote:
 Hi All,

        I want a help on creating an apps which support the cloud
 print
 facility.
 Please help me.

 --
 Thanks  Regards

 Deepesh

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: I require Code for Cloud printer

2012-01-05 Thread dEEPESH PPM
Hi   Doug,
*   *
*
*
*
*
*  Please refer the following links..*
*  1.*http://code.google.com/apis/cloudprint/docs/overview.html
  2.http
://www.google.com/cloudprint/learn/http://www.google.com/cloudprint/learn/
*
*
*Thanks and Regards*
*
*
*Deepesh*

On Thu, Jan 5, 2012 at 3:27 PM, Doug beafd...@gmail.com wrote:

 Please tell us more about the cloud print facility.

 Doug

 On Jan 2, 4:10 am, aru padam deepesh...@gmail.com wrote:
  Hi All,
 
 I want a help on creating an apps which support the cloud
  print
  facility.
  Please help me.
 
  --
  Thanks  Regards
 
  Deepesh

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: I require Code for Cloud printer

2012-01-05 Thread Oli Wright
Right, taking a look at the section there on Submitting Print Jobs, it 
appears there is already support for android (something about the GCP 
Intent).  Given you already have access to that information, it's not clear 
what help you're after.  Have you read this?  
http://www.catb.org/~esr/faqs/smart-questions.html

I'm going to assume you haven't, or if you have then you haven't understood 
it.  Read it again then come back with some more structured questions.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: I require Code for Cloud printer

2012-01-05 Thread Oli Wright
p.s. (and in no way taking away from the point that you need to read the 
smart questions doc) a quick Google found this which might help get you 
started.   http://www.slideshare.net/wolfpaulus/android-print-intent-8431140

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Script manager Code - How to run the shell script in the android

2012-01-05 Thread s.rawat
hi,
 I have  not been able to run a shell script in the  android phone
.Actually i have to change the mode to root by issuing su command, but when
the user changes to normal user($) to root (#) the further commands never
gets executed.
Following is my shell script which I have pushed into the /data/ folder
whcih is tryning to change the permission of test.text.

#!/bin/sh
su
cd /data
chmod 777 test.text


But the scripts fails to execute after su.i am doing it using teh system()
command in the native c code in the android application.

Plz suggest other way !
Rgds
saurabh




..pain is temporary.quitting lasts forever..

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: NFC Secure Element

2012-01-05 Thread Fernando Miguélez
Saurabh,

After reflashing my phone and verifying that the NFC toggle option was
available also in main Wireless Settings Screen, and after examining your
problem I reached the conclusion that your generated image does not include
NFC support, only the settings screen. I reviewed the patches and *there
was a bug. *The NFC was not enabled in building proccess because the wrong
file was patched (device.mk instead of device_base.mk). Sorry for the
incovenience.

I have just updated the patches and uploaded to
http://forum.xda-developers.com/showthread.php?p=17965091 . Could you
please check from the beginning that now the patches are completely correct
by rebuilding the image? It is safe to apply again over the patches files,
since the changes apply to another file.

On Thu, Jan 5, 2012 at 9:31 AM, s.rawat imsaurabhra...@gmail.com wrote:

 I did re-flashing from the patched Android Source and again the same
 thing.Here are the logcat logs on clicking the NFC Settings :

 D/dalvikvm(  298): GC_EXPLICIT freed 91K, 45% free 3160K/5703K, external
 4731K/5234K, paused 290ms
 I/ActivityManager(  106): Starting: Intent {
 act=android.intent.action.MAIN cmp=com.android.settings/.WirelessSettings }
 from pid 493
 D/dalvikvm(  493): GC_EXTERNAL_ALLOC freed 55K, 50% free 2933K/5831K,
 external 2878K/3220K, paused 20ms
 E/NFC (  493): could not retrieve NFC service
 I/ActivityManager(  106): Displayed
 com.android.settings/.WirelessSettings: +351ms
 D/dalvikvm(  493): GC_EXTERNAL_ALLOC freed 43K, 49% free 3022K/5831K,
 external 3171K/3241K, paused 21ms
 I/ActivityManager(  106): Starting: Intent {
 act=android.intent.action.MAIN cmp=com.android.settings/.nfc.NfcSettings }
 from pid 493
 I/ActivityManager(  106): Displayed com.android.settings/.nfc.NfcSettings:
 +261ms


 Any clue on this.
 Rgds,
 Saurabh



 ..pain is temporary.quitting lasts forever..



 2012/1/4 Fernando Miguélez fernando.migue...@gmail.com

 Well, options are enabled in cascade. The problem comes because the first
 option is not enabled. Besides, if you look at the Wireless Settings
 screen, there is only the NFC Settings option, but not the one that lets
 you enalbe/disable NFC directly from that screen. That is beacuse the Nfc
 service in not available. Connection to a computer in debug mode will draw
 some light.

 Instead of compiling the whole image again I suggest you to compile just
 the Nfc.apk system application and replace the original one. You must
 remount /system partition in read/write mode and overwrite the apk inside
 /system/app. Then you must kill the nfc service by means of DDMS view of
 the ADT (you must connnect the phone in debug mode and since you have
 compiled in userdebug mode you will see all the running proccesses). The
 service will restart automatically.

 When it comes to read/write the card by means of an external reader, any
 Mifare Classic 4K compatible RFID reader will do. If you try to access
 directly to the SE from an Android application I am afraid to disappoint
 you but that is not possible, at least I wasn't successful at it and nobody
 I know either. The reasons are well described in other posts and on
 stackoverflow.

 Regards


 On Wed, Jan 4, 2012 at 2:56 PM, s.rawat imsaurabhra...@gmail.com wrote:

 Thanks !
 I will also try from my side recompiling it.So you mean I should get the
 Check boxes enabled for
  *Only Card EmulationMode*
 and
  *Use External SE*

 My main aim is to write to the NFC card in card emulation mode so that
 it can be read by any Card Reader.is it possible after your patches are
 applied using teh android SDKs or do we have to write some native
 application.
 Rgds,
 Softy
 ..pain is temporary.quitting lasts forever..




 2012/1/4 Fernando Miguélez fernando.migue...@gmail.com

 Great work.

 Obviously there is something wrong with the compilation. Have you tried
 to connect in debug mode the phone to a computer with Android Development
 Tools and see what the traces look like. They may offer a clue. My
 suspicion is that NfcService is crashing. I will review my notes tomorrow
 if I find something different to the steps you followed to build the image.

 On Wed, Jan 4, 2012 at 9:17 AM, softy imsaurabhra...@gmail.com wrote:

 Hi All,
 Thanks Fernando Miguélez Palomo for posting the patches.I have applied
 it to 2.3.4-r1 Android gingerbread and compiled /flashed it on Samsung
 Nexus S and was able to see the NFC Settings changed(though i cant select
 them, they are disabled)
 I have blogged the whole steps 
 herehttp://techshek4u.blogspot.com/2012/01/applying-card-emulation-patch-to_03.html.Plz
  let me know if I miss something.

 @ Fernando Miguélez Palomo
 What next after that.How can i test this.Any source code or tool /card
 reader description will be enlightening.
 Rgds,
 softy

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to
 android-developers@googlegroups.com
 To 

[android-developers] Re: Unable to execute Bluetooth HDP Demo

2012-01-05 Thread Raul Ruiz
Hi Chenchen,

I'm trying connecting UA-767PBT.-C to android manager that i did and
it connect and disconnect all time.
I don't know how do you do connection to get read thread and get the
association request. If you get something tell me.
With Nonin i establish connection and i get 0 bytes all time.

Its problem of L2CAP. BlueZ developers in 4.97 version fixed bug.

On 4 ene, 23:35, Chenchen chenchen.zh...@gmail.com wrote:
 Dear Raul,

 I'm playing around with UA-767PBT-C, and find that I could be able to
 get the association request by printing log in read thread:
 01-04 13:46:49.652: I/BluetoothHDPService(7249):
 e200
 0032
 8000
 0001002a
 5079
 0026
 8000
 8000 //?? not 0xA0
 8000
 
 0080
 0008
 00091e8002be
 02bc
 0081  //?? 0x01, 0x00
 0100

 However, I don't know what is the right now to write association
 response back.

 On Dec 16 2011, 6:54 am, Raul Ruiz spekwh...@gmail.com wrote:







  Well we have same trouble. I have UA-767PBT-C device too and with HDP
  Demo doesnt connect.

  Im doing a program that receive ACL_CONNECT from device and opens a
  channel.
  In the program, Health service is use by android BT and the link is
  connected but device is in CONNECTING_STATE and then drops down.
  Using a BT sniffer like HCIDUMP, i watch that android BT doest send
  CONNECT RSP to device and I think that this is the problem.

  If you want some help tell me i will continue working in this.

  PD: Me too check this in linux, and it works finelly.I think that dbus
  library is different.

  On 16 dic, 12:29, jfernandez jorge.fernandez.gonza...@gmail.com
  wrote:

   On 16 dic, 11:31, Raul Ruiz spekwh...@gmail.com wrote:

Hi  Jorge,

   Hi Raul,

What device are you using? I have a same problem using Nonin 9560BT
pulseoximeter. It conects and disconnects and any data had received in
the Android.

   I'm working with a board which is able to simulate several biomedical
   devices.

   On the other hand, I have a real device (blood pressure monitor
   UA-767PBT-C). In that case, the device opens the HDP channel
   automatically with the smartphone which acts as sink. But the truth is
   that I don't see anything in the LogCat related to this channel.
   However, if I try opening the connection channel from the HDP Demo
   Application, I obtain the same error.

   Anyway, I have checked all of this in a Linux laptop using the same
   BlueZ stack that we have in Android and everything works fine.

Do you have any solution?

   Not yet. I'm expecting some feedback.

Thanks

On Dec 15, 6:30 pm, jfernandez jorge.fernandez.gonza...@gmail.com
wrote:

 Hi all,

 I'm executing the BluetoothHDPDemo [1]  (offered from Android 4.0
 Ice Cream Sandwich) in my Android smartphone. When I have registered
 the application in order to receive data, and I have paired the
 biomedical device with the smartphone, I try to open the channel
 connection and I can see that the device starts sending data to the
 smartphone. However, the smartphone is unable to open the channel
 connectionHDP.

 At the end of this message you can see the output obtained in the
 LogCat.

 Has anybody achieved to run successfully this sample about the use of
 theBluetoothHealth Profile API? Any ideas?

 Thanks. Regards.

 [1]http://developer.android.com/resources/samples/BluetoothHDP/index.html

 This is the log that I obtain:

 12-15 16:40:54.048: I/BluetoothHDPService(1105): connectChannel()
 12-15 16:40:54.068: D/BluetoothService(147): CONNECTION_STATE_CHANGE:
 00:80:25:14:A1:BC: 0 - 1
 12-15 16:40:55.169: D/ConnectivityService(147):
 handleInetConditionHoldEnd: net=1, condition=0, published condition=0
 12-15 16:40:59.393: D/BluetoothEventLoop(147): Device property
 changed: 00:80:25:14:A1:BC property: Connected value: true
 12-15 16:41:00.024: D/BluetoothEventLoop(147): Health Device :
 devicePath: 
 /org/bluez/278/hci0/dev_00_80_25_14_A1_BC:channelPath:/org/
 bluez/278/hci0/dev_00_80_25_14_A1_BC/chan3115:existstrue
 12-15 16:41:00.034: E/BluetoothService.cpp(147):
 getChannelApplicationNative
 12-15 16:41:00.044: E/bluetooth_common.cpp(147):
 dbus_func_args_timeout_valist: D-Bus error in Acquire:
 org.bluez.Error.HealthError (Cannot reconnect: MDL is not closed)
 12-15 16:41:00.044: E/BluetoothHealthProfileHandler(147): Error
 obtaining fd for channel:/org/bluez/278/hci0/dev_00_80_25_14_A1_BC/
 chan3115
 12-15 16:41:00.074: E/BluetoothService.cpp(147): destroyChannelNative
 12-15 16:41:00.074: E/BluetoothEventLoop.cpp(147):
 onHealthDeviceConnectionResult: D-Bus error:
 org.bluez.Error.HealthError (Mdl is not created)
 12-15 16:41:00.074: D/BluetoothEventLoop(147):
 onHealthDeviceConnectionResult 2 6001
 12-15 16:41:00.214: D/BluetoothEventLoop(147):
 onHealthDeviceConnectionResult 2 6000
 12-15 16:41:00.214: 

Re: [android-developers] Re: NFC Secure Element

2012-01-05 Thread s.rawat
Sure I will try that  and post the results !
..pain is temporary.quitting lasts forever..



2012/1/5 Fernando Miguélez fernando.migue...@gmail.com

 Saurabh,

 After reflashing my phone and verifying that the NFC toggle option was
 available also in main Wireless Settings Screen, and after examining your
 problem I reached the conclusion that your generated image does not include
 NFC support, only the settings screen. I reviewed the patches and *there
 was a bug. *The NFC was not enabled in building proccess because the
 wrong file was patched (device.mk instead of device_base.mk). Sorry for
 the incovenience.

 I have just updated the patches and uploaded to
 http://forum.xda-developers.com/showthread.php?p=17965091 . Could you
 please check from the beginning that now the patches are completely correct
 by rebuilding the image? It is safe to apply again over the patches files,
 since the changes apply to another file.

 On Thu, Jan 5, 2012 at 9:31 AM, s.rawat imsaurabhra...@gmail.com wrote:

 I did re-flashing from the patched Android Source and again the same
 thing.Here are the logcat logs on clicking the NFC Settings :

 D/dalvikvm(  298): GC_EXPLICIT freed 91K, 45% free 3160K/5703K, external
 4731K/5234K, paused 290ms
 I/ActivityManager(  106): Starting: Intent {
 act=android.intent.action.MAIN cmp=com.android.settings/.WirelessSettings }
 from pid 493
 D/dalvikvm(  493): GC_EXTERNAL_ALLOC freed 55K, 50% free 2933K/5831K,
 external 2878K/3220K, paused 20ms
 E/NFC (  493): could not retrieve NFC service
 I/ActivityManager(  106): Displayed
 com.android.settings/.WirelessSettings: +351ms
 D/dalvikvm(  493): GC_EXTERNAL_ALLOC freed 43K, 49% free 3022K/5831K,
 external 3171K/3241K, paused 21ms
 I/ActivityManager(  106): Starting: Intent {
 act=android.intent.action.MAIN cmp=com.android.settings/.nfc.NfcSettings }
 from pid 493
 I/ActivityManager(  106): Displayed
 com.android.settings/.nfc.NfcSettings: +261ms


 Any clue on this.
 Rgds,
 Saurabh



 ..pain is temporary.quitting lasts forever..



 2012/1/4 Fernando Miguélez fernando.migue...@gmail.com

 Well, options are enabled in cascade. The problem comes because the
 first option is not enabled. Besides, if you look at the Wireless Settings
 screen, there is only the NFC Settings option, but not the one that lets
 you enalbe/disable NFC directly from that screen. That is beacuse the Nfc
 service in not available. Connection to a computer in debug mode will draw
 some light.

 Instead of compiling the whole image again I suggest you to compile just
 the Nfc.apk system application and replace the original one. You must
 remount /system partition in read/write mode and overwrite the apk inside
 /system/app. Then you must kill the nfc service by means of DDMS view of
 the ADT (you must connnect the phone in debug mode and since you have
 compiled in userdebug mode you will see all the running proccesses). The
 service will restart automatically.

 When it comes to read/write the card by means of an external reader, any
 Mifare Classic 4K compatible RFID reader will do. If you try to access
 directly to the SE from an Android application I am afraid to disappoint
 you but that is not possible, at least I wasn't successful at it and nobody
 I know either. The reasons are well described in other posts and on
 stackoverflow.

 Regards


 On Wed, Jan 4, 2012 at 2:56 PM, s.rawat imsaurabhra...@gmail.comwrote:

 Thanks !
 I will also try from my side recompiling it.So you mean I should get
 the Check boxes enabled for
  *Only Card EmulationMode*
 and
  *Use External SE*

 My main aim is to write to the NFC card in card emulation mode so that
 it can be read by any Card Reader.is it possible after your patches are
 applied using teh android SDKs or do we have to write some native
 application.
 Rgds,
 Softy
 ..pain is temporary.quitting lasts forever..




 2012/1/4 Fernando Miguélez fernando.migue...@gmail.com

 Great work.

 Obviously there is something wrong with the compilation. Have you
 tried to connect in debug mode the phone to a computer with Android
 Development Tools and see what the traces look like. They may offer a 
 clue.
 My suspicion is that NfcService is crashing. I will review my notes
 tomorrow if I find something different to the steps you followed to build
 the image.

 On Wed, Jan 4, 2012 at 9:17 AM, softy imsaurabhra...@gmail.comwrote:

 Hi All,
 Thanks Fernando Miguélez Palomo for posting the patches.I have
 applied it to 2.3.4-r1 Android gingerbread and compiled /flashed it on
 Samsung Nexus S and was able to see the NFC Settings changed(though i 
 cant
 select them, they are disabled)
 I have blogged the whole steps 
 herehttp://techshek4u.blogspot.com/2012/01/applying-card-emulation-patch-to_03.html.Plz
  let me know if I miss something.

 @ Fernando Miguélez Palomo
 What next after that.How can i test this.Any source code or tool
 /card reader description will be enlightening.
 Rgds,
 softy

 --
 You 

Re: [android-developers] Mapview adding point

2012-01-05 Thread TreKing
On Thu, Jan 5, 2012 at 3:38 AM, Duygu Kahraman duygu.kahram...@gmail.comwrote:

 İ dont want to see
 http://codemagician.files.wordpress.com/2010/05/end-result-2.jpg?w=630


Then don't show the dialog ...

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Should I enable hardware acceleration?

2012-01-05 Thread sblantipodi
Really thanks for the answer Romain, I appreciate it.
To make a try I enabled the Force GPU rendering option in my Galaxy
Nexus.

When this option is disabled my software is lightning fast, when this
option is enabled
I see many slow down. As I told my software draw is UI using canvas
completely, why
hardware acceleration didn't help in this case?

Thanks.


On 4 Gen, 19:14, Romain Guy romain...@android.com wrote:
 drawRect and drawLine are hardware accelerated with anti aliasing.

 On Wed, Jan 4, 2012 at 7:14 AM, sblantipodi









 perini.dav...@dpsoftware.org wrote:
  As title.

  ICS give us the possibility to force the Hardware Acceleration on our
  app with a simple manifest attribute.
  The UI of my app is drawn using canvas, completely canvas. No android
  widget is used to draw the UI only canvas.

  This means that I have a lot of drawLine(), drawRect() ecc. ecc. As
  far as I know this primitives aren't accelerated by hardware
  acceleration and hardware acceleration disable the antialias on this
  methods.

  Saied that, should I enable the hardware acceleration? Is there any
  reason why enable it on a app like mine?

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 --
 Romain Guy
 Android framework engineer
 romain...@android.com

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Android Contact

2012-01-05 Thread TreKing
On Wed, Jan 4, 2012 at 11:47 PM, Krishnamoorthy Paavadai 
krishnamoor...@inoesis.com wrote:

 I m a beginner to android ..
 i would like to add birthday column in android contact...kindly
 suggest to me...


I suggest you read the documentation, try something, then come back with a
better question.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] my first android program ever I usually code in python

2012-01-05 Thread TreKing
On Thu, Jan 5, 2012 at 12:23 AM, aikidoguy clayrichmo...@gmail.com wrote:

 I apologize I understand this is a more advance list but I don't
 know where else to turn


https://www.google.com/


 can some one point me in a direction of some tutorials or examples of this
 ... thanks


https://www.google.com/

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Skia issue with BitmapRegionDecoder

2012-01-05 Thread sebastian_bugiu
I have 2 pngs. One has transparent parts the other doesn't. Decoding a
region in the one without transparency works while decoding a region
from the one with transparency gives

I/DEBUG   (   34): *** *** *** *** *** *** *** *** *** *** *** *** ***
*** *** ***
I/DEBUG   (   34): Build fingerprint: 'generic/sdk/generic:4.0.2/
ICS_MR0/229537:eng/test-keys'
I/DEBUG   (   34): pid: 652, tid: 652   headwayEnt.OfficeWork 
I/DEBUG   (   34): signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault
addr 4118a000
I/DEBUG   (   34):  r0 4118a000  r1 001a3280  r2 046d  r3 
I/DEBUG   (   34):  r4   r5   r6   r7 
I/DEBUG   (   34):  r8   r9   10   fp 
I/DEBUG   (   34):  ip 0101  sp be9ad378  lr 0018  pc
40011d40  cpsr 2010
I/DEBUG   (   34):  d0    d1  fff9006cb2b8
I/DEBUG   (   34):  d2  00060003  d3  3f00
I/DEBUG   (   34):  d4  4163e000  d5  4317
I/DEBUG   (   34):  d6  3ff0  d7  3faa
I/DEBUG   (   34):  d8    d9  
I/DEBUG   (   34):  d10   d11 
I/DEBUG   (   34):  d12   d13 
I/DEBUG   (   34):  d14   d15 
I/DEBUG   (   34):  scr 2013
I/DEBUG   (   34):
I/DEBUG   (   34):  #00  pc dd40  /system/lib/libc.so
(memcpy)
I/DEBUG   (   34):  #01  pc 000dd9e6  /system/lib/libskia.so
I/DEBUG   (   34):  #02  pc 000d86a2  /system/lib/libskia.so
(png_read_row)
I/DEBUG   (   34):  #03  pc 000d88dc  /system/lib/libskia.so
(png_read_rows)
I/DEBUG   (   34):  #04  pc 00049d6c  /system/lib/libskia.so
(_ZN17SkPNGImageDecoder14onDecodeRegionEP8SkBitmap7SkIRect)
I/DEBUG   (   34):  #05  pc 00045340  /system/lib/libskia.so
(_ZN14SkImageDecoder12decodeRegionEP8SkBitmap7SkIRectNS0_6ConfigE)
I/DEBUG   (   34):  #06  pc 0004cde4  /system/lib/libskia.so
(_ZN21SkBitmapRegionDecoder12decodeRegionEP8SkBitmap7SkIRectNS0_6ConfigEi)
I/DEBUG   (   34):  #07  pc 0006847a  /system/lib/
libandroid_runtime.so
I/DEBUG   (   34):  #08  pc 0001ec70  /system/lib/libdvm.so
(dvmPlatformInvoke)
I/DEBUG   (   34):  #09  pc 0005925a  /system/lib/libdvm.so
(_Z16dvmCallJNIMethodPKjP6JValuePK6MethodP6Thread)
I/DEBUG   (   34):  #10  pc 0004cc7c  /system/lib/libdvm.so
(_Z21dvmCheckCallJNIMethodPKjP6JValuePK6MethodP6Thread)
I/DEBUG   (   34):  #11  pc 00030ad0  /system/lib/libdvm.so
I/DEBUG   (   34):
I/DEBUG   (   34): code around pc:
I/DEBUG   (   34): 40011d20 e1a07427 e1877c08 e1a08428 e1888c09
I/DEBUG   (   34): 40011d30 e1a09429 e1899c0a e1a0a42a e18aac0b
I/DEBUG   (   34): 40011d40 e8a007f8 e1a0342b 2ae8 ea17
I/DEBUG   (   34): 40011d50 e491c004 e1a0400c e8b10fe0 f5d1f040
I/DEBUG   (   34): 40011d60 e2522020 2491c004 e1833404 e1a04c24
I/DEBUG   (   34):
I/DEBUG   (   34): code around lr:
I/DEBUG   (   34):     
I/DEBUG   (   34): 0010    
I/DEBUG   (   34): 0020    
I/DEBUG   (   34): 0030    
I/DEBUG   (   34): 0040    
I/DEBUG   (   34):
I/DEBUG   (   34): stack:
I/DEBUG   (   34): be9ad338  0008
I/DEBUG   (   34): be9ad33c  0008
I/DEBUG   (   34): be9ad340  0008
I/DEBUG   (   34): be9ad344  0004
I/DEBUG   (   34): be9ad348  0004
I/DEBUG   (   34): be9ad34c  
I/DEBUG   (   34): be9ad350  
I/DEBUG   (   34): be9ad354  071f
I/DEBUG   (   34): be9ad358  0641
I/DEBUG   (   34): be9ad35c  00f5
I/DEBUG   (   34): be9ad360  400d7920  /system/lib/libz.so
I/DEBUG   (   34): be9ad364  
I/DEBUG   (   34): be9ad368  00222a90
I/DEBUG   (   34): be9ad36c  00222850
I/DEBUG   (   34): be9ad370  df0027ad
I/DEBUG   (   34): be9ad374  
I/DEBUG   (   34): #00 be9ad378  0640
I/DEBUG   (   34): be9ad37c  41189e70
I/DEBUG   (   34): be9ad380  41189e70
I/DEBUG   (   34): be9ad384  0001
I/DEBUG   (   34): be9ad388  406c7707  /system/lib/libskia.so
I/DEBUG   (   34): be9ad38c  001de830
I/DEBUG   (   34): be9ad390  00ff
I/DEBUG   (   34): be9ad394  41189e70
I/DEBUG   (   34): be9ad398  001de6f8
I/DEBUG   (   34): be9ad39c  406959e9  /system/lib/libskia.so
I/DEBUG   (   34): #01 be9ad3a0  0001
I/DEBUG   (   34): be9ad3a4  
I/DEBUG   (   34): be9ad3a8  
I/DEBUG   (   34): be9ad3ac  41189e70
I/DEBUG   (   34): be9ad3b0  406c7733  /system/lib/libskia.so
I/DEBUG   (   34): be9ad3b4  001de6f8
I/DEBUG   (   34): be9ad3b8  
I/DEBUG   (   34): be9ad3bc  41189e70
I/DEBUG   (   34): be9ad3c0  406c7733  /system/lib/libskia.so
I/DEBUG   (   34): be9ad3c4  406c7733  

[android-developers] Pause button on logcat

2012-01-05 Thread Christopher Van Kirk
Hey that new pause button on LogCat is a great idea with a lousy 
implementation. Love the ability to pause the logging, but it shouldn't 
change its state by itself! I'm constantly having to uncheck the damn 
thing because it turned itself on.



--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Update view of installed apps without reloading

2012-01-05 Thread TreKing
On Wed, Jan 4, 2012 at 8:06 PM, galapogos gois...@gmail.com wrote:

 1. getInstalledPackages seem to take quite a bit of time to detect and
 display all apps(about 8-10s for 200+ apps). Is it possible to make
 this faster? Titanium Backup seems to list all apps instantaneously
 when I tap the Backup/Restore tab. Android system's own Manage
 Applications also seems to be much quicker at displaying the apps.


Caching.


 2. Like Manage Applications, I would like to have a way to cull the
 list so that I can in various tabs I can display apps based on their
 properties, e.g. system vs user app, launchable vs non-launchable,
 etc. I know how to do this via the applicationInfo.flags, but how do I
 do this without running getInstalledPackages in the tab activity and
 incurring the detection phase all over again? How can I pass the List
 from 1 tab to another?


The Tabs should be part of the same Activity, which would have one list
they both access.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Using sd-card in 4.0 emulator

2012-01-05 Thread Dirk Vranckaert
First of all happy holidays and happy 2012 for all of you!

I'm trying to write something to my SD-card, It works in 2.x. But in
the 4.0 emulator I cannot write anything to internal memory or SD-
card.
In the AVD settings I added a 50MB SD card.

But my code already returns false for
Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED);
When going in the android settings of the emulator I cannot see the SD
memory, only internal memory...

Any idea why the SD card is not mounted or the
getExternalStorageState() does not equal to MEDIA_MOUNTED?

Kr,

Dirk

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Uri of Image

2012-01-05 Thread aru padam
Hi all,

 I have a bitmap image from the data base. Any one could help me
to create an uri of this image.

Thanks and Regards
Deepesh

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Bevel effet on Buttons

2012-01-05 Thread aru padam
Hi all,

   Please help me to create bevel effects on buttons...

Thanks and Regards
Deepesh

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Using sd-card in 4.0 emulator

2012-01-05 Thread Mark Murphy
On Thu, Jan 5, 2012 at 9:14 AM, Dirk Vranckaert
dirkvrancka...@gmail.com wrote:
 But my code already returns false for
 Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED);
 When going in the android settings of the emulator I cannot see the SD
 memory, only internal memory...

Add a virtual SD card to your AVD via the AVD Manager. With that in
place, you will see USB storage with your amount in the Storage
portion of Settings.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Using sd-card in 4.0 emulator

2012-01-05 Thread Dirk Vranckaert
Mark,

That's what I did. In the SD Card part of the add/edit AVD screen
I've entered the size (100MB). I even tried added the hardware
parameter hw.sdCard: yes.
But none of these things work..

Kr,

Dirk

On Jan 5, 3:19 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Thu, Jan 5, 2012 at 9:14 AM, Dirk Vranckaert

 dirkvrancka...@gmail.com wrote:
  But my code already returns false for
  Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED);
  When going in the android settings of the emulator I cannot see the SD
  memory, only internal memory...

 Add a virtual SD card to your AVD via the AVD Manager. With that in
 place, you will see USB storage with your amount in the Storage
 portion of Settings.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Regarding Transfer Files.

2012-01-05 Thread TreKing
On Wed, Jan 4, 2012 at 12:35 AM, yogendra G yogi2...@gmail.com wrote:

 I require sample code for transfering pics from phone to pc through
 bluetooth. Please help me out in this


I require blank check for transferring monies from me to dealer through
shady means. Please help me out in this.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] need help on text rotation

2012-01-05 Thread TreKing
On Wed, Jan 4, 2012 at 2:27 AM, chowdary nani naveenneeli...@gmail.comwrote:

 my problem is to change the angle of text on key code event the text
 should
 be changed either counter clock wise or anti clock wise.
 i need help on changing the angle of text dynamically


You're just repeating your original post which was not very clear.
You didn't address a single one of Jim's critiques original question.
You're not going to get very far if you don't explain specifically what you
need help with.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Using sd-card in 4.0 emulator

2012-01-05 Thread Mark Murphy
On Thu, Jan 5, 2012 at 9:25 AM, Dirk Vranckaert
dirkvrancka...@gmail.com wrote:
 That's what I did. In the SD Card part of the add/edit AVD screen
 I've entered the size (100MB). I even tried added the hardware
 parameter hw.sdCard: yes.
 But none of these things work..

They work in my ICS emulator. Make sure you are on the latest edition
of the tools and platform-tools.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Using sd-card in 4.0 emulator

2012-01-05 Thread Dirk Vranckaert
I did the check and am running on the latest versions.

But I noticed something strange. When I open my AVD manager and want
to create a new AVD it's not created on disk (although I can see the
AVD and all it's preferences in AVD application). I tried deleting all
AVD's and manually deleted the .android directory in c:\Users
\MY_USERNAME\, then opened the AVD manager again and added an AVD. But
now it comes... The AVD is not added in the application. What can I do
that I don't have re-install the entire SDK and still can fix my AVD
manager...?

Kr,

Dirk

On Jan 5, 3:33 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Thu, Jan 5, 2012 at 9:25 AM, Dirk Vranckaert

 dirkvrancka...@gmail.com wrote:
  That's what I did. In the SD Card part of the add/edit AVD screen
  I've entered the size (100MB). I even tried added the hardware
  parameter hw.sdCard: yes.
  But none of these things work..

 They work in my ICS emulator. Make sure you are on the latest edition
 of the tools and platform-tools.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] AppWidgets Disappearing from list in ICS

2012-01-05 Thread Ash McConnell
Hi Kostya,

Sorry for the late reply, it has been a hectic holiday period.

I couldn't get it to cause any problems in the emulator or any warnings on 
my Android 2.2 device (Motorola Defy)

I got the user to send me a log file using a logfile capture app.  There 
was one exception of interest: -


12-21 12:24:46.919 E/AndroidRuntime(21552): FATAL EXCEPTION: main
12-21 12:24:46.919 E/AndroidRuntime(21552): java.lang.RuntimeException: 
Failure delivering result ResultInfo{who=null, request=5, result=-1, 
data=Intent { (has extras) }} to activity 
{com.android.launcher/com.android.launcher2.Launcher}: 
java.lang.NullPointerException
12-21 12:24:46.919 E/AndroidRuntime(21552): at android.app.ActivityThread.
deliverResults(ActivityThread.java:2976)
12-21 12:24:46.919 E/AndroidRuntime(21552): at android.app.ActivityThread.
handleSendResult(ActivityThread.java:3019)
12-21 12:24:46.919 E/AndroidRuntime(21552): at android.app.ActivityThread.
access$1100(ActivityThread.java:122)
12-21 12:24:46.919 E/AndroidRuntime(21552): at android.app.ActivityThread$H.
handleMessage(ActivityThread.java:1176)
12-21 12:24:46.919 E/AndroidRuntime(21552): at android.os.Handler.
dispatchMessage(Handler.java:99)
12-21 12:24:46.919 E/AndroidRuntime(21552): at 
android.os.Looper.loop(Looper.java:137)
12-21 12:24:46.919 E/AndroidRuntime(21552): at android.app.ActivityThread.
main(ActivityThread.java:4340)
12-21 12:24:46.919 E/AndroidRuntime(21552): at 
java.lang.reflect.Method.invokeNative(Native 
Method)
12-21 12:24:46.919 E/AndroidRuntime(21552): at java.lang.reflect.Method.
invoke(Method.java:511)
12-21 12:24:46.919 E/AndroidRuntime(21552): at com.android.internal.os.
ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
12-21 12:24:46.919 E/AndroidRuntime(21552): at com.android.internal.os.
ZygoteInit.main(ZygoteInit.java:551)
12-21 12:24:46.919 E/AndroidRuntime(21552): at 
dalvik.system.NativeStart.main(Native 
Method)
12-21 12:24:46.919 E/AndroidRuntime(21552): Caused by: 
java.lang.NullPointerException
12-21 12:24:46.919 E/AndroidRuntime(21552): at com.android.launcher2.
Launcher.getSpanForWidget(Launcher.java:941)
12-21 12:24:46.919 E/AndroidRuntime(21552): at com.android.launcher2.
Launcher.completeAddAppWidget(Launcher.java:964)
12-21 12:24:46.919 E/AndroidRuntime(21552): at com.android.launcher2.
Launcher.completeAdd(Launcher.java:492)
12-21 12:24:46.919 E/AndroidRuntime(21552): at com.android.launcher2.
Launcher.onActivityResult(Launcher.java:528)
12-21 12:24:46.919 E/AndroidRuntime(21552): at android.app.Activity.
dispatchActivityResult(Activity.java:4649)
12-21 12:24:46.919 E/AndroidRuntime(21552): at android.app.ActivityThread.
deliverResults(ActivityThread.java:2972)
12-21 12:24:46.919 E/AndroidRuntime(21552): ... 11 more
12-21 12:24:46.919 W/ActivityManager(  176):   Force finishing activity 
com.android.launcher/com.android.launcher2.Launcher


Here is the relevant file 
http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android-apps/4.0.1_r1/com/android/launcher2/Launcher.java?av=f
 

It seems like it can't get the appWidgetInfo object on line 959.  I have 
checked my AppWidgetProviderInfo XML and it seems to comply to the 
guidelines/rules.  I'm not sure what I've done wrong here

Any suggestions would be welcome.
All the best,
Ash




-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Using sd-card in 4.0 emulator

2012-01-05 Thread Dirk Vranckaert
Ok I found the problem,
the my documents directory is set to be in D:\DVRANCKA . So when the
AVD manager creates an AVD it's places under D:\DVRANCKA\.android\avd
\...However when I want to launch an AVD it's looked for in the C:\user
\DVRANCKA\.android\avd\...
Is there somewhere I can configure that for launching he should also
look at D:\DVRANCKA?

On Jan 5, 3:42 pm, Dirk Vranckaert dirkvrancka...@gmail.com wrote:
 I did the check and am running on the latest versions.

 But I noticed something strange. When I open my AVD manager and want
 to create a new AVD it's not created on disk (although I can see the
 AVD and all it's preferences in AVD application). I tried deleting all
 AVD's and manually deleted the .android directory in c:\Users
 \MY_USERNAME\, then opened the AVD manager again and added an AVD. But
 now it comes... The AVD is not added in the application. What can I do
 that I don't have re-install the entire SDK and still can fix my AVD
 manager...?

 Kr,

 Dirk

 On Jan 5, 3:33 pm, Mark Murphy mmur...@commonsware.com wrote:







  On Thu, Jan 5, 2012 at 9:25 AM, Dirk Vranckaert

  dirkvrancka...@gmail.com wrote:
   That's what I did. In the SD Card part of the add/edit AVD screen
   I've entered the size (100MB). I even tried added the hardware
   parameter hw.sdCard: yes.
   But none of these things work..

  They work in my ICS emulator. Make sure you are on the latest edition
  of the tools and platform-tools.

  --
  Mark Murphy (a Commons 
  Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

  Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Using sd-card in 4.0 emulator

2012-01-05 Thread Mark Murphy
On Thu, Jan 5, 2012 at 9:42 AM, Dirk Vranckaert
dirkvrancka...@gmail.com wrote:
 I did the check and am running on the latest versions.

 But I noticed something strange. When I open my AVD manager and want
 to create a new AVD it's not created on disk (although I can see the
 AVD and all it's preferences in AVD application). I tried deleting all
 AVD's and manually deleted the .android directory in c:\Users
 \MY_USERNAME\, then opened the AVD manager again and added an AVD. But
 now it comes... The AVD is not added in the application. What can I do
 that I don't have re-install the entire SDK and still can fix my AVD
 manager...?

Beats me. You're running Windows, which is not my cup of proverbial tea.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] is it possible to set text color for individual items in a list view?

2012-01-05 Thread John Davis
Hello

I have a listview with items in it.  I would like to set certain line
items to be a certain color.  Is this possible?

-- 
John F. Davis

独树一帜

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Using sd-card in 4.0 emulator

2012-01-05 Thread Dirk Vranckaert
I prefer Mac (or even Linux) but my employer enforces me to use
Windows so yeah... :-)

But here's what I just found (posted it already):

Ok I found the problem,
the my documents directory is set to be in D:\DVRANCKA . So when
the
AVD manager creates an AVD it's places under D:\DVRANCKA\.android\avd
\...However when I want to launch an AVD it's looked for in the C:
\user
\DVRANCKA\.android\avd\...
Is there somewhere I can configure that for launching he should also
look at D:\DVRANCKA?

On Jan 5, 3:47 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Thu, Jan 5, 2012 at 9:42 AM, Dirk Vranckaert

 dirkvrancka...@gmail.com wrote:
  I did the check and am running on the latest versions.

  But I noticed something strange. When I open my AVD manager and want
  to create a new AVD it's not created on disk (although I can see the
  AVD and all it's preferences in AVD application). I tried deleting all
  AVD's and manually deleted the .android directory in c:\Users
  \MY_USERNAME\, then opened the AVD manager again and added an AVD. But
  now it comes... The AVD is not added in the application. What can I do
  that I don't have re-install the entire SDK and still can fix my AVD
  manager...?

 Beats me. You're running Windows, which is not my cup of proverbial tea.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Bevel effet on Buttons

2012-01-05 Thread Streets Of Boston
Honestly, based on the other posts you make on this forum, it looks like 
you want other people to do the work for you.
You won't get much help this way.

Try to figure it out yourself, figure out the basics and go from there. 
Google it. Go to developers.android.com, etc. Take a look at the 
API-demos/samples that come with the SDK. 
And if you get stuck on *specifics*, then ask for help on this or other 
forums.


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] changing ImageButton image

2012-01-05 Thread TreKing
On Wed, Jan 4, 2012 at 12:06 AM, m l debar...@gmail.com wrote:

 The first Image change ( step 2)  never happens


Yes it does, but you're doing it all in the main thread, so you never see
it because you don't give the system a chance to draw your changes.

You need to read up on and understand threading, the main / GUI thread, and
how to run timed tasks. See the Handler class for starters.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] is it possible to set text color for individual items in a list view?

2012-01-05 Thread Mark Murphy
On Thu, Jan 5, 2012 at 9:50 AM, John Davis davi...@gmail.com wrote:
 I have a listview with items in it.  I would like to set certain line
 items to be a certain color.  Is this possible?

Override getView() of your ArrayAdapter (or bindView() of your
CursorAdapter) and put in the logic to set the color as part of
configuring that row.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] is it possible to set text color for individual items in a list view?

2012-01-05 Thread John Davis
Hello Mark,

Thanks for your response.  I tried various things already.  Here is
what kind of made sense but did not work:

 // Set the color based upon the faction.
 View rowView;
 int listCount;
 View fooView;

listCount = adapter.getCount();
for (int i=0;inumRows;i++) {
  rowView = adapter.getView(i, null, theList); // theList is the
listview, adapter is its ArrayAdapter
  ((TextView)rowView).setTextColor(0x64788e);
  if (rowView != null) {
if (c.getString(1).equals(foo)) {
  ((TextView)rowView).setTextColor(0x64788e);   
}
  }
}



On Thu, Jan 5, 2012 at 9:59 AM, Mark Murphy mmur...@commonsware.com wrote:
 On Thu, Jan 5, 2012 at 9:50 AM, John Davis davi...@gmail.com wrote:
 I have a listview with items in it.  I would like to set certain line
 items to be a certain color.  Is this possible?

 Override getView() of your ArrayAdapter (or bindView() of your
 CursorAdapter) and put in the logic to set the color as part of
 configuring that row.

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 Warescription: Three Android Books, Plus Updates, One Low Price!

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



-- 
John F. Davis

独树一帜

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] is it possible to set text color for individual items in a list view?

2012-01-05 Thread Mark Murphy
Your primary job is to get the color right when the row is created.
That involves what I wrote:

 Override getView() of your ArrayAdapter (or bindView() of your
 CursorAdapter) and put in the logic to set the color as part of
 configuring that row.

Now, if in addition to that, the color change needs to happen in real
time for an existing already-displayed row, then you will need to do
something reminiscent of what you have below. However, rather than
calling getView(), you need to get the *existing child* of the
ListView.

On Thu, Jan 5, 2012 at 10:08 AM, John Davis davi...@gmail.com wrote:
 Hello Mark,

 Thanks for your response.  I tried various things already.  Here is
 what kind of made sense but did not work:

  // Set the color based upon the faction.
  View rowView;
  int listCount;
  View fooView;

 listCount = adapter.getCount();
 for (int i=0;inumRows;i++) {
  rowView = adapter.getView(i, null, theList); // theList is the
 listview, adapter is its ArrayAdapter
  ((TextView)rowView).setTextColor(0x64788e);
  if (rowView != null) {
    if (c.getString(1).equals(foo)) {
      ((TextView)rowView).setTextColor(0x64788e);
    }
  }
 }



 On Thu, Jan 5, 2012 at 9:59 AM, Mark Murphy mmur...@commonsware.com wrote:
 On Thu, Jan 5, 2012 at 9:50 AM, John Davis davi...@gmail.com wrote:
 I have a listview with items in it.  I would like to set certain line
 items to be a certain color.  Is this possible?


 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 Warescription: Three Android Books, Plus Updates, One Low Price!

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



 --
 John F. Davis

 独树一帜

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] is it possible to set text color for individual items in a list view?

2012-01-05 Thread John Davis
Hmm.

Ok, I maybe over my head.  I guess the first thing to do is subclass
array adapter as you said first so I can override its getView call.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] is it possible to set text color for individual items in a list view?

2012-01-05 Thread Mark Murphy
On Thu, Jan 5, 2012 at 10:19 AM, John Davis davi...@gmail.com wrote:
 Ok, I maybe over my head.  I guess the first thing to do is subclass
 array adapter as you said first so I can override its getView call.

Right. Here is a free excerpt from one of my books that goes through
that process:

http://commonsware.com/Android/excerpt.pdf

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] is it possible to set text color for individual items in a list view?

2012-01-05 Thread John Davis
Hello Mark,

Ok. Thanks.  I've managed to create my own MyAdapter.  I'm guessing, I
need to override the getView routine there now.  The code still works
using the custom adapter. It was a struggle ot get the constructor
right.

I'll look at your pdf in a bit. Let me struggle with the concept of
overriding getView for a bit.

John

On Thu, Jan 5, 2012 at 10:26 AM, Mark Murphy mmur...@commonsware.com wrote:
 On Thu, Jan 5, 2012 at 10:19 AM, John Davis davi...@gmail.com wrote:
 Ok, I maybe over my head.  I guess the first thing to do is subclass
 array adapter as you said first so I can override its getView call.

 Right. Here is a free excerpt from one of my books that goes through
 that process:

 http://commonsware.com/Android/excerpt.pdf

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 Warescription: Three Android Books, Plus Updates, One Low Price!

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



-- 
John F. Davis

独树一帜

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] is it possible to set text color for individual items in a list view?

2012-01-05 Thread John Davis
Well,

I have this in my main class:
// Build the listview
MyAdapterString adapter = new
MyAdapterString(this,android.R.layout.simple_list_item_1, values);
//  ArrayAdapterString adapter = new
ArrayAdapterString(this,android.R.layout.simple_list_item_1,
values);

theList.setAdapter(adapter);
theList.setOnItemClickListener(new MyOnItemClickListener(this));

// Set the color based upon the string value
View rowView;
int listCount;
View fooView;
c.moveToFirst();
listCount = adapter.getCount();
for (int i=0;inumRows;i++) {
rowView = adapter.getView(i, null, theList);
((TextView)rowView).setTextColor(0x64788e);
/*
if (rowView != null) {
if (c.getString(1).equals(foo)) {
((TextView)rowView).setTextColor(0x64788e); 

} else {
((TextView)rowView).setTextColor(0x7b2325); 

}
}
*/
c.moveToNext();
}

And in my derived adapter, I have this:

public class MyAdapterT extends ArrayAdapterT {

public MyAdapter(Context context, int textViewResourceId, T[] objects) {
super(context, textViewResourceId, objects);
}
// context, int, T[]

@Override
public View getView(int position, View convertView, ViewGroup parent) {
// TODO Auto-generated method stub
TextView rowView;
rowView = (TextView) super.getView(position, convertView, parent);
((TextView)rowView).setTextColor(0x64788e);
return super.getView(position, convertView, parent);
}


The result from hacking around is that the list has invisible values.
I guess its time to look at your pdf. lol

John

2012/1/5 John Davis davi...@gmail.com:
 Hello Mark,

 Ok. Thanks.  I've managed to create my own MyAdapter.  I'm guessing, I
 need to override the getView routine there now.  The code still works
 using the custom adapter. It was a struggle ot get the constructor
 right.

 I'll look at your pdf in a bit. Let me struggle with the concept of
 overriding getView for a bit.

 John

 On Thu, Jan 5, 2012 at 10:26 AM, Mark Murphy mmur...@commonsware.com wrote:
 On Thu, Jan 5, 2012 at 10:19 AM, John Davis davi...@gmail.com wrote:
 Ok, I maybe over my head.  I guess the first thing to do is subclass
 array adapter as you said first so I can override its getView call.

 Right. Here is a free excerpt from one of my books that goes through
 that process:

 http://commonsware.com/Android/excerpt.pdf

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 Warescription: Three Android Books, Plus Updates, One Low Price!

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



 --
 John F. Davis

 独树一帜



-- 
John F. Davis

独树一帜

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] How to send onPreviewframe jpeg image continuously to server??????

2012-01-05 Thread muhammad.ume...@hotmail.com
hi,
 I am creating an app to send onPreviewframe image byte array
continuously to server, but only on image is transfer to server. I am
stuck here please tell me what i have to do for this situation.

//here is my  android onpreviewframe code///

public void onPreviewFrame(byte[] data, Camera camera) {


Camera.Parameters parameters = camera.getParameters();
int format = parameters.getPreviewFormat();

 //YUV formats require more conversion
if (format == ImageFormat.NV21 /*|| format ==
ImageFormat.YUY2 || format == ImageFormat.NV16*/)
{
int w = parameters.getPreviewSize().width;
int h = parameters.getPreviewSize().height;
// Get the YuV image
YuvImage yuv_image = new YuvImage(data, format, w, h,
null);
// Convert YuV to Jpeg
Rect rect = new Rect(0, 0, w, h);
ByteArrayOutputStream output_stream = new
ByteArrayOutputStream();
yuv_image.compressToJpeg(rect, 100, output_stream);
byte[] byt=output_stream.toByteArray();
try {
  obj.writeObject(byt);
  obj.flush();
  obj.close();

} catch (FileNotFoundException e) { //
10
e.printStackTrace();
 } catch (IOException e) {
e.printStackTrace();
 } finally {
 }

 Preview.this.invalidate();
}


Thanks and Regards

umer

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] is it possible to set text color for individual items in a list view?

2012-01-05 Thread John Davis
I changed the getview code so it only calls the super code once and
returns the rowView as you did.


 public class MyAdapterT extends ArrayAdapterT {

        public MyAdapter(Context context, int textViewResourceId, T[] objects) 
 {
                super(context, textViewResourceId, objects);
        }
        // context, int, T[]

        @Override
        public View getView(int position, View convertView, ViewGroup parent) {
                // TODO Auto-generated method stub
                View rowView;
            rowView = super.getView(position, convertView, parent);
            ((TextView)rowView).setTextColor(0x64788e);
                return rowView;
        }



And removed the code in the main class to dork with the view.  It is
still invisible text.  I was assuming this code would make all the
text items be red in color.  I really want to be able to set certain
lines to red and others to blue.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] is it possible to set text color for individual items in a list view?

2012-01-05 Thread Mark Murphy
If the TextView is truly invisible, you need to make it visible, using
setVisibility().

Otherwise, use Hierarchy View to examine your UI and see what is going on:

http://developer.android.com/guide/developing/debugging/debugging-ui.html

On Thu, Jan 5, 2012 at 10:57 AM, John Davis davi...@gmail.com wrote:
 I changed the getview code so it only calls the super code once and
 returns the rowView as you did.


 public class MyAdapterT extends ArrayAdapterT {

        public MyAdapter(Context context, int textViewResourceId, T[] 
 objects) {
                super(context, textViewResourceId, objects);
        }
        // context, int, T[]

        @Override
        public View getView(int position, View convertView, ViewGroup parent) 
 {
                // TODO Auto-generated method stub
                View rowView;
            rowView = super.getView(position, convertView, parent);
            ((TextView)rowView).setTextColor(0x64788e);
                return rowView;
        }



 And removed the code in the main class to dork with the view.  It is
 still invisible text.  I was assuming this code would make all the
 text items be red in color.  I really want to be able to set certain
 lines to red and others to blue.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] is it possible to set text color for individual items in a list view?

2012-01-05 Thread John Davis
This also does not work:
public View getView(int position, View convertView, ViewGroup parent) {
// TODO Auto-generated method stub
View rowView;
rowView = (TextView) super.getView(position, convertView, parent);
//  ((TextView)rowView).setTextColor(0x64788e);
rowView.setBackgroundColor(0x64788e);
return rowView;
}

On Thu, Jan 5, 2012 at 10:57 AM, John Davis davi...@gmail.com wrote:
 I changed the getview code so it only calls the super code once and
 returns the rowView as you did.


 public class MyAdapterT extends ArrayAdapterT {

public MyAdapter(Context context, int textViewResourceId, T[] 
 objects) {
super(context, textViewResourceId, objects);
}
// context, int, T[]

@Override
public View getView(int position, View convertView, ViewGroup parent) 
 {
// TODO Auto-generated method stub
View rowView;
rowView = super.getView(position, convertView, parent);
((TextView)rowView).setTextColor(0x64788e);
return rowView;
}



 And removed the code in the main class to dork with the view.  It is
 still invisible text.  I was assuming this code would make all the
 text items be red in color.  I really want to be able to set certain
 lines to red and others to blue.



-- 
John F. Davis

独树一帜

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] AppWidgets Disappearing from list in ICS

2012-01-05 Thread Kostya Vasilyev
The code in Launcher looks up the widget info object by the widget id. Does
your code properly handle that?

Here is my code from a widget config activity:

Intent resultValue = new Intent();
resultValue.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, mAppWidgetId);
setResult(RESULT_OK, resultValue);
finish();

Where mAppWidgetId is initialized inside onCreate:

Intent intent = getIntent();
Bundle extras = intent.getExtras();
if (extras != null) {
mAppWidgetId = extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID,
AppWidgetManager.INVALID_APPWIDGET_ID);
}

FWIW, I can't get your widget to crash on a Galaxy Nexus with 4.0.1, tried
both the switcher bar and the clock, but I did get a bunch of these in the
logcat when creating the clock:

01-05 19:59:28.047 W/ResourceType(30663): No known package when getting
value for resource number 0x
01-05 19:59:28.055 W/ImageView(30663): Unable to find resource: -1
01-05 19:59:28.055 W/ImageView(30663):
android.content.res.Resources$NotFoundException: Resource ID #0x
01-05 19:59:28.055 W/ImageView(30663): at
android.content.res.Resources.getValue(Resources.java:1019)
01-05 19:59:28.055 W/ImageView(30663): at
android.content.res.Resources.getDrawable(Resources.java:663)
01-05 19:59:28.055 W/ImageView(30663): at
android.widget.ImageView.resolveUri(ImageView.java:542)
01-05 19:59:28.055 W/ImageView(30663): at
android.widget.ImageView.setImageResource(ImageView.java:315)
01-05 19:59:28.055 W/ImageView(30663): at
sirocco.widgets.AwesomeClockActivity.setBackground(AwesomeClockActivity.java:672)
01-05 19:59:28.055 W/ImageView(30663): at
sirocco.widgets.AwesomeClockActivity.skinExamples(AwesomeClockActivity.java:531)
01-05 19:59:28.055 W/ImageView(30663): at
sirocco.widgets.AwesomeClockActivity.setCurrentSkin(AwesomeClockActivity.java:747)
01-05 19:59:28.055 W/ImageView(30663): at
sirocco.widgets.AwesomeClockActivity.onCreate(AwesomeClockActivity.java:379)
01-05 19:59:28.055 W/ImageView(30663): at
android.app.Activity.performCreate(Activity.java:4465)
01-05 19:59:28.055 W/ImageView(30663): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
01-05 19:59:28.055 W/ImageView(30663): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1919)
01-05 19:59:28.055 W/ImageView(30663): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1980)
01-05 19:59:28.055 W/ImageView(30663): at
android.app.ActivityThread.access$600(ActivityThread.java:122)
01-05 19:59:28.055 W/ImageView(30663): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1146)
01-05 19:59:28.055 W/ImageView(30663): at
android.os.Handler.dispatchMessage(Handler.java:99)
01-05 19:59:28.055 W/ImageView(30663): at
android.os.Looper.loop(Looper.java:137)
01-05 19:59:28.055 W/ImageView(30663): at
android.app.ActivityThread.main(ActivityThread.java:4340)
01-05 19:59:28.055 W/ImageView(30663): at
java.lang.reflect.Method.invokeNative(Native Method)
01-05 19:59:28.055 W/ImageView(30663): at
java.lang.reflect.Method.invoke(Method.java:511)
01-05 19:59:28.055 W/ImageView(30663): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
01-05 19:59:28.055 W/ImageView(30663): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
01-05 19:59:28.055 W/ImageView(30663): at
dalvik.system.NativeStart.main(Native Method)

Hope this helps.

-- Kostya

5 января 2012 г. 18:43 пользователь Ash McConnell
ash.mcconn...@gmail.comнаписал:

 Hi Kostya,

 Sorry for the late reply, it has been a hectic holiday period.

 I couldn't get it to cause any problems in the emulator or any warnings on
 my Android 2.2 device (Motorola Defy)

 I got the user to send me a log file using a logfile capture app.  There
 was one exception of interest: -

 
 12-21 12:24:46.919 E/AndroidRuntime(21552): FATAL EXCEPTION: main
 12-21 12:24:46.919 E/AndroidRuntime(21552): java.lang.RuntimeException:
 Failure delivering result ResultInfo{who=null, request=5, result=-1,
 data=Intent { (has extras) }} to activity 
 {com.android.launcher/com.**android.launcher2.Launcher}:
 java.lang.NullPointerException
 12-21 12:24:46.919 E/AndroidRuntime(21552): at android.app.ActivityThread.
 **deliverResults(ActivityThread.**java:2976)
 12-21 12:24:46.919 E/AndroidRuntime(21552): at android.app.ActivityThread.
 **handleSendResult(**ActivityThread.java:3019)
 12-21 12:24:46.919 E/AndroidRuntime(21552): at android.app.ActivityThread.
 **access$1100(ActivityThread.**java:122)
 12-21 12:24:46.919 E/AndroidRuntime(21552): at
 android.app.ActivityThread$H.**handleMessage(ActivityThread.**java:1176)
 12-21 12:24:46.919 E/AndroidRuntime(21552): at android.os.Handler.**
 dispatchMessage(Handler.java:**99)
 12-21 12:24:46.919 E/AndroidRuntime(21552): at
 android.os.Looper.loop(Looper.**java:137)
 12-21 12:24:46.919 E/AndroidRuntime(21552): at android.app.ActivityThread.
 **main(ActivityThread.java:4340)
 12-21 12:24:46.919 E/AndroidRuntime(21552): at 
 

Re: [android-developers] is it possible to set text color for individual items in a list view?

2012-01-05 Thread John Davis
In the getView code, when I returned the super call, it was blank
text.  When I returned a row as you did in your example, it would show
the text in gray/white.  Trying everything to change the color results
in no change.  If I want to change the text color should I uses
SetBackgroundColor or SetTextColor? Also, do I need to dork with the
adapter in the main class to invoke getView?  It looks from your
example I don't need to do that.  Lastly, this approach seems to get
all the text to be the same color once I get it working.  Any idea if
I can set individual line item colors?

On Thu, Jan 5, 2012 at 11:01 AM, Mark Murphy mmur...@commonsware.com wrote:
 If the TextView is truly invisible, you need to make it visible, using
 setVisibility().

 Otherwise, use Hierarchy View to examine your UI and see what is going on:

 http://developer.android.com/guide/developing/debugging/debugging-ui.html

 On Thu, Jan 5, 2012 at 10:57 AM, John Davis davi...@gmail.com wrote:
 I changed the getview code so it only calls the super code once and
 returns the rowView as you did.


 public class MyAdapterT extends ArrayAdapterT {

public MyAdapter(Context context, int textViewResourceId, T[] 
 objects) {
super(context, textViewResourceId, objects);
}
// context, int, T[]

@Override
public View getView(int position, View convertView, ViewGroup 
 parent) {
// TODO Auto-generated method stub
View rowView;
rowView = super.getView(position, convertView, parent);
((TextView)rowView).setTextColor(0x64788e);
return rowView;
}



 And removed the code in the main class to dork with the view.  It is
 still invisible text.  I was assuming this code would make all the
 text items be red in color.  I really want to be able to set certain
 lines to red and others to blue.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 Warescription: Three Android Books, Plus Updates, One Low Price!

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



-- 
John F. Davis

独树一帜

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] is it possible to set text color for individual items in a list view?

2012-01-05 Thread Mark Murphy
On Thu, Jan 5, 2012 at 11:07 AM, John Davis davi...@gmail.com wrote:
 If I want to change the text color should I uses
 SetBackgroundColor or SetTextColor?

setTextColor(). Note that you probably do not want to be using a hex
value, but rather a ColorStateList, if your color may be unreadable
when a row is selected (e.g., using the D-pad/trackball/arrow
keys/etc.).

 Also, do I need to dork with the
 adapter in the main class to invoke getView?  It looks from your
 example I don't need to do that.

You need to use your custom Adapter in your setAdapter() or
setListAdapter() call in onCreate().

 Lastly, this approach seems to get
 all the text to be the same color once I get it working.  Any idea if
 I can set individual line item colors?

Yes. Put in appropriate business logic in getView() to make the
decision of what color should be used.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: ADT Eclipse: Failed to parse the output of 'adb version'

2012-01-05 Thread Albert Pi
Lucio,
Try to use sdk android revision 15. This revision is working on my PC
(Windows XP/jdk 1.7.0_02/Eclipse 3.7.1(Indigo)/sdk android revsion
15).

On Jan 4, 8:33 am, LucPel lucio.pellecc...@gmail.com wrote:
 I have the problem with my installation ADT Android on Eclipse Indigo,
 the problem is this:

                    When I open Eclipse this error appears :  Failed
 to parse the output of 'adb version' 

 I've read numerous posts on this site but i can not solve my problem.

 I use:
    Windows 7
    jdk 1.7.0_02
    Eclipse Indigo
    sdk android revision 16

 I tried:
    adb kill-server
    adb start-server
    restart eclipse

    my Environment Variables is ok...
    and when I compile and run it as a prompt, okay! works

 but I don't solve the problem with eclipse! :(

 I noticed that immediately restarting Windows and opening Eclipse ...
 ADT on Eclipse WORKS!!! I close Eclipse and ADT on Eclipse does NOT
 work!!!

 Help me please...

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: hdpi drawable sizes

2012-01-05 Thread Neilz
So basically, to simplify my question:

Can two devices which both sit in the HDPI (large screen) range, use a
different set of assets?

On Jan 4, 12:50 pm, Neilz neilhorn...@gmail.com wrote:
 Hi all.

 I have a set of assets in my drawable-hdpi folder, which have
 generally been designed using an 800 * 480 template.

 My new device, plus many others, are now using a 960 * 540 layout,
 which still takes the assets from the same hdpi folder. This is
 generally ok, but the image sizes are reduced somewhat, with a lot
 more spacing between them.

 For android versions less then 3.x, can I specify a different set of
 assets for these two (and other) sizes, within the hdpi range?

 Thanks.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Is there a docment on getView()?

2012-01-05 Thread John Davis
Hello

The getView() call for arrayadapter is blank.  Is there a document
which describes how it works?

I have overridden it in order to change the text color of items in a
list view.  So far, I can't find any code which works.

I've tried this:

public class MyAdapterT extends ArrayAdapterT {

public MyAdapter(Context context, int textViewResourceId, T[] objects) {
super(context, textViewResourceId, objects);
}
// context, int, T[]

@Override
public View getView(int position, View convertView, ViewGroup parent) {
// TODO Auto-generated method stub
View row;
row = super.getView(position, convertView, parent);
TextView text;
text = (TextView) row.findViewById(R.id.listView1);
text.setTextColor(0x64788e);
return row;
}
}


I don't know if I am supposed to call getView in the main code or not,
but this will most certain crash the app.
The super.getView call seems to get a row in the list.  It seems  that
you then need to get the view associated with that row.  I have no
idea how to do that. I don't have resource id's for the individual row
items.  Here, I tried to use the  resource id of the list itself.
There is not a View.getChild() like call.
-- 
John F. Davis

独树一帜

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Using sd-card in 4.0 emulator

2012-01-05 Thread Kostya Vasilyev
If you create the emulator from the command line (using android create
avd), you can specify your own paths.

I used it to create emulators in a directory without spaces (to work around
spaces in C:\Documents and Settings), and the entire emulator directory /
file structure stayed within the specified directories.

-- Kostya

5 января 2012 г. 18:51 пользователь Dirk Vranckaert 
dirkvrancka...@gmail.com написал:

 I prefer Mac (or even Linux) but my employer enforces me to use
 Windows so yeah... :-)

 But here's what I just found (posted it already):

 Ok I found the problem,
 the my documents directory is set to be in D:\DVRANCKA . So when
 the
 AVD manager creates an AVD it's places under D:\DVRANCKA\.android\avd
 \...However when I want to launch an AVD it's looked for in the C:
 \user
 \DVRANCKA\.android\avd\...
 Is there somewhere I can configure that for launching he should also
 look at D:\DVRANCKA?

 On Jan 5, 3:47 pm, Mark Murphy mmur...@commonsware.com wrote:
  On Thu, Jan 5, 2012 at 9:42 AM, Dirk Vranckaert
 
  dirkvrancka...@gmail.com wrote:
   I did the check and am running on the latest versions.
 
   But I noticed something strange. When I open my AVD manager and want
   to create a new AVD it's not created on disk (although I can see the
   AVD and all it's preferences in AVD application). I tried deleting all
   AVD's and manually deleted the .android directory in c:\Users
   \MY_USERNAME\, then opened the AVD manager again and added an AVD. But
   now it comes... The AVD is not added in the application. What can I do
   that I don't have re-install the entire SDK and still can fix my AVD
   manager...?
 
  Beats me. You're running Windows, which is not my cup of proverbial tea.
 
  --
  Mark Murphy (a Commons Guy)http://commonsware.com|
 http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
 
  Warescription: Three Android Books, Plus Updates, One Low Price!

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Is there a docment on getView()?

2012-01-05 Thread Kostya Vasilyev
1:

http://developer.android.com/reference/android/widget/Adapter.html#getView(int,
android.view.View, android.view.ViewGroup)

2:

Yes, you're supposed to call the base class in your case, the ArrayAdapter
will be doing most of the work for you, inflating new or reusing existing
row layouts.

3:

Use view ids that are relevant to (used inside) your actual row item layout.

I very much doubt that R.id.listView1 is it.

4:

view.findViewById() is the getChild call you're looking for, using an id to
locate the view. Use correct id value and it should work.

-- Kostya

5 января 2012 г. 20:31 пользователь John Davis davi...@gmail.com написал:

 Hello

 The getView() call for arrayadapter is blank.  Is there a document
 which describes how it works?

 I have overridden it in order to change the text color of items in a
 list view.  So far, I can't find any code which works.

 I've tried this:

 public class MyAdapterT extends ArrayAdapterT {

public MyAdapter(Context context, int textViewResourceId, T[]
 objects) {
super(context, textViewResourceId, objects);
}
// context, int, T[]

@Override
public View getView(int position, View convertView, ViewGroup
 parent) {
// TODO Auto-generated method stub
View row;
row = super.getView(position, convertView, parent);
TextView text;
text = (TextView) row.findViewById(R.id.listView1);
text.setTextColor(0x64788e);
return row;
}
 }


 I don't know if I am supposed to call getView in the main code or not,
 but this will most certain crash the app.
 The super.getView call seems to get a row in the list.  It seems  that
 you then need to get the view associated with that row.  I have no
 idea how to do that. I don't have resource id's for the individual row
 items.  Here, I tried to use the  resource id of the list itself.
 There is not a View.getChild() like call.
 --
 John F. Davis

 独树一帜

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: hdpi drawable sizes

2012-01-05 Thread Kostya Vasilyev
What quantized density does that device report?

If it's 240, that's pure HDPI.

5 января 2012 г. 20:26 пользователь Neilz neilhorn...@gmail.com написал:

 So basically, to simplify my question:

 Can two devices which both sit in the HDPI (large screen) range, use a
 different set of assets?

 On Jan 4, 12:50 pm, Neilz neilhorn...@gmail.com wrote:
  Hi all.
 
  I have a set of assets in my drawable-hdpi folder, which have
  generally been designed using an 800 * 480 template.
 
  My new device, plus many others, are now using a 960 * 540 layout,
  which still takes the assets from the same hdpi folder. This is
  generally ok, but the image sizes are reduced somewhat, with a lot
  more spacing between them.
 
  For android versions less then 3.x, can I specify a different set of
  assets for these two (and other) sizes, within the hdpi range?
 
  Thanks.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] is there any body can make programs which run on android platform for a handsom salary...

2012-01-05 Thread Samron
hello everybody is there any body who can make programs runing on
android platform like games or applications.
A company named buzzmob wants some people for making android
programs... So intrested people can contact me on
'samkit...@gmail.com' or  call me at 9778660040

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Is there a docment on getView()?

2012-01-05 Thread TreKing
2012/1/5 John Davis davi...@gmail.com

 The getView() call for arrayadapter is blank.  Is there a document which
 describes how it works?


The docs are your friend:
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/List4.html


 I don't know if I am supposed to call getView in the main code or not


You're not.

but this will most certain crash the app.


When this happens, debug your app.


 The super.getView call seems to get a row in the list.


Nope.


 It seems  that you then need to get the view associated with that row.


Yup.


 I have no idea how to do that.


You make it or re-use convertView.


 I don't have resource id's for the individual row items.


You should, it's your project.


 Here, I tried to use the  resource id of the list itself.


That makes no sense.


  There is not a View.getChild() like call.


I don't know what that means.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Is there a docment on getView()?

2012-01-05 Thread John Davis
Hello Kostya,

Thanks for the reply.

On Thu, Jan 5, 2012 at 11:39 AM, Kostya Vasilyev kmans...@gmail.com wrote:

 2:

 Yes, you're supposed to call the base class in your case, the ArrayAdapter
 will be doing most of the work for you, inflating new or reusing existing
 row layouts.

Ok. I think I am doing what you say.


 3:

 Use view ids that are relevant to (used inside) your actual row item layout.

 I very much doubt that R.id.listView1 is it.

The listview is created using that id.  I did not create any resources
for the individual items. I don't know how to do that.  The example
code I used simply created a listview in xml.


 4:

 view.findViewById() is the getChild call you're looking for, using an id to
 locate the view. Use correct id value and it should work.

Super. I am glad you confimed I need ot do that.  However, as I said,
I don't know what would be the id of the row items since they are not
defined.


 -- Kostya

 5 января 2012 г. 20:31 пользователь John Davis davi...@gmail.com написал:

 Hello

 The getView() call for arrayadapter is blank.  Is there a document
 which describes how it works?

 I have overridden it in order to change the text color of items in a
 list view.  So far, I can't find any code which works.

 I've tried this:

 public class MyAdapterT extends ArrayAdapterT {

        public MyAdapter(Context context, int textViewResourceId, T[]
 objects) {
                super(context, textViewResourceId, objects);
        }
        // context, int, T[]

        @Override
        public View getView(int position, View convertView, ViewGroup
 parent) {
                // TODO Auto-generated method stub
                View row;
            row = super.getView(position, convertView, parent);
            TextView text;
            text = (TextView) row.findViewById(R.id.listView1);
            text.setTextColor(0x64788e);
                return row;
        }
 }


 I don't know if I am supposed to call getView in the main code or not,
 but this will most certain crash the app.
 The super.getView call seems to get a row in the list.  It seems  that
 you then need to get the view associated with that row.  I have no
 idea how to do that. I don't have resource id's for the individual row
 items.  Here, I tried to use the  resource id of the list itself.
 There is not a View.getChild() like call.
 --
 John F. Davis

 独树一帜

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



-- 
John F. Davis

独树一帜

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Is there a docment on getView()?

2012-01-05 Thread John Davis
Hello

 I don't have resource id's for the individual row items.


 You should, it's your project.



Super. That might help, but this example
http://developer.android.com/resources/tutorials/views/hello-listview.html
does not use id's for the individual list items.  How would I do that?

John

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Giving away my book: Genius Android Marketing

2012-01-05 Thread scp89
I've recently finished writing the first full-length, android-specific
book on Android Marketing. It covers tips, tricks, strategies,
competitive analysis, and so much more. Everything I've learned in 2
years selling android apps, I've put into this book. It is available
via e-book OR softcover:

E-book: 
http://www.amazon.com/Genius-Android-Marketing-Outsmarting-ebook/dp/B005WE7S3G/ref=sr_1_5?ie=UTF8qid=1325606679sr=8-5

Softcover:
http://www.amazon.com/Genius-Android-Marketing-Outsmarting-Market/dp/1463778406/ref=sr_1_cc_1?s=digital-textie=UTF8qid=1325606710sr=1-1-catcorr

GIVEAWAY: I am giving away 3 PDF copies of the book to readers! Simply
reply to this thread, and 1 week from today I will randomly select 3
members and PM you a link to your free download of the 130 page book.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Is there a docment on getView()?

2012-01-05 Thread Kostya Vasilyev
Just to clarify 2:

I meant calling super.getView from your adapter's getView, assuming it's  a
subclass of ArrayAdapter.

Do not call adapter.getView from outside the adapter's code, that's
meaningless.

Now the view ids What layout id do you use to initialize the adapter?
Perhaps android.R.layout.something?

A side note: my suggestions here are just to patch up things based on the
route you've already headed down (using ArrayAdapter).

One day, as your knowledge grows, you'll want to throw away the
three-wheeled bicycle (ArrayAdapter) and create your own, perhaps by
extending BaseAdapter.

-- Kostya

5 января 2012 г. 20:47 пользователь John Davis davi...@gmail.com написал:

 Hello Kostya,

 Thanks for the reply.

 On Thu, Jan 5, 2012 at 11:39 AM, Kostya Vasilyev kmans...@gmail.com
 wrote:
 
  2:
 
  Yes, you're supposed to call the base class in your case, the
 ArrayAdapter
  will be doing most of the work for you, inflating new or reusing existing
  row layouts.

 Ok. I think I am doing what you say.

 
  3:
 
  Use view ids that are relevant to (used inside) your actual row item
 layout.
 
  I very much doubt that R.id.listView1 is it.

 The listview is created using that id.  I did not create any resources
 for the individual items. I don't know how to do that.  The example
 code I used simply created a listview in xml.

 
  4:
 
  view.findViewById() is the getChild call you're looking for, using an id
 to
  locate the view. Use correct id value and it should work.

 Super. I am glad you confimed I need ot do that.  However, as I said,
 I don't know what would be the id of the row items since they are not
 defined.

 
  -- Kostya
 
  5 января 2012 г. 20:31 пользователь John Davis davi...@gmail.com
 написал:
 
  Hello
 
  The getView() call for arrayadapter is blank.  Is there a document
  which describes how it works?
 
  I have overridden it in order to change the text color of items in a
  list view.  So far, I can't find any code which works.
 
  I've tried this:
 
  public class MyAdapterT extends ArrayAdapterT {
 
 public MyAdapter(Context context, int textViewResourceId, T[]
  objects) {
 super(context, textViewResourceId, objects);
 }
 // context, int, T[]
 
 @Override
 public View getView(int position, View convertView, ViewGroup
  parent) {
 // TODO Auto-generated method stub
 View row;
 row = super.getView(position, convertView, parent);
 TextView text;
 text = (TextView) row.findViewById(R.id.listView1);
 text.setTextColor(0x64788e);
 return row;
 }
  }
 
 
  I don't know if I am supposed to call getView in the main code or not,
  but this will most certain crash the app.
  The super.getView call seems to get a row in the list.  It seems  that
  you then need to get the view associated with that row.  I have no
  idea how to do that. I don't have resource id's for the individual row
  items.  Here, I tried to use the  resource id of the list itself.
  There is not a View.getChild() like call.
  --
  John F. Davis
 
  独树一帜
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to
 android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en



 --
 John F. Davis

 独树一帜

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Is there a docment on getView()?

2012-01-05 Thread TreKing
On Thu, Jan 5, 2012 at 10:49 AM, John Davis davi...@gmail.com wrote:

 Super. That might help, but this example
 http://developer.android.com/resources/tutorials/views/hello-listview.html
 does not use id's for the individual list items.  How would I do that?


http://developer.android.com/guide/topics/ui/declaring-layout.html

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Is there a docment on getView()?

2012-01-05 Thread John Davis
Hello

On Thu, Jan 5, 2012 at 11:53 AM, Kostya Vasilyev kmans...@gmail.com wrote:
 Just to clarify 2:

 I meant calling super.getView from your adapter's getView, assuming it's  a
 subclass of ArrayAdapter.

 Do not call adapter.getView from outside the adapter's code, that's
 meaningless.

That makes sense. Thanks.


 Now the view ids What layout id do you use to initialize the adapter?
 Perhaps android.R.layout.something?

I did :
MyAdapterString adapter = new
MyAdapterString(this,android.R.layout.simple_list_item_1, values);


 A side note: my suggestions here are just to patch up things based on the
 route you've already headed down (using ArrayAdapter).


For what it is worth, I can do this:
 public View getView(int position, View convertView, ViewGroup parent) {
 TextView text = new TextView(getContext());
 text.setText(Hi, I am position  + position);
 text.setTextColor(Color.parseColor(#64788e));
 return  text;
}
That will set the text color to blue, but it will also change the text
I put in the list.


 One day, as your knowledge grows, you'll want to throw away the
 three-wheeled bicycle (ArrayAdapter) and create your own, perhaps by
 extending BaseAdapter.



Is this example
http://developer.android.com/resources/tutorials/views/hello-listview.html
impossible to manipulate the color of individual list items?  Or, is
there a way to patch up this code to do what I want?  It seems pretty
trivial to do. I don't understand why the hooks do not exist for what
i want to do.
 -- Kostya

 5 января 2012 г. 20:47 пользователь John Davis davi...@gmail.com написал:

 Hello Kostya,

 Thanks for the reply.

 On Thu, Jan 5, 2012 at 11:39 AM, Kostya Vasilyev kmans...@gmail.com
 wrote:
 
  2:
 
  Yes, you're supposed to call the base class in your case, the
  ArrayAdapter
  will be doing most of the work for you, inflating new or reusing
  existing
  row layouts.

 Ok. I think I am doing what you say.

 
  3:
 
  Use view ids that are relevant to (used inside) your actual row item
  layout.
 
  I very much doubt that R.id.listView1 is it.

 The listview is created using that id.  I did not create any resources
 for the individual items. I don't know how to do that.  The example
 code I used simply created a listview in xml.

 
  4:
 
  view.findViewById() is the getChild call you're looking for, using an id
  to
  locate the view. Use correct id value and it should work.

 Super. I am glad you confimed I need ot do that.  However, as I said,
 I don't know what would be the id of the row items since they are not
 defined.

 
  -- Kostya
 
  5 января 2012 г. 20:31 пользователь John Davis davi...@gmail.com
  написал:
 
  Hello
 
  The getView() call for arrayadapter is blank.  Is there a document
  which describes how it works?
 
  I have overridden it in order to change the text color of items in a
  list view.  So far, I can't find any code which works.
 
  I've tried this:
 
  public class MyAdapterT extends ArrayAdapterT {
 
         public MyAdapter(Context context, int textViewResourceId, T[]
  objects) {
                 super(context, textViewResourceId, objects);
         }
         // context, int, T[]
 
         @Override
         public View getView(int position, View convertView, ViewGroup
  parent) {
                 // TODO Auto-generated method stub
                 View row;
             row = super.getView(position, convertView, parent);
             TextView text;
             text = (TextView) row.findViewById(R.id.listView1);
             text.setTextColor(0x64788e);
                 return row;
         }
  }
 
 
  I don't know if I am supposed to call getView in the main code or not,
  but this will most certain crash the app.
  The super.getView call seems to get a row in the list.  It seems  that
  you then need to get the view associated with that row.  I have no
  idea how to do that. I don't have resource id's for the individual row
  items.  Here, I tried to use the  resource id of the list itself.
  There is not a View.getChild() like call.
  --
  John F. Davis
 
  独树一帜
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to
  android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en



 --
 John F. Davis

 独树一帜

 --
 You received this message because you are subscribed to the 

Re: [android-developers] Giving away my book: Genius Android Marketing

2012-01-05 Thread Sócrates Medina
Thanxs!

Sent from Samsung Galaxy Note
On Jan 5, 2012 12:51 PM, scp89 jayvanbui...@gmail.com wrote:

 I've recently finished writing the first full-length, android-specific
 book on Android Marketing. It covers tips, tricks, strategies,
 competitive analysis, and so much more. Everything I've learned in 2
 years selling android apps, I've put into this book. It is available
 via e-book OR softcover:

 E-book:
 http://www.amazon.com/Genius-Android-Marketing-Outsmarting-ebook/dp/B005WE7S3G/ref=sr_1_5?ie=UTF8qid=1325606679sr=8-5

 Softcover:

 http://www.amazon.com/Genius-Android-Marketing-Outsmarting-Market/dp/1463778406/ref=sr_1_cc_1?s=digital-textie=UTF8qid=1325606710sr=1-1-catcorr

 GIVEAWAY: I am giving away 3 PDF copies of the book to readers! Simply
 reply to this thread, and 1 week from today I will randomly select 3
 members and PM you a link to your free download of the 130 page book.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Is there a docment on getView()?

2012-01-05 Thread Mark Murphy
On Thu, Jan 5, 2012 at 12:04 PM, John Davis davi...@gmail.com wrote:
 Now the view ids What layout id do you use to initialize the adapter?
 Perhaps android.R.layout.something?

 I did :
                MyAdapterString adapter = new
 MyAdapterString(this,android.R.layout.simple_list_item_1, values);

You will notice that this is android.R.layout.simple_list_item_1. You
did not write this layout. Usually, if you are going to go to the
trouble of overriding getView(), you will use your own layout file for
the rows, so you have greater control. For example, if you use your
own layout file for the rows, then you are the one responsible for
setting your own view IDs.

 For what it is worth, I can do this:
         public View getView(int position, View convertView, ViewGroup parent) 
 {
         TextView text = new TextView(getContext());
         text.setText(Hi, I am position  + position);
         text.setTextColor(Color.parseColor(#64788e));
         return  text;
        }
 That will set the text color to blue, but it will also change the text
 I put in the list.

You are welcome to replace Hi, I am position  + position with your
actual data associated with that position. In this case, you are
telling Android not to bother inflating
android.R.layout.simple_list_item_1, but instead set the rows to be
what you are specifying here.

This is all covered in that excerpt that I linked to in the previous thread:

http://commonsware.com/Android/excerpt.pdf

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Giving away my book: Genius Android Marketing

2012-01-05 Thread Michael Wellington
It looks like a very interesting read. Thank you.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Is there a docment on getView()?

2012-01-05 Thread TreKing
On Thu, Jan 5, 2012 at 11:04 AM, John Davis davi...@gmail.com wrote:

 Or, is there a way to patch up this code to do what I want?


Yes.


 It seems pretty trivial to do.


It is once you get the hang of it.


  I don't understand why the hooks do not exist for what i want to do.


They do, but your hanging the wrong things on the hooks =).



Here's the general process for binding your data to a list view.

Create a custom class that is your data model that will be represented in
your UI. It has the properties you care about displaying in the list. In
this case, the text and color.

class MyType
{
 String Text;
 int Color;
}

Your ListAdapter is typed using your custom class.

ArrayAdapterMyType adapter = new ArrayAdapterMyType();

Then in your getView():

MyType selection = getItem(position);
CustomViewToReturn view = convertview != null convertView :
inflateFromXML(my_view_layout);
populateViewWithSelection(selection, view); // Set text and color on the
view using your object's state
return view;

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Is there a docment on getView()?

2012-01-05 Thread Kostya Vasilyev
Aha!

android.R.layout.simple_list_item_1 is defined in the platform, you can
find it under your Android sdk
directory/platforms/platform-version/data/res/layout (that data/res is
very useful to look up things):

The whole layout is a TextView, and its id is @android:id/text1, which,
on the Java side of things, is android.R.id.text1.

So you'd do something like.

   @Override
   public View getView(int position, View convertView, ViewGroup
parent) {
   View row = super.getView(position, convertView, parent);
*   TextView text = (TextView) row.findViewById(android.R.id.text1);
*   text.setTextColor(0x64788e);
   return row;
   }

Or just this, knowing that the layout is just one TextView:

*TextView text = (TextView) row;*

The direct typecast should work for the hello-listview sample, as that also
uses a row layout containing a single TextView with no children (and no id,
so findViewById won't work here).

-- Kostya

5 января 2012 г. 21:04 пользователь John Davis davi...@gmail.com написал:

 Hello

 On Thu, Jan 5, 2012 at 11:53 AM, Kostya Vasilyev kmans...@gmail.com
 wrote:
  Just to clarify 2:
 
  I meant calling super.getView from your adapter's getView, assuming it's
  a
  subclass of ArrayAdapter.
 
  Do not call adapter.getView from outside the adapter's code, that's
  meaningless.

 That makes sense. Thanks.

 
  Now the view ids What layout id do you use to initialize the adapter?
  Perhaps android.R.layout.something?

 I did :
MyAdapterString adapter = new
 MyAdapterString(this,android.R.layout.simple_list_item_1, values);

 
  A side note: my suggestions here are just to patch up things based on the
  route you've already headed down (using ArrayAdapter).


 For what it is worth, I can do this:
  public View getView(int position, View convertView, ViewGroup
 parent) {
  TextView text = new TextView(getContext());
 text.setText(Hi, I am position  + position);
 text.setTextColor(Color.parseColor(#64788e));
 return  text;
}
 That will set the text color to blue, but it will also change the text
 I put in the list.

 
  One day, as your knowledge grows, you'll want to throw away the
  three-wheeled bicycle (ArrayAdapter) and create your own, perhaps by
  extending BaseAdapter.
 


 Is this example
 http://developer.android.com/resources/tutorials/views/hello-listview.html
 impossible to manipulate the color of individual list items?  Or, is
 there a way to patch up this code to do what I want?  It seems pretty
 trivial to do. I don't understand why the hooks do not exist for what
 i want to do.
  -- Kostya
 
  5 января 2012 г. 20:47 пользователь John Davis davi...@gmail.com
 написал:
 
  Hello Kostya,
 
  Thanks for the reply.
 
  On Thu, Jan 5, 2012 at 11:39 AM, Kostya Vasilyev kmans...@gmail.com
  wrote:
  
   2:
  
   Yes, you're supposed to call the base class in your case, the
   ArrayAdapter
   will be doing most of the work for you, inflating new or reusing
   existing
   row layouts.
 
  Ok. I think I am doing what you say.
 
  
   3:
  
   Use view ids that are relevant to (used inside) your actual row item
   layout.
  
   I very much doubt that R.id.listView1 is it.
 
  The listview is created using that id.  I did not create any resources
  for the individual items. I don't know how to do that.  The example
  code I used simply created a listview in xml.
 
  
   4:
  
   view.findViewById() is the getChild call you're looking for, using an
 id
   to
   locate the view. Use correct id value and it should work.
 
  Super. I am glad you confimed I need ot do that.  However, as I said,
  I don't know what would be the id of the row items since they are not
  defined.
 
  
   -- Kostya
  
   5 января 2012 г. 20:31 пользователь John Davis davi...@gmail.com
   написал:
  
   Hello
  
   The getView() call for arrayadapter is blank.  Is there a document
   which describes how it works?
  
   I have overridden it in order to change the text color of items in a
   list view.  So far, I can't find any code which works.
  
   I've tried this:
  
   public class MyAdapterT extends ArrayAdapterT {
  
  public MyAdapter(Context context, int textViewResourceId, T[]
   objects) {
  super(context, textViewResourceId, objects);
  }
  // context, int, T[]
  
  @Override
  public View getView(int position, View convertView, ViewGroup
   parent) {
  // TODO Auto-generated method stub
  View row;
  row = super.getView(position, convertView, parent);
  TextView text;
  text = (TextView) row.findViewById(R.id.listView1);
  text.setTextColor(0x64788e);
  return row;
  }
   }
  
  
   I don't know if I am supposed to call getView in the main code or
 not,
   but this will most certain crash the app.
   The super.getView call seems to get a 

[android-developers] Re: Giving away my book: Genius Android Marketing

2012-01-05 Thread Oli Wright
Looks interesting.  For those that don't have a lot of time to put into 
this research themselves it's always good to be able to learn from someone 
else who has done the legwork!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] HttpURLConnection + keep alive timeout? (the way forward starting with gingerbread)

2012-01-05 Thread Mark Wyszomierski
Hi,

It looks like the android team will be investing more resources in
support / improvement of the HttpURLConnection class, based on this
dev post here:

http://android-developers.blogspot.com/2011/09/androids-http-clients.html
For Gingerbread and better, HttpURLConnection is the best choice
New applications should use HttpURLConnection; it is where we will be
spending our energy going forward.

It looks like connection pooling is supported by HttpURLConnection,
but seems to have a timeout of 5 seconds? (I can't find any
documentation on this). Is there any way to increase the duration that
connections are kept alive?

I'm creating connections to https://example.com/echo?param=abc;. If
the user initiates connections in intervals  5 seconds, I can see the
https setup is avoided, hinting me that the connection is being
reused.

But if the connections are spaced out  5 seconds, I see the entire
https setup done again, making me think the connections are not being
reused.

Is there a way for us to increase this timeout?

Thank you

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: is there any body can make programs which run on android platform for a handsom salary...

2012-01-05 Thread Oli Wright
On Thursday, 5 January 2012 16:45:23 UTC, Samron wrote:

 hello everybody is there any body who can make programs runing on 
 android platform like games or applications. 


On an Android developers group?  I doubt it ... 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Is there a docment on getView()?

2012-01-05 Thread John Davis
Kostya,

Tip of the hat to you.  That worked.  It will set all the items to
blue text. I appreciate your help a lot.

Now, is there a simple way to do this selectively?  I saw you could
tag items and then look based upon a tag.  Perhaps that will work?  I
would prefer that the class which creates the array adapter and list
view set the tag for the color and the array adapter to draw the line
items in blue or red based upon this tag.

John

On Thu, Jan 5, 2012 at 12:13 PM, Kostya Vasilyev kmans...@gmail.com wrote:
 Aha!

 android.R.layout.simple_list_item_1 is defined in the platform, you can find
 it under your Android sdk
 directory/platforms/platform-version/data/res/layout (that data/res is
 very useful to look up things):

 The whole layout is a TextView, and its id is @android:id/text1, which, on
 the Java side of things, is android.R.id.text1.

 So you'd do something like.

        @Override
        public View getView(int position, View convertView, ViewGroup parent)
 {
                View row = super.getView(position, convertView, parent);
            TextView text = (TextView) row.findViewById(android.R.id.text1);
            text.setTextColor(0x64788e);
                return row;
        }

 Or just this, knowing that the layout is just one TextView:

 TextView text = (TextView) row;

 The direct typecast should work for the hello-listview sample, as that also
 uses a row layout containing a single TextView with no children (and no id,
 so findViewById won't work here).

 -- Kostya

 5 января 2012 г. 21:04 пользователь John Davis davi...@gmail.com написал:

 Hello

 On Thu, Jan 5, 2012 at 11:53 AM, Kostya Vasilyev kmans...@gmail.com
 wrote:
  Just to clarify 2:
 
  I meant calling super.getView from your adapter's getView, assuming it's
   a
  subclass of ArrayAdapter.
 
  Do not call adapter.getView from outside the adapter's code, that's
  meaningless.

 That makes sense. Thanks.

 
  Now the view ids What layout id do you use to initialize the
  adapter?
  Perhaps android.R.layout.something?

 I did :
                MyAdapterString adapter = new
 MyAdapterString(this,android.R.layout.simple_list_item_1, values);

 
  A side note: my suggestions here are just to patch up things based on
  the
  route you've already headed down (using ArrayAdapter).


 For what it is worth, I can do this:
         public View getView(int position, View convertView, ViewGroup
 parent) {
         TextView text = new TextView(getContext());
         text.setText(Hi, I am position  + position);
         text.setTextColor(Color.parseColor(#64788e));
         return  text;
        }
 That will set the text color to blue, but it will also change the text
 I put in the list.

 
  One day, as your knowledge grows, you'll want to throw away the
  three-wheeled bicycle (ArrayAdapter) and create your own, perhaps by
  extending BaseAdapter.
 


 Is this example
 http://developer.android.com/resources/tutorials/views/hello-listview.html
 impossible to manipulate the color of individual list items?  Or, is
 there a way to patch up this code to do what I want?  It seems pretty
 trivial to do. I don't understand why the hooks do not exist for what
 i want to do.
  -- Kostya
 
  5 января 2012 г. 20:47 пользователь John Davis davi...@gmail.com
  написал:
 
  Hello Kostya,
 
  Thanks for the reply.
 
  On Thu, Jan 5, 2012 at 11:39 AM, Kostya Vasilyev kmans...@gmail.com
  wrote:
  
   2:
  
   Yes, you're supposed to call the base class in your case, the
   ArrayAdapter
   will be doing most of the work for you, inflating new or reusing
   existing
   row layouts.
 
  Ok. I think I am doing what you say.
 
  
   3:
  
   Use view ids that are relevant to (used inside) your actual row item
   layout.
  
   I very much doubt that R.id.listView1 is it.
 
  The listview is created using that id.  I did not create any resources
  for the individual items. I don't know how to do that.  The example
  code I used simply created a listview in xml.
 
  
   4:
  
   view.findViewById() is the getChild call you're looking for, using an
   id
   to
   locate the view. Use correct id value and it should work.
 
  Super. I am glad you confimed I need ot do that.  However, as I said,
  I don't know what would be the id of the row items since they are not
  defined.
 
  
   -- Kostya
  
   5 января 2012 г. 20:31 пользователь John Davis davi...@gmail.com
   написал:
  
   Hello
  
   The getView() call for arrayadapter is blank.  Is there a document
   which describes how it works?
  
   I have overridden it in order to change the text color of items in a
   list view.  So far, I can't find any code which works.
  
   I've tried this:
  
   public class MyAdapterT extends ArrayAdapterT {
  
          public MyAdapter(Context context, int textViewResourceId, T[]
   objects) {
                  super(context, textViewResourceId, objects);
          }
          // context, int, T[]
  
          @Override
          public View getView(int 

Re: [android-developers] How to obtain NOT ENCODED polylines using the com.google.android.maps package

2012-01-05 Thread TreKing
On Tue, Jan 3, 2012 at 5:54 AM, GerarCR gceballosr...@gmail.com wrote:

 I need to ask for a route using google maps API, but i need the (lat,long)
 points of the polyline to plot them by myself, instead of the encoded
 polyline.


If you question is about the web-based maps API for route-planning and not
specifically with the Android Maps API library, you're on the wrong list.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Is there a docment on getView()?

2012-01-05 Thread Kostya Vasilyev
Ok, great.

One simple thing you can do is to check the item's position, e.g. set odd
items to blue and even items to red (just to pick an example).

Beyond that, consider creating a proper data item class.

The adapter's getView would then examine the data item at the requested
position and make the decision on how to present it, based on its field
values (e.g. names starting with A are red, starting with B are green,
the rest are blue).

Also consider extending BaseAdapter rather than ArrayAdapter - it's just a
little bit more work, but should really clarify things for you.

The links posted by TreKing are Mark are good.

-- Kostya

5 января 2012 г. 21:31 пользователь John Davis davi...@gmail.com написал:

 Kostya,

 Tip of the hat to you.  That worked.  It will set all the items to
 blue text. I appreciate your help a lot.

 Now, is there a simple way to do this selectively?  I saw you could
 tag items and then look based upon a tag.  Perhaps that will work?  I
 would prefer that the class which creates the array adapter and list
 view set the tag for the color and the array adapter to draw the line
 items in blue or red based upon this tag.

 John

 On Thu, Jan 5, 2012 at 12:13 PM, Kostya Vasilyev kmans...@gmail.com
 wrote:
  Aha!
 
  android.R.layout.simple_list_item_1 is defined in the platform, you can
 find
  it under your Android sdk
  directory/platforms/platform-version/data/res/layout (that data/res is
  very useful to look up things):
 
  The whole layout is a TextView, and its id is @android:id/text1,
 which, on
  the Java side of things, is android.R.id.text1.
 
  So you'd do something like.
 
 @Override
 public View getView(int position, View convertView, ViewGroup
 parent)
  {
 View row = super.getView(position, convertView, parent);
 TextView text = (TextView)
 row.findViewById(android.R.id.text1);
 text.setTextColor(0x64788e);
 return row;
 }
 
  Or just this, knowing that the layout is just one TextView:
 
  TextView text = (TextView) row;
 
  The direct typecast should work for the hello-listview sample, as that
 also
  uses a row layout containing a single TextView with no children (and no
 id,
  so findViewById won't work here).
 
  -- Kostya
 
  5 января 2012 г. 21:04 пользователь John Davis davi...@gmail.com
 написал:
 
  Hello
 
  On Thu, Jan 5, 2012 at 11:53 AM, Kostya Vasilyev kmans...@gmail.com
  wrote:
   Just to clarify 2:
  
   I meant calling super.getView from your adapter's getView, assuming
 it's
a
   subclass of ArrayAdapter.
  
   Do not call adapter.getView from outside the adapter's code, that's
   meaningless.
 
  That makes sense. Thanks.
 
  
   Now the view ids What layout id do you use to initialize the
   adapter?
   Perhaps android.R.layout.something?
 
  I did :
 MyAdapterString adapter = new
  MyAdapterString(this,android.R.layout.simple_list_item_1, values);
 
  
   A side note: my suggestions here are just to patch up things based on
   the
   route you've already headed down (using ArrayAdapter).
 
 
  For what it is worth, I can do this:
  public View getView(int position, View convertView, ViewGroup
  parent) {
  TextView text = new TextView(getContext());
  text.setText(Hi, I am position  + position);
  text.setTextColor(Color.parseColor(#64788e));
  return  text;
 }
  That will set the text color to blue, but it will also change the text
  I put in the list.
 
  
   One day, as your knowledge grows, you'll want to throw away the
   three-wheeled bicycle (ArrayAdapter) and create your own, perhaps by
   extending BaseAdapter.
  
 
 
  Is this example
 
 http://developer.android.com/resources/tutorials/views/hello-listview.html
  impossible to manipulate the color of individual list items?  Or, is
  there a way to patch up this code to do what I want?  It seems pretty
  trivial to do. I don't understand why the hooks do not exist for what
  i want to do.
   -- Kostya
  
   5 января 2012 г. 20:47 пользователь John Davis davi...@gmail.com
   написал:
  
   Hello Kostya,
  
   Thanks for the reply.
  
   On Thu, Jan 5, 2012 at 11:39 AM, Kostya Vasilyev kmans...@gmail.com
 
   wrote:
   
2:
   
Yes, you're supposed to call the base class in your case, the
ArrayAdapter
will be doing most of the work for you, inflating new or reusing
existing
row layouts.
  
   Ok. I think I am doing what you say.
  
   
3:
   
Use view ids that are relevant to (used inside) your actual row
 item
layout.
   
I very much doubt that R.id.listView1 is it.
  
   The listview is created using that id.  I did not create any
 resources
   for the individual items. I don't know how to do that.  The example
   code I used simply created a listview in xml.
  
   
4:
   
view.findViewById() is the getChild call you're looking for, using
 an
id
to
locate the view. Use correct id 

[android-developers] Android Library sources not found

2012-01-05 Thread DulcetTone
Is there something I need to do so that my own Android Library's
source code is findable by Android projects working with it within the
same workspace?  The debugger goes to a .class version of it, and no
use of the link to source function offered thereby placates it.

No pointing out of this source should be necessary, correct?  The
Android Library's project is in the same workspace and it is open!

tone

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Android Library sources not found

2012-01-05 Thread Kostya Vasilyev
1:

Add the library project as a dependency to the app project:

Package Explorer / Right-click the app project / Properties / Java Build
Path / Projects, under Required projects on the build path.

2:

Switch to the Order and Export tab and move the library project up, so
it's above Library Projects (just that, no need to tick the checkbox on
the left there).

-- Kostya

5 января 2012 г. 22:14 пользователь DulcetTone dulcett...@gmail.comнаписал:

 Is there something I need to do so that my own Android Library's
 source code is findable by Android projects working with it within the
 same workspace?  The debugger goes to a .class version of it, and no
 use of the link to source function offered thereby placates it.

 No pointing out of this source should be necessary, correct?  The
 Android Library's project is in the same workspace and it is open!

 tone

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: MergeCursor broken 3.x ?

2012-01-05 Thread Gonçalo Ferreira
Okay, i found a solution.
I substituted the CursorAdapter and SimpleCursorAdapter imports for
the ones on the compatibility package and used
CursorAdapter.swapCursor instead of CursorAdapter.changeCursor.
Seems to be something related that swapCursor does not close the
previous cursor.
On Jan 4, 6:23 pm, Gonçalo Ferreira monx...@gmail.com wrote:
 Has anyone used this class and see it broken in android version 3.x
 and above? It worked fine for me in previous versions.

 Here's an example:

 MatrixCursor cursorOne = new MatrixCursor(new String[]{ _id, name,
 description });

 cursorOne.addRow(new Object[]{ 5, Object 2, Description 2 });
 cursorOne.addRow(new Object[]{ 5, Object 3, Description 3 });
 cursorOne.addRow(new Object[]{ 5, Object 4, Description 4 });
 cursorOne.addRow(new Object[]{ 5, Object 5, Description 5 });

 MatrixCursor cursorTwo = new MatrixCursor(new String[]{ _id, name,
 description });

 cursorTwo.addRow(new Object[]{ 5, Object 2, Description 2 });
 cursorTwo.addRow(new Object[]{ 5, Object 3, Description 3 });
 cursorTwo.addRow(new Object[]{ 5, Object 4, Description 4 });
 cursorTwo.addRow(new Object[]{ 5, Object 5, Description 5 });

 MergeCursor mergeCursor = new MergeCursor(new Cursor[] { cursorOne,
 cursorTwo });

 CursorAdapter cursorAdapter = new SimpleCursorAdapter(this,
 android.R.layout.simple_list_item_2, mergeCursor, new String[]
 { name, description }, new int []{ android.R.id.text1,
 android.R.id.text2 });

 setListAdapter(cursorAdapter);

 Doesn't show anything. Seems like it's cleaning the cursors. Am i
 missing something from the SDK  3.x?

 Thank you.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: hdpi drawable sizes

2012-01-05 Thread Neilz
Hi Kostya - not quite sure what you're getting at. Yes, both devices
are 240 density, it's just the pixel size that differs - but the
larger device isn't large enough to fall into the 'xlarge' bracket.

On Jan 5, 4:42 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 What quantized density does that device report?

 If it's 240, that's pure HDPI.

 5 января 2012 г. 20:26 пользователь Neilz neilhorn...@gmail.com написал:







  So basically, to simplify my question:

  Can two devices which both sit in the HDPI (large screen) range, use a
  different set of assets?

  On Jan 4, 12:50 pm, Neilz neilhorn...@gmail.com wrote:
   Hi all.

   I have a set of assets in my drawable-hdpi folder, which have
   generally been designed using an 800 * 480 template.

   My new device, plus many others, are now using a 960 * 540 layout,
   which still takes the assets from the same hdpi folder. This is
   generally ok, but the image sizes are reduced somewhat, with a lot
   more spacing between them.

   For android versions less then 3.x, can I specify a different set of
   assets for these two (and other) sizes, within the hdpi range?

   Thanks.

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] HttpURLConnection + keep alive timeout? (the way forward starting with gingerbread)

2012-01-05 Thread Kristopher Micinski
On Thu, Jan 5, 2012 at 11:26 AM, Mark Wyszomierski mar...@gmail.com wrote:
 Hi,

 It looks like the android team will be investing more resources in
 support / improvement of the HttpURLConnection class, based on this
 dev post here:

 http://android-developers.blogspot.com/2011/09/androids-http-clients.html
 For Gingerbread and better, HttpURLConnection is the best choice
 New applications should use HttpURLConnection; it is where we will be
 spending our energy going forward.

 It looks like connection pooling is supported by HttpURLConnection,
 but seems to have a timeout of 5 seconds? (I can't find any
 documentation on this). Is there any way to increase the duration that
 connections are kept alive?

 I'm creating connections to https://example.com/echo?param=abc;. If
 the user initiates connections in intervals  5 seconds, I can see the
 https setup is avoided, hinting me that the connection is being
 reused.

 But if the connections are spaced out  5 seconds, I see the entire
 https setup done again, making me think the connections are not being
 reused.

 Is there a way for us to increase this timeout?

 Thank you


Sorry if I didn't answer your original question but just post a
comment: it seems that this eventually just calls down to apache
harmony, which has been abandoned recently: I wonder how this will
influence further development...

Kris

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Setting textColor in strings.xml file

2012-01-05 Thread TreKing
On Mon, Jan 2, 2012 at 6:57 PM, Glenn glennark...@gmail.com wrote:

 Can I set a color for text in the strings.xml file to be used in
 the layout xml file?


http://developer.android.com/guide/topics/resources/more-resources.html#Color


-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] is this a bug

2012-01-05 Thread John Davis
A listview says there are 6 items in the list. ie. count = 6
Yet, you can not get the items

for (int i=0;inumRows;i++) {
count = theList.getCount();  // returns 6
fooView = (View) theList.getItemAtPosition(i); // raises 
exception

-- 
John F. Davis

独树一帜

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: hdpi drawable sizes

2012-01-05 Thread Kostya Vasilyev
What I'm getting at is: resource loading is based on quantized, not actual,
density, so if the device's manufacturer decided to report 240 dpi, it's
going to be drawable-hdpi.

I don't have one of those, but would assume that the screen size in dp's is
also bit larger than the usual 533x320 dpi (that's 800x480 divided by 1,5),
so the same hdpi images look a bit smaller, relative to the screen.

If so, then it's the device manufacturer's decision (remember the Dell
Streak? the original Galaxy Tab?), so personally, I'd just let it be.

Now if you insist on doing something different for those devices there
are resource qualifiers for screen size in pixels

... but they are very much not supposed to be used anymore, or maybe never
were (Dianne Hackborn once wrote they were a mistake).

So if you really need those, search the archives, and don't tell anyone you
heard about them from me :)

-- Kostya

5 января 2012 г. 22:26 пользователь Neilz neilhorn...@gmail.com написал:

 Hi Kostya - not quite sure what you're getting at. Yes, both devices
 are 240 density, it's just the pixel size that differs - but the
 larger device isn't large enough to fall into the 'xlarge' bracket.

 On Jan 5, 4:42 pm, Kostya Vasilyev kmans...@gmail.com wrote:
  What quantized density does that device report?
 
  If it's 240, that's pure HDPI.
 
  5 января 2012 г. 20:26 пользователь Neilz neilhorn...@gmail.com
 написал:
 
 
 
 
 
 
 
   So basically, to simplify my question:
 
   Can two devices which both sit in the HDPI (large screen) range, use a
   different set of assets?
 
   On Jan 4, 12:50 pm, Neilz neilhorn...@gmail.com wrote:
Hi all.
 
I have a set of assets in my drawable-hdpi folder, which have
generally been designed using an 800 * 480 template.
 
My new device, plus many others, are now using a 960 * 540 layout,
which still takes the assets from the same hdpi folder. This is
generally ok, but the image sizes are reduced somewhat, with a lot
more spacing between them.
 
For android versions less then 3.x, can I specify a different set of
assets for these two (and other) sizes, within the hdpi range?
 
Thanks.
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] is this a bug

2012-01-05 Thread TreKing
On Thu, Jan 5, 2012 at 12:39 PM, John Davis davi...@gmail.com wrote:

 fooView = (View) theList.getItemAtPosition(i); // raises exception


The exception would be?
The stack trace would be?

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] is this a bug

2012-01-05 Thread Kristopher Micinski
Oh geeze, haha... the framework would never have this obvious a bug...

What kind of an exception are you getting?  A ClassCastException I
would suppose?

Kris

On Thu, Jan 5, 2012 at 12:39 PM, John Davis davi...@gmail.com wrote:
 A listview says there are 6 items in the list. ie. count = 6
 Yet, you can not get the items

for (int i=0;inumRows;i++) {
count = theList.getCount();  // returns 6
fooView = (View) theList.getItemAtPosition(i); // raises 
 exception

 --
 John F. Davis

 独树一帜

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Is there a docment on getView()?

2012-01-05 Thread John Davis
On Thu, Jan 5, 2012 at 12:44 PM, Kostya Vasilyev kmans...@gmail.com wrote:
 Ok, great.

 One simple thing you can do is to check the item's position, e.g. set odd
 items to blue and even items to red (just to pick an example).

The only logic which knows the desired color is the main view which
populated the list view.  It seems that android can not do what I
desire.


 Beyond that, consider creating a proper data item class.

 The adapter's getView would then examine the data item at the requested
 position and make the decision on how to present it, based on its field
 values (e.g. names starting with A are red, starting with B are green,
 the rest are blue).

 Also consider extending BaseAdapter rather than ArrayAdapter - it's just a
 little bit more work, but should really clarify things for you.

 The links posted by TreKing are Mark are good.

 -- Kostya

 5 января 2012 г. 21:31 пользователь John Davis davi...@gmail.com написал:

 Kostya,

 Tip of the hat to you.  That worked.  It will set all the items to
 blue text. I appreciate your help a lot.

 Now, is there a simple way to do this selectively?  I saw you could
 tag items and then look based upon a tag.  Perhaps that will work?  I
 would prefer that the class which creates the array adapter and list
 view set the tag for the color and the array adapter to draw the line
 items in blue or red based upon this tag.

 John

 On Thu, Jan 5, 2012 at 12:13 PM, Kostya Vasilyev kmans...@gmail.com
 wrote:
  Aha!
 
  android.R.layout.simple_list_item_1 is defined in the platform, you can
  find
  it under your Android sdk
  directory/platforms/platform-version/data/res/layout (that data/res
  is
  very useful to look up things):
 
  The whole layout is a TextView, and its id is @android:id/text1,
  which, on
  the Java side of things, is android.R.id.text1.
 
  So you'd do something like.
 
         @Override
         public View getView(int position, View convertView, ViewGroup
  parent)
  {
                 View row = super.getView(position, convertView, parent);
             TextView text = (TextView)
  row.findViewById(android.R.id.text1);
             text.setTextColor(0x64788e);
                 return row;
         }
 
  Or just this, knowing that the layout is just one TextView:
 
  TextView text = (TextView) row;
 
  The direct typecast should work for the hello-listview sample, as that
  also
  uses a row layout containing a single TextView with no children (and no
  id,
  so findViewById won't work here).
 
  -- Kostya
 
  5 января 2012 г. 21:04 пользователь John Davis davi...@gmail.com
  написал:
 
  Hello
 
  On Thu, Jan 5, 2012 at 11:53 AM, Kostya Vasilyev kmans...@gmail.com
  wrote:
   Just to clarify 2:
  
   I meant calling super.getView from your adapter's getView, assuming
   it's
    a
   subclass of ArrayAdapter.
  
   Do not call adapter.getView from outside the adapter's code, that's
   meaningless.
 
  That makes sense. Thanks.
 
  
   Now the view ids What layout id do you use to initialize the
   adapter?
   Perhaps android.R.layout.something?
 
  I did :
                 MyAdapterString adapter = new
  MyAdapterString(this,android.R.layout.simple_list_item_1, values);
 
  
   A side note: my suggestions here are just to patch up things based on
   the
   route you've already headed down (using ArrayAdapter).
 
 
  For what it is worth, I can do this:
          public View getView(int position, View convertView, ViewGroup
  parent) {
          TextView text = new TextView(getContext());
          text.setText(Hi, I am position  + position);
          text.setTextColor(Color.parseColor(#64788e));
          return  text;
         }
  That will set the text color to blue, but it will also change the text
  I put in the list.
 
  
   One day, as your knowledge grows, you'll want to throw away the
   three-wheeled bicycle (ArrayAdapter) and create your own, perhaps by
   extending BaseAdapter.
  
 
 
  Is this example
 
  http://developer.android.com/resources/tutorials/views/hello-listview.html
  impossible to manipulate the color of individual list items?  Or, is
  there a way to patch up this code to do what I want?  It seems pretty
  trivial to do. I don't understand why the hooks do not exist for what
  i want to do.
   -- Kostya
  
   5 января 2012 г. 20:47 пользователь John Davis davi...@gmail.com
   написал:
  
   Hello Kostya,
  
   Thanks for the reply.
  
   On Thu, Jan 5, 2012 at 11:39 AM, Kostya Vasilyev
   kmans...@gmail.com
   wrote:
   
2:
   
Yes, you're supposed to call the base class in your case, the
ArrayAdapter
will be doing most of the work for you, inflating new or reusing
existing
row layouts.
  
   Ok. I think I am doing what you say.
  
   
3:
   
Use view ids that are relevant to (used inside) your actual row
item
layout.
   
I very much doubt that R.id.listView1 is it.
  
   The listview is created using that id.  I did not create any
   resources
   for the 

Re: [android-developers] is this a bug

2012-01-05 Thread John Davis
It looks like a bug

ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord,
Intent) line: 2661
ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord,
Intent) line: 2679
ActivityThread.access$2300(ActivityThread,
ActivityThread$ActivityRecord, Intent) line: 125
ActivityThread$H.handleMessage(Message) line: 2033  
ActivityThread$H(Handler).dispatchMessage(Message) line: 99 
Looper.loop() line: 123 
ActivityThread.main(String[]) line: 4627
Method.invokeNative(Object, Object[], Class, Class[], Class, int,
boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 521  
ZygoteInit$MethodAndArgsCaller.run() line: 868  
ZygoteInit.main(String[]) line: 626 
NativeStart.main(String[]) line: not available [native method]  



On Thu, Jan 5, 2012 at 1:42 PM, TreKing treking...@gmail.com wrote:
 On Thu, Jan 5, 2012 at 12:39 PM, John Davis davi...@gmail.com wrote:

 fooView = (View) theList.getItemAtPosition(i); // raises exception


 The exception would be?
 The stack trace would be?

 -
 TreKing - Chicago transit tracking app for Android-powered devices

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



-- 
John F. Davis

独树一帜

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


  1   2   3   >