Skip to main content

Posts

Showing posts with the label android

java.lang.IllegalStateException: ActionBarImpl can only be used with a compatible window decor layout

Within the last days I do see increasing error messages that sound identical. I don't use tablets ActionBar - I'm developing for phones only.

Android PopupWindow.showAtLocation() and effects of Gravity

I can't find good docs on PopupWindows showAtLocation and Gravity. After hacking for a few hours trying some black magic maths to calculate centers and try to align the view using Gravity.TOP I found a post that used Gravity.CENTER. I'm collecting my findings here in the hopes it saves someone else some pain.

Android how to show notification on screen

I've been working on push notifications and I am able to implement it and display it on status bar, the problem I am facing is that I want to display it even if the phone is lock, Under the lock screen where it says ("drag to unlock"), I have seen notifications like that but cant find any example to that.

Buying Android Device for Development

So I am thinking of getting Sprint Nexus S from ebay to do android development. I am wondering whether getting a locked phone will hinder me from doing any kind of development work on the phone (pushing to app market, connecting to internet(i don't care about 3/4G as long as I can use wifi I am good)). What are some things that I should be worried about when getting a locked phone for development? Will the locked phone even run without SIM?

General Android semi transparent bug

I use anti aliasing to make my images more smooth. When using anti aliasing a dark border will be drawn around the images. This happens because Android uses the color black and mixes it with the yellow from the images. This is a gernal problem! When I draw a rectangle and set the alpha value to 127 the image also gets quiet dark. Instead of using black Android should use white to draw the transparency.

Soft keyboard enter key event handle

i want to do some stuff on soft keyboard enter key press. so i do code like below but it execute twice but i want that only once, so anyone know about this, if know than please give me reply for this. my code and output is like below...