Android :: Transparency On Views Behaving Differently In 1.5

Apr 25, 2009

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:

CODE:....................

Android :: Transparency on Views behaving differently in 1.5


Android :: V2.1 Behaving Differently On Different Phones

Sep 26, 2010

We have an application that runs fine on my Samsung Moment but crashes on load on my HTC Hero, both running 2.1. I thought Android was Android.

View 1 Replies View Related

Android : Ant Vs Eclipse / Build Methods Are Behaving Differently?

Mar 15, 2010

The Eclipse build for my 1.6 application project is succeeding and the Ant build is failing. I'm looking for help on why they aren't behaving the same way.

We are developing on Mac OSX 10.5.8 with Eclipse 3.5 against SDK 1.6 + Google APIs. There are no setting changes in Eclipse, either at workspace or project level. Similarly, our ant is also a vanilla- flavored unmodified installation of 1.7.1. JDK is 1.5.0_22. The CLASSPATH environment variable is not set. JAVA_HOME is /Library/Java/ Home

The application was initially created by a team member using the Eclipse plugins. The application references two jar files, one of which has a dependency on javax.xml.bind.annotation.XmlSeeAlso, which is not defined anywhere in our code or in android.jar. The other jar file has an explicit dependency on android.jar. I generated the Ant build file using android update.

The Eclipse project builds an apk and runs the application in the emulator. I think this is incorrect behavior.

The Android project fails to build. I think this is correct behavior. MyClass.java:98: cannot access javax.xml.bind.annotation.XmlSeeAlso[javac] file javax/xml/bind/annotation/XmlSeeAlso.class not found

Any ideas as to why the two build methods are behaving differently? I would expect them both to fail.

View 5 Replies View Related

Android :: Views And Their Child Views - How To Avoid The Ugly - Boxes - When Child Views In A View Has Another Color Than Background

Jan 6, 2010

I have a simple ListView and on that ListView I have placed a number of custom defined Views. The CustomView has ImageView and two TextViews.

The CustomView also has a "stateful drawable" as background, so that the background image (a 9-patch) changes if you press the Row in the ListView. When pressing the Row, the background image changes to a Red-ish thing.

The problem is that when the background changes from the default greyish, all the Views in the CustomView (ImageView and TextViews) still have their greyish background and thus creates very ugly greay boxes on top of the now redish background.

What is the best way to solve that problem? I hoped that such things were handled automatically (as it is done in for example .NET), but I was wrong it seems.

View 1 Replies View Related

Android :: Market Behaving Strangely Today

May 31, 2010

Firstly I'm not able to download anything from the markets... the status just shows 'Starting download' and it just sticks there. This has been happening for a day or so, and I have two devices on different networks, so it must be the market and not me.

Also, I have some apps installed which the market doesn't recognize, it just shows the option to download as normal.

View 5 Replies View Related

Android :: Extended ContentProvider Not Behaving Properly

Aug 25, 2010

I'm trying to implement a ContentProvider wrapped around an SQLite database.

I've followed the tutorial here in building my ContentProvider:tutorial

I want to test what I have; so I'm attempting to instantiate my new ContentProvider, retrieve a Cursor from the query handler, and attach it to my CursorAdapter. Currently, I'm doing this in the onCreate of my Activity (I know this is bad practice, I'm just testing, I will move it to a service eventually).

CODE:.....

When I launch my application, the onCreate method of my extended ContentProvider gets executed. The database helper object gets created, the database gets created, and the onCreate method returns true. However, when I try to use my ContentProvider (with the code above), in the open() method the database helper object gets created, but getWritableDatabase() returns null. Also, when I call open(), the reference to getContext() is null.

Note: everything else seems to be working fine. When I call query, it hits my query handler, recognizes the Uri and attempts to run my query code (which obviously blows up because the database object is null).

Here are my extended ContentProvider and database helper:

CODE:........

I'm wondering if I should somehow be referencing whatever instance of MessagesProvider was created when I launched the application, instead of declaring a new one (p) and using it?

I updated the onCreate code in my Activity to the following, but managedQuery returned null:

CODE:......................

View 3 Replies View Related

Android :: ListView Focus Behaving Different When Using MinSdkVersion-3

Mar 15, 2010

A few days ago I was trying to fix this issue: I have a header (three ImageButton's) and a ListView. If I use the dpad, pressing DOWN to focus the ListView, the ListView shows as selected the seventh or eighth row, not the first one.

What I need to do is that the first element of the ListView get the focus (or selection) when I use the dpad, from another screen component, but instead, the seventh or eighth is selected.

I had minSdkVersion=3 in my manifest. When I changed it to minSdkVersion=4 it worked as expected (first row selected). Don't know why, but there is a difference between both.

View 6 Replies View Related

Android :: How Can Update The All The Views Inside A TabHost When Pressing On A ContextMenu Item From Within One Of The Views

Nov 16, 2010

I am implementing a music player application in Android. My play list selection screen is implemented as a tab selector widget which contains a ListActivity inside each of the tabs: Artist, Albums, Songs.
I want to update the ListView in each of the ListActivity when I delete an item from any of the lists.

i.e. When I long press an item in the Artists list a context menu is drawn with "Delete Artist"
And it should delete all the songs from this artist in the Songs ListView, delete all the albums by this artist in the Albums ListView, and finally delete the entry for the artist in the Artist ListView.

Each of the ListActivity has its own fillData() method, which updates the ListView when the button in the context menu is pressed.

How can I call the fillData() method of the Albums ListActivity after I update the ListView inside of the Artists ListActivity?

View 1 Replies View Related

Android :: Dumped XML Layout File Padding Positions Not Behaving Correctly

Dec 30, 2009

I've been trying to figure out how to make some sense of a dumped XML layout, and it's progressing 'pretty good'. The only thing I'm currently unsure about is the following:

When I use the command:

aapt dump xmltree <pathofapk> <pathofxmlfile>

I get the following result:

CODE:.............

That's all good, but what I'm trying to figure out is how to convert the following code into the XML layout file:

CODE:.................

Converting those values to decimal would result in:

CODE:.................

All good, but I've been trying to figure out what the (type 0x5 means). With all other types, the result is defined in the Android.util.TypedValue.class file

Decompiling that, gives the following result for 0x5:

CODE:...............

Makes sense, in a way. But, I need to know what kind of value it is, so looking down, I find the following value:

CODE:.............

But, when I try to use 2561mm and 1025mm (It's a tad much anyway, 25cm is.. larger than my screen), The whole screen is filled with the 'parent LinearLayout'.

View 3 Replies View Related

Android :: How To Make Use Of Views Defined In Layout XML File As Template To Create Views Programmatic Way

Feb 28, 2010

I want to populate a table, defined in layout xml file through the programmatic way. I have define Table with a single row defining its header, with all the attributes set. Now i want to know a way so that i can just replicate that header row in the table with new content.

I tried using inflator inflate(int,view) method, but at runtime it showed up with error.

Here is the XML code for the layout file defining the table

CODE:.................

View 1 Replies View Related

Android :: Images Render Very Differently

Jun 1, 2009

I am using OpenGL ES and drawing a triangle strip with 4 vertices. The texture I'm drawing was loaded from a PNG using BitmapFactory.decodeStream. I'm confused as to why my images look so bad. I took a screenshot and made the following image, which shows the on-device rendering on top and the actual image on bottom:

http://n4te.com/temp/imgDiff.png

Any idea why there is a difference? I have tried a bunch of different settings but I can't keep it from looking bad.

View 2 Replies View Related

Android :: Switching Views With RadioButton And Saving Views In Bundle

Mar 6, 2010

I have the following XML code:.................

The idea is to change the views, whenever I press one of the radio buttons. When I press a button the first time everything works out fine, but the second time I press a button, I get an IllegalStateException, and I can't quite see why I'm getting this.

Also, the Activity seems to set all my global variables to null, which is why I have to create them every time I switch from portrait to landscape or vice versa. So I would like to know if there is a way I can save my views in the Bundle, or any other way in which I can permanently save my views, so I don't have to add or create them every time, I flip the phone. And whenever I flip the phone, it seems that it rereads the main XML file, causing the RadioGroup to be set to 2D even if the 3D button is checked. This is because I've said the 2D button to be checked from when the app is first created, but I would like to also save the state of that RadioGroup.

View 5 Replies View Related

Android :: Google Voice Ring Differently?

Nov 12, 2010

So I would like for my Google Voice number to ring differently than my regular carrier number. I give out the GV number for business use and my regular one for personal/friend use.

So does anyone know if it's possible to have a separate ringtone? I see under the GV settings area "Sync and notfications - Select Ringtone" but it doesn't appear to work when I call the number. Any ideas?

(I'm on android 2.1 if that matters.)

View 9 Replies View Related

Android :: 1.5 Device Behaves Differently Than The Emulator

Aug 14, 2010

Did anyone encounter this problem? Particularly, I have a dialog style themes for a few activities and these come up as expected on the emulator, but are full screen on the device. The theme I a using is actually an extension of the basic dialog theme (Theme.Dialog). I did not check with the original one.

View 3 Replies View Related

Android :: How To Align Views In The Middle Of Another Views Baseline

Jun 16, 2010

How do you align views relative to the "middle" part of another view? I think it is best explained with a pic of the UI I'm trying to create in android.

View 2 Replies View Related

Android :: Porting Iphone App - If To Start Your App Again From Scratch What Would You Do Differently?

Jul 4, 2010

This questions comes as my team is about to under-go development for a mobile app targeting iphone, android and qt. We aim to complete the iphone version first, and then port to android and qt, and it would be great to know any tips or ideologies to grasp/employ from the outset, that would make the porting process as seamless as possible.

I'm sure there a few of you who have completed their iphone version of an app first, and then gone about developing an android version. I am keen to know any of the hurdles that you encountered, or things you wish you knew from the start.

More specifically, the app we are making will contain forms and some visuals(charts)

View 3 Replies View Related

Android :: Do Root Views Of An Activity In Android Have Any Prior Knowledge Of The Child Views That Will Be Loaded Into Them

Jan 25, 2010

Is there any way to query a root view of an activity for all of its child views even before the root view or its children have been inflated? I guess what I'm looking for is whether a view knows ahead of time what children it will have before it gets inflated, and can I get that list in some way. Bizarre I realize, but I think it will help me with some unconventional automation testing I'm working on. I haven't found anything in the API like this.

View 1 Replies View Related

Android : Dispatch TouchEvent Works Differently When Finger Hold On Screen?

Mar 29, 2009

I found event handler: dispatchTouchEvent(MotionEvent) works differently between G1 & emulator when finger is holding on touch screen.

I have a class inherited from RelativeLayout and override public boolean dispatchTouchEvent(MotionEvent event) method. After I touch & hold on the touch screen, in emulator I got MotionEvent.ACTION_DOWN event only. But in G1, I got MotionEvent.ACTION_DOWN first and then MotionEvent.ACTION_MOVE continuously, even if I try my best to hold still my finger tip.

I wonder if this is because there is pressure field in the MotionEvent. Because the blood pressure on finger tip changes continuously with heart beat, so no matter how still my finger is, the pressure value still changes. But I wonder if all kinds of touch screen have pressure factor in their touch event? Will all touch screen driver emit touch event continuously when finger is holding on the screen?

View 5 Replies View Related

Android :: PNG Transparency And OpenGL ES

May 27, 2009

I am rendering this PNG with no transparency just fine: http://n4te.com/temp/test.png However if I try to render this PNG (with transparency) with the exact same code, I just get a white box: http://n4te.com/temp/ball.png

I am loading the PNG into a texture like this: Bitmap bitmap = BitmapFactory.decodeStream(input); int[] temp = new int[1]; gl.glGenTextures(1, temp, 0); textureID = temp[0]; gl.glBindTexture(GL10.GL_TEXTURE_2D, textureID); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_NEAREST); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_NEAREST); // GL_LINEAR for quality. gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S, GL10.GL_CLAMP_TO_EDGE); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T, GL10.GL_CLAMP_TO_EDGE); GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0); bitmap.recycle();

I am using this blending: gl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA); How is it possible to render a PNG with transparency in OpenGL ES?

View 7 Replies View Related

Android :: Set The Transparency Of A View?

Jul 14, 2010

I would like to change the transparency of a whole View in Android. How can I do that? The View has a nontransparent background.

View 2 Replies View Related

HTC Incredible :: Why Phones React Differently?

Aug 25, 2010

I'm a little confused toward this one. People seem to have really varied reports about certain kernels and ROMs and whatnot working on their phones. For some, King's #1-3 are either really stable or completely unusable. Same goes for the Hydra kernels, or Skyraider, or Cyanogen.

But I don't get WHY this is the case. Take two Incredibles off of the HTC line and somehow they react differently to the same pieces of software. How's that work?

View 2 Replies View Related

Android :: Astrid Widget Transparency

Mar 20, 2010

Is there a way to set the Astrid widget to be partially transparent/translucent? I'd like it to let some of the background show through like the default search widget and the default calendar widget.

View 5 Replies View Related

Android :: ImageButton Icon Transparency

Mar 3, 2010

why is the transparency for drawables attached to ImageButtons not honoured? i have to change them to ImageViews so they look right.

View 5 Replies View Related

Android :: Set Initial Transparency For TextView

Feb 1, 2010

I need to set initial transparency for a TextView but I don't know how to do it. On iPhone it can be done easily with alpha property. I've tried to set alpha using AlphaAnimation but no good it doesn't work. It just returns to 100% alpha when it ends.

CODE:................

View 2 Replies View Related

Android :: Poor Transparency On Images

Apr 2, 2010

I am having problems getting transparency to work well on an ImageView. The images at(http://img265.imageshack.us/img265/6233/whatn.png) were screen captured from a Droid (hdpi). The top image I made in Photoshop and left the background white. The bottom image is the same image with the background transparent and the layout's color (white) shows through. Whenever I have transparent backgrounds in images it dithers shadows like this. Also, it only happens on hdpi devices, on my G1 (mdpi) it looks just fine. What is going on? How can I make the bottom image look as good as the top one?

View 1 Replies View Related

HTC Incredible :: Search Button Works Differently On 2.2?

Aug 31, 2010

I installed Froyo 2.2 and now on the home page when I press the "search" button it only searches internet. On 2.1 this would search my phone, calendar, contacts.... as well as suggestions for internet. Anyway to turn this feature back on? Somethnig must have gotten reset.

View 2 Replies View Related

Android :: Programmatically Add Views To Views

Mar 7, 2010

Let's say I have a LinearLayout, and I want to add a View to it, in my program from the Java code. What method is used for this? I'm not asking how it's done in XML, which I do know, but rather, how can I do something along the lines of (One View).add(Another View) Like one can do in Swing.

View 2 Replies View Related

Android :: Using GlColor To Set Textures To Half Transparency?

Nov 19, 2010

Basically I have a fully functional ogl program (2D game) in opengl es 1.1, everything works fine except for one problem: glcolor

I'm trying to set some of my texture to half transparent and I would like to do it as follows;

gl.glColor4f(1f, 1f, 1f, .5f);
obj.draw(gl);
...

gl.glColor4f(1f, 1f, 1f, 1f);

I'm using VBO for my vertice, my textures and indices. (if that is relevant)

the problem is that nothing gets set to 50% transparency...

I'm don't think relevant to post all my code (mainly because it is spread out several classes with several GL options changing (blends, scissors etc etc).

What I would like is for people to tell me what state of OGL could prevent glcolor form working like I want, what functions should I check, what state should I call.

View 1 Replies View Related

Android :: Transparency / Translucency Working On Emulator But Not Device

Jun 22, 2009

I have tried to replicate the Transparency/Translucency effects created in the API Demo(which works flawlessly) and the code i wrote works on the emulator but not on my actual device(Google ION)I copied the styles and colors.xml files from the API demos code and set the theme of my activity I want to be transparent to "@style/ Theme.Transparent" in my activity i set my content view to a layout which contains only a TextView containing : <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/text" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center_vertical|center_horizontal" android:text="should have transparent background" /> i have also tried setting the theme using: setTheme (R.style.Theme_Transparent).

View 2 Replies View Related

Android :: Image Transparency - Section Which You Could Measure In Pixels?

Oct 17, 2009

Anyone know if you can make part (i.e. a section which you could measure in pixels) of an image transparent? What graphics features would I need to look at?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved