Theme.Translucent then show image after click - android

I have completely lost my focus now.
I was trying to create a transparent background to show users phone screen like this.
https://market.android.com/details?id=net.kreci.crackedscreen&hl=en
Now i got it working. But i want to now add an image but it wont show till after the click.
Can this be done in Viewflipper with showing the activity Transclucent then showing image after the click? (cause i dont want the screen to flip to another activity, I want it to show straight away)
So technically if you don't understand what I meant.... Similar to the market link i added in this post.

I don't have knowledge regarding ViewFlipper class to implement in this situation,
But
I have one Idea to implement while creating two different activities to show 2 Images.
In onCreate of both activities write the below line right after super.onCreate()
getWindow().setWindowAnimations(0);
This will set Window Animation to 0 so your screen will be changed without any effects.

Related

Add animation to buttons in android

So this is the main activity of my app:
As u can see, there are 6 buttons.
I thought about the idea of setting the animation of them to be like when a bubble pops up...i mean whenever the main activity shows up i want the button to "bubble up"+ i don't want them to bubble up all together, i want a Interval of approximately half a second between each button.
Another animation i would like to add is the rounding animation, in which, whenever i press a button, it firstly spinning and then i do some actions...
Hopefully guys you understand my willings, i would be glad for any help :)
u can see android api demo where some example given for button animation
https://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&ved=0CCgQFjAB&url=https%3A%2F%2Fgithub.com%2Fgoogledrive%2Fandroid-demos&ei=OL70VKn6PJSpuwTsvoLQDw&usg=AFQjCNEkkqFYd6xmuOzqdv-eXhKitC_o-w&sig2=fUuJK2OQpgLIF6qZCWOY5g&bvm=bv.87269000,d.c2E

How to change the way a new activity starts in android?

I don't like the look of how a new activity starts in android, the "fade in" and getting bigger untill it covers the screen.
Is there anyway to change the way?
Ideally, i want the activity just to appear all in one go
You can use the overridePendingTransition()method in Activity class to change the transition.Here are a good tutorial for this topic, the link.
But I should mention the point that animation can be disable in phone setting and in this situation your animation transition wont show.

Popup window using Fragment

I want to create a pop-up window (with black transparent background around it) that would appear above the application activity screen (by clicking on a button). This pop-up would contain a video player, a list of videos to be played and some other elements.
This pop-up has to be a fragment since I need to re-use it from other app fragments.
So my question is : what is the best way to achieve that? I personally see 2 options :
1) adding the pop-up as a fragment on the layout and to show + activate it whenever I need. But in that case, how can I put a black transparent background around it that would fill the whole screen?
2) using DialogFragment but it seems that this class is not very well-designed for this kind of stuff.
What do you think?
Thanks in advance.
DialogFragments are the suggested way to launch Dialog views from within a Fragment, so this is the solution I would suggest for you.
You can do pretty much anything you need within the DialogFragment. You will be in full control of the UI using this method.
Here is a SO discussion of the same point, with good info: Android DialogFragment vs Dialog

I want buttons which change the screen to another screen on canvas

I already had buttons on my original app but now I created an image on canvas in Android and have combined the two together, however I cannot view the buttons on the page but can only see the image on the page. These buttons were designed to move to different pages. Does anyone know how this can be done. I have also used extend Activity instead of View/SurfaceView is that ok or will that be causing the problem?
Thanks.

Getting blank screen when switching between activities

I am working on an app , where I am switching between two activities. When control is inside onStart of second activity , there is screen drawing and processing logic being handled.Because of this , when switching between the two activities happens, there is a blank screen that comes up.
Along with this , i also need to render a live video feed in background of my activities/app
What could be the best way to deal with this?
TIA
If you're getting a blank screen it could be because your activity is setting a new contentview but it hasn't been processed properly. Does it ever load completely? If it's just that it's black at the beginning and then renders. Try setting the contentview at the end of your switching in onCreate. This will make it remain on the first activity and avoiding switching views on till everything is loaded.
With regards your second question. Is the live video feed from the Camera?
If it is, set the camera view in the background, make a transparent LinearLayout (or whatever your layout is) over it and then put your various views there.
Your question doesn't have enough specific information to get an accurate idea as to what you're talking about, if my answer doesn't address your problem please respond with elaboration and some code! :-)

Categories

Resources