[android-developers] Re: Transparency on Views behaving differently in 1.5

2009-06-18 Thread Romain Guy (Google)

I identified the bug and a fix will be delivered in Donut.

On May 19, 8:02 pm, Ruiming Li robert.li.ruim...@gmail.com wrote:
 If you want to get transparency. My suggestions is use set
 android:panelBackground  instead of  android:background.
 eg: You can change it from android:background=#cc00 to
 android:panelBackground =#cc00
 try it . Good Luck.



 On Sun, Apr 26, 2009 at 7:17 PM, cnordvik cnord...@gmail.com wrote:

  Does this change happen with the current binary of your app, or after you
  recompile it against 1.5?

  This happens only when I recompile it against 1.5 and run it in the
  emulator. Haven't tested the 1.1 binaries in the 1.5 emulator. If I
  switch target to 1.1 and run it on my phone then it works great.

  I noticed that it is related to setting transparency with 00  or
  FF color. If I use another color like (01) then it works
  as expected.

  I can change all my colors, but this seems like a bug to me?

  LinearLayout xmlns:android=http://schemas.android.com/apk/res/
  android
         android:orientation=horizontal android:id=@+id/root
         android:layout_width=fill_parent
  android:layout_height=fill_parent
         android:background=@drawable/field

     !-- This doesn't work in 1.5. In 1.1 this would produce a black
  layout with transparency.  --
         LinearLayout xmlns:android=http://schemas.android.com/apk/res/
  android
                 android:orientation=vertical android:id=@+id/root2
                 android:layout_width=fill_parent
  android:layout_height=fill_parent
                 android:background=#cc00

     !-- This one works...
         LinearLayout xmlns:android=http://schemas.android.com/apk/res/
  android
                 android:orientation=vertical android:id=@+id/root2
                 android:layout_width=fill_parent
  android:layout_height=fill_parent
                 android:background=#cc01 --

  -Christer
--~--~-~--~~~---~--~~
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: Transparency on Views behaving differently in 1.5

2009-05-19 Thread Michael Burton

 Please enter a bug at http://b.android.com with a working piece of
 code that exhibits the issue and SDK details (sdk, OS, emu vs device,
 etc.) Thanks in advance.


Not filed by me, but I just found it when searching b.android.com:

http://code.google.com/p/android/issues/detail?id=2458


--~--~-~--~~~---~--~~
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: Transparency on Views behaving differently in 1.5

2009-05-19 Thread Ruiming Li
If you want to get transparency. My suggestions is use set
android:panelBackground  instead of  android:background.
eg: You can change it from android:background=#cc00 to
android:panelBackground =#cc00
try it . Good Luck.


On Sun, Apr 26, 2009 at 7:17 PM, cnordvik cnord...@gmail.com wrote:


 Does this change happen with the current binary of your app, or after you
 recompile it against 1.5?

 This happens only when I recompile it against 1.5 and run it in the
 emulator. Haven't tested the 1.1 binaries in the 1.5 emulator. If I
 switch target to 1.1 and run it on my phone then it works great.

 I noticed that it is related to setting transparency with 00  or
 FF color. If I use another color like (01) then it works
 as expected.

 I can change all my colors, but this seems like a bug to me?


 LinearLayout xmlns:android=http://schemas.android.com/apk/res/
 android
android:orientation=horizontal android:id=@+id/root
android:layout_width=fill_parent
 android:layout_height=fill_parent
android:background=@drawable/field

!-- This doesn't work in 1.5. In 1.1 this would produce a black
 layout with transparency.  --
LinearLayout xmlns:android=http://schemas.android.com/apk/res/
 android
android:orientation=vertical android:id=@+id/root2
android:layout_width=fill_parent
 android:layout_height=fill_parent
android:background=#cc00

!-- This one works...
LinearLayout xmlns:android=http://schemas.android.com/apk/res/
 android
android:orientation=vertical android:id=@+id/root2
android:layout_width=fill_parent
 android:layout_height=fill_parent
android:background=#cc01 --

 -Christer
  


--~--~-~--~~~---~--~~
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: Transparency on Views behaving differently in 1.5

2009-05-08 Thread Mark Murphy

Raphael wrote:
 Is this on the emulator or on a real device?
 
 Please enter a bug at http://b.android.com with a working piece of
 code that exhibits the issue and SDK details (sdk, OS, emu vs device,
 etc.) Thanks in advance.

I have not had an opportunity to recreate the problem in a smallish
project, but I have had similar issues. #FF00, in some
circumstances, behaves as fully transparent rather than black, but
#FF01 is near-black.

I will try to isolate this and post it to http://b.android.com when I
get an opportunity.

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

Android App Developer Training: http://commonsware.com/training.html

--~--~-~--~~~---~--~~
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: Transparency on Views behaving differently in 1.5

2009-05-07 Thread Moto

Well if anyone has this problem if you set say #9900 you just get
a back bg... but if you put #9901 it works... some reason it
doesn't like the zeros?

well that's how it is I guess..

Moto!
--~--~-~--~~~---~--~~
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: Transparency on Views behaving differently in 1.5

2009-05-07 Thread Raphael

Is this on the emulator or on a real device?

Please enter a bug at http://b.android.com with a working piece of
code that exhibits the issue and SDK details (sdk, OS, emu vs device,
etc.) Thanks in advance.

R/

On Thu, May 7, 2009 at 8:14 PM, Moto medicalsou...@gmail.com wrote:

 Well if anyone has this problem if you set say #9900 you just get
 a back bg... but if you put #9901 it works... some reason it
 doesn't like the zeros?

 well that's how it is I guess..

 Moto!
 


--~--~-~--~~~---~--~~
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: Transparency on Views behaving differently in 1.5

2009-05-05 Thread Moto

I'm having a similar issue, except that I have an activity on top of
another with AndroidManifest.xml declaring

android:theme=@android:style/Theme.Translucent.NoTitleBar

When I set the background color to #8800 in Android 1.1 it works
nicely giving a darker transparancy... and in Android 1.5 once in a
while it decides not to work making the background all back and no
longer transperant.

Any ideas why this happens?
 -Moto!
--~--~-~--~~~---~--~~
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: Transparency on Views behaving differently in 1.5

2009-04-28 Thread simon

Settings the color to #0001 instead
of # worked for me as well.

On Apr 27, 6:41 pm, Selmi se...@centrum.sk wrote:
 didn't worked for me. but helped if i set color to #0001 instead
 of #. it happened when i tried to run application built on 1.1
 sdk on 1.5emulator.

 On 27. Apr, 20:03 h., cnordvik cnord...@gmail.com wrote:

  This is a workaround for the 1.5 emulator if anyone is interested:

  ...
  android:background=@color/my_transparent_background
  ...

  ...
  color name=my_transparent_background#/color
  ...

  -Christer

--~--~-~--~~~---~--~~
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: Transparency on Views behaving differently in 1.5

2009-04-27 Thread cnordvik

This is a workaround for the 1.5 emulator if anyone is interested:

...
android:background=@color/my_transparent_background
...

...
color name=my_transparent_background#/color
...

-Christer
--~--~-~--~~~---~--~~
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: Transparency on Views behaving differently in 1.5

2009-04-27 Thread Selmi

didn't worked for me. but helped if i set color to #0001 instead
of #. it happened when i tried to run application built on 1.1
sdk on 1.5emulator.

On 27. Apr, 20:03 h., cnordvik cnord...@gmail.com wrote:
 This is a workaround for the 1.5 emulator if anyone is interested:

 ...
 android:background=@color/my_transparent_background
 ...

 ...
 color name=my_transparent_background#/color
 ...

 -Christer
--~--~-~--~~~---~--~~
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: Transparency on Views behaving differently in 1.5

2009-04-26 Thread cnordvik

Does this change happen with the current binary of your app, or after you
recompile it against 1.5?

This happens only when I recompile it against 1.5 and run it in the
emulator. Haven't tested the 1.1 binaries in the 1.5 emulator. If I
switch target to 1.1 and run it on my phone then it works great.

I noticed that it is related to setting transparency with 00  or
FF color. If I use another color like (01) then it works
as expected.

I can change all my colors, but this seems like a bug to me?


LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:orientation=horizontal android:id=@+id/root
android:layout_width=fill_parent
android:layout_height=fill_parent
android:background=@drawable/field

!-- This doesn't work in 1.5. In 1.1 this would produce a black
layout with transparency.  --
LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:orientation=vertical android:id=@+id/root2
android:layout_width=fill_parent
android:layout_height=fill_parent
android:background=#cc00

!-- This one works...
LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:orientation=vertical android:id=@+id/root2
android:layout_width=fill_parent
android:layout_height=fill_parent
android:background=#cc01 --

-Christer
--~--~-~--~~~---~--~~
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: Transparency on Views behaving differently in 1.5

2009-04-25 Thread Dianne Hackborn
I can't think of anything that could have changed here -- there is really
nothing special the view hierarchy does in this case, it is just drawing the
views on on top of the other in Z-order.  And we certainly have transparent
background working in many other places, such as the background image used
for buttons etc.

Does this change happen with the current binary of your app, or after you
recompile it against 1.5?

On Sat, Apr 25, 2009 at 12:32 PM, Chister Nordvik cnord...@gmail.comwrote:


 Hi!

 I have a lot of Views where I have set a background image on the top
 LinearLayout and then I have nested a new linear layout below with a
 background that is semi-transparent. This works great in 1.1, but in
 1.5 the transparency is just disregarded and this breaks my app as the
 text on top is now unreadable.

 Is this a bug or a feature? Is there a better way of doing this? Very
 grateful for any tips!

 Code example:

 LinearLayout xmlns:android=http://schemas.android.com/apk/res/
 android
android:orientation=vertical android:layout_width=fill_parent
android:layout_height=fill_parent android:background=@drawable/
 field
android:id=@+id/root

LinearLayout xmlns:android=http://schemas.android.com/apk/res/
 android
android:orientation=vertical
 android:layout_width=fill_parent
android:layout_height=wrap_content android:id=@+id/bg
android:background=#aa00
 ...

 -Christer
 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---