Dynamically extend the height of the ListView row background image?

by javame_android » Fri, 23 Apr 2010 18:14:21 GMT


Sponsored Links
 Hi,

I am loading a listview dynamically. I have set a .9.png image as row
background image. The main purpose of using .9.png image was to extend
the height of the image dynamically according to the contents of the
listview.

But, the image is not getting extended. The contents which can be
displayed within the height of the row are being displayed and the
rest are being cut.

Can someone let me know a proper way of doing this?


Regards
Sunil

--



Other Threads

1. Android on devices without batteries - unlock screen problem

Hi,

I am trying to port Android (2.2_r1.1) to an ARM11 board which runs on
AC power (no batteries!!) and where im using a USB keyboard as input
device.

So far, Android initializes without problems and I get to the first
screen when you have to press MENU to unlock it. I have modified the
qwerty.kl file so that MENU is mapped to F5 key.

qwerty.kl:
key 63    MENU              WAKE_DROPPED

(NOTE: also tried with WAKE instead of WAKE_DROPPED)

When I press the F5 key i see this on the logcat log:

D/KeyguardViewMediator(  702): wakeWhenReadyLocked(82)
D/KeyguardViewMediator(  702): handleWakeWhenReady(82)
D/KeyguardViewMediator(  702): pokeWakelock(5000)
I/power   (  702): *** set_screen_state 1

It seems that KeyguardViewMediator is receiving the MENU key correctly
(since that is the code in KeyEvent.java):

public static final int KEYCODE_MENU  = 82;

Therefore, the keyboard seems to be OK. Unfortunately the screen is
not unlocked!!

NOTE: I have also tried using the sendevent tool, but the result is
the same.

The android system that i built works correctly when i run it on the
Emulator (../android-sdk-linux_86/tools/emulator -avd avd22 -
system ....) where i can unlock the screen without problems, for
example using the sendevent or using the artificial keyboard in the
emulator.

I tried to put the same fake battery properties in the init.rc for the
board:

    setprop status.battery.state Slow
    setprop status.battery.level 5
    setprop status.battery.level_raw  50
    setprop status.battery.level_scale 9

But nothing changed...

So far, my conclusion is that the problem is probably related with the
wakelocks and the lack of batteries or appropriate power management
support for my board. The reason for thinking that is that in the
Emulator, the messages that appear when i press the MENU key is just:

D/KeyguardViewMediator(   61): pokeWakelock(5000)

That is, no message related to set_screen_state as it happens in the
board.

In the kernel (android-2.6.32) i have selected a generic power driver
because i dont have any battery and this options (of course, android
drivers such IPC binder, low memory killer etc are enabled):

CONFIG_POWER_SUPPLY=y
CONFIG_PDA_POWER=y
CONFIG_PM=y
CONFIG_HAS_WAKELOCK=y
CONFIG_HAS_EARLYSUSPEND=y
CONFIG_WAKELOCK=y
CONFIG_WAKELOCK_STAT=y
CONFIG_USER_WAKELOCK=y
CONFIG_EARLYSUSPEND=y
CONFIG_CONSOLE_EARLYSUSPEND=y

These are the error messages related to the batteries at
initialization time:

E/BatteryService(  702): acOnlinePath not found
E/BatteryService(  702): usbOnlinePath not found
E/BatteryService(  702): batteryStatusPath not found
E/BatteryService(  702): batteryHealthPath not found
E/BatteryService(  702): batteryPresentPath not found
E/BatteryService(  702): batteryCapacityPath not found
E/BatteryService(  702): batteryVoltagePath not found
E/BatteryService(  702): batteryTemperaturePath not found
E/BatteryService(  702): batteryTechnologyPath not found
...
E/SurfaceFlinger(  702): Couldn't open /sys/power/wait_for_fb_sleep
or /sys/power/wait_for_fb_wake

NOTE: the last one and the ones about  usbOnlinePath,
batteryVoltagePath and batteryTemperaturePath appear also in the
emulator version

Could somebody give me a hint of what should i do to make it work?

Could it be related to the wakelocks and the fact that the device
doesnt have batteries?

Is there any way to fake the batteries without modifying the code of
the KeyGuard java file?

Note: in the emulator case, i can see some code related to power in
hardware/libhardware_legacy/power/. Should i write something like
that?

Thanks in advance
Daniel

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. Is it possible to create a custom system image for any currently released commercial hardware phone/netbooks?

We're creating some software that is going to require a few tweaks to
the Linux kernel and thus to run it on hardware we'll have to create a
custom system image.

In order for this to be useful as a commercial product it'll therefore
almost certainly have to be necessary to work in conjunction with a
network-operator or/and phone/netbook manufacturer.
However that's not important for the moment, the first step is to
create a demo/proof of concept of the software running on actual
hardware.

The hardware for demo purposes should be an actual phone ideally, not
a piece of obscure reference hardware for example, however is it
actually possible to create a custom system image for a phone? My
opinion is that its not - going to be possible because the image will
need to contain drivers specific to the hardware (screen drivers,
modem drivers, etc.) and these aren't going to be available for
inclusion in the image.

Is there any way we can create a custom system image for a currently
(or shortly to be released) phone and successfully re-flash the
hardware and it'll run?

TIA

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. CursorAdapter Problem

4. Viewable Address Field for People Contact truncated

5. Sign in error habis matikan dan hidupin spica

6. GPS satellite icon

7. Pasar malem