Android move activity with fix background - android

I have big background image, I want use it for two activity, like my image when the button pressed, I want to slowly moving activity 2 from left to right the background look like moving from left to right, like android home screen when you swipe your screen, what I need to do ?

You should use fragments instead of activities.
In this way you can have a single activity with the fixed background and two fragments with transparent background.

Related

how to click Background and something should happend?

I want to click the Background of a layout (not clicking anywhere, for example in the top right) and then reproduce a sound, can i put an empty View and put an On Click to that? I think is not possible.
If is possible, there is a better way?
I want to put some invisible "buttons" at the Background because I will put an image Background with shapes, that's why It couldn't be anywhere.
Thanks and sorry for my english.
You can put a button on the right corner and apply an empty or simply transparent image as icon button.
In this way, you can choose a different behavior for each screen position.

Sliding activity from right to left like menu slider android

I have a source code to do (Slider menu)..
But I want to do like it to just open a specific content, meaning that I want the second content to appear over the current content from right to left by pressing a button.
Hint: I'm not want to open activity totally by
overridePendingTransition(R.anim.animation, R.anim.animation2);
I just want the second content opens over the current content like what sliding menu acts.
(sliding menu appears from left to right by moving my finger from left to right, I want my second content opens from right to left and appears partially by pressing a button and back to hide my passing my fingers over it and move from left to right)
example: https://play.google.com/store/apps/details?id=com.wunderkinder.wunderlistandroid
Sorry if I could not explain, and hope anyone got my mean.
I think you got the "Activity" concept wrong.
I understand, you can never show 2 activities at the same time. An activity is not a "screen", "view" or something like that... it is a context itself. It covers a whole state in your application. If you want to do something like a slider, you can play with views, animations or even better, fragments.

adding button on top of the outgoing call screen in android

![Adding buttons on top of the default call screen of android][1]
http://i.stack.imgur.com/SJ8Pc.jpg
As shown in the below image, there are two buttons one is Live video button and the other is Picture share button, how to add those button on top of the default android call screen while making call.
Thanks,
Android F
I believe the way to do this is to draw views on top of the dialer activity. This is similar, in implementation, to the Facebook home chatHead feature. Have a look at this article, which shows how to draw any view: http://www.piwai.info/chatheads-basics/
In your case, your view would be a LinearLayout containing two buttons.

Curtain transistion between activities

I want a transition between my splashscreen and my "home" activity.
The splashscreen consists in two images (the same image with mirror effect). The upper image translate to the top, the lower one translate to the bottom. The home is appearing behind.
It's like a curtain which is opening.
I don't find a solution to have two separate activities for this animation.
If I make only one activity, the problem is that the "home" has an actionbar whereas the splashscreen doesn't have one.
Do you see a solution?

Placing a translucent-like image in Android

How can I place a gray image on top of my whole activity? This gray image must be translucent (meaning the user must still see what is beneath that gray image).
I wanted to created something like the pause menu in most games wherein the background can still be seen and when clicked/tapped, it becomes invisible and continues on with the game. :)
You could open a new activity that has a semi-transparent background. Or open a dialog, and have Android take care of it by itself.
If you want to use the same activity, create an ImageView over the entire activity, load it with a semi-transparent image, and set its visibility to 'gone' until you want it to appear.
You could also use FLAG_DIM_BEHIND instead of an translucent image
http://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#FLAG_DIM_BEHIND

Categories

Resources