How to expand an ImageView when clicked to fit the screen? - android

I want ImageView start expanding to fit the screen (it would be great including some animation with) when ImageView is clicked. Although i've found a great sample to show.
This is the default scene:
and when user clicked in the image:
How can I approach this solution? Any code example will be appreciated.

In order to view the image in a full screen after clicking the image. We need a create a new Activity (or) dialog fragment which makes our work easier in design and coding aspect also. To achieve this we can directly use intent and pass the url to the full screen activity and from their we can use a image loader to download and show it fully. Remember in your case background of the fullscreen activity should be transparent.
If you want to do some animation for this transition means, I would recommend you to use the shared element transition for this. The following link will help you to achieve this,
Link 1
Link 2
Hope these links will guide you in achieving your requirement :)

Related

How to make pop up screen without images in android?

Can you please tell me how to make this type of pop up? I do not need to design own component in drawable. I don't have much knowledge in Android.
1) First there is Title with blue background .
2) Second there is scrolling list view (without image) and buy button (without image).
Is it possible?
I Googled it to find out if we can make own button like that with some style?
Here is my image
You have to use a Dialog/Pop up in combination with a ListView you have to google that up because its a complex theme.
good look
Start from http://developer.android.com/guide/topics/ui/dialogs.html. You have to implement your own custom dialog layout, likely using a ListView (http://developer.android.com/guide/topics/ui/layout/listview.html).

Simple full screen image in Android

I want to make it such that when a person clicks an image, it opens up in full screen.
What is the most effective way to do this in Android?
The simplest way I can think of is creating an activity, with a layout with the ImageView filling the whole screen. But I think there's some way to directly open just the layout or the ImageView with an Intent?
The Best way to do this is..
When you click on image open a full screen Custom dialog with the image in it having attributes fill parent. You don't need to go in another activity your purpose will be solved in 1 activity itself thereby increasing performance and also lesser activities will be in stack.

Sliding drawer looks like semi circle

Android provides the SlidingDrawer by default looks like below image -
Image http://www.gru.at/android/wp-content/uploads/2010/09/s_open.png
Can we customize this SlidingDrawer looks like semi-circle type with buttons included. For, example take a look at below image -
Anyone done the SlidingDrawer like above one. I've googled it. Didn't get any nice solution for this. Anyone has idea/example blog for this?
So make sure you have Gimp and 9-Patch at the ready for a lot of trial and error...
Then what you wanna do is...
Add suitable layout to hold buttons where the current ImageView Handle is, like Horizontal LinearLayout or RelativeLayout
Cut the id of the current ImageView Handle and add it to this new Layout you just added
add your buttons to the LinearLayout/RelativeLayout (you can test it now, the buttons and the handle should all slide open at the same time)
Now add Button listeners for each of the buttons
Set the SlidingDrawer to android:allowSingleTap = "false" (tit for tat, you cant have the single tap option anymore, just the slide)
Use a ButtonSelector.xml to have different layouts for buttons be pressed or not pressed.
This is the hard part. Edit the drawables for the buttons, and handle so that they will fit together nicely if the screen is huge, small, landscape, portrait. I recommend using 9-Patch in conjunction with Gimp.
Pat yourself on the back because you now have a totally sweet custom sliding drawer.
Make sure you post pictures and state any problems or issues you ran into as I have never fully implemented this, but I did get to step 6 to make sure it was possible.
Last but not least, Good Luck...
Thanks for RelativeLayout and FrameLayout These layouts makes my requirement comportable with what i need. I've done like below steps -
First, i've splitted the full image into three pieces. And, merge these images with FrameLayout And, gave onclickListner to my center of image(Because, it was contain that arrow marks up/down)
And, i've used the Animation for just to open that View as SlidingDrawer
These steps helps me lot.

Changing an imageView in an Android Widget onclick

I have a very simple widget that has a background image of a speech bubble and an imageView that contains a character standing next to it (as if he is saying something).
On top of the speech bubble i have a textView in which i show some text.
Basically all i want to do is so that when the user clicks on the character the image changes to show an animation of the character.
I did a simple app that animates an imageView (using the animation-list xml) when the image is clicked and that worked fine. So i was wondering if i could achieve the same thing with this widget.
I have seen some examples where by you can click on a widget (be it a button, image, whatever) and you can then load a config layout however i simply cant figure out and i cant find anywhere if what i want can be done.
So basically what i need to know is:
1. can a widget have an animated imageView
2. What do i need to do so that when the imageView is clicked it loads the animation?
Can anyone point me in the right direction please?
Thanks in advance guys!!
Have you tried to use LayoutAnimation? See the related question here:
Android Widgets: Animations on RemoteViews ?

How do I go about making this layout? Having so much trouble

I am trying to make a really easy xml layout and I can't seem to get it to look the way I want.
I attached a picture of what I want it to look like:
Basically, I have a static background image in my imagebutton at the top. Below that I have a picture the user snapped in the Photo Box. I assume I need an image view for that, but would it be possible for me to instead pass the pic to the background of an image button too so I can make the size easier to manage?
Based on what the user chooses in the options before this layout, an option photo is shown based on what they select. The photo would display to the right of the centered image, if that option is selected.
Below that would be a centered text view, with another separate one below that. Finally, I would have two buttons on top of each other at the very bottom.
Could someone show me a good way to get this layout and also tell me if it is possible to take a picture that is snapped and make it the background of an image button - or if that is a bad idea?
Thanks so much!
Seems like for the most part, you just want a simple LinearLayout. For the part with the photo, you could use an embedded LinearLayout or RelativeLayout.
As for the picture - you can easily set the background of any view or view group to any image (any view has an option to set the drawable for the background).
The only thing you should consider - for the purposes of making the UI more intuitive - is to slightly modify the image for the different states (focused, selected, etc), so that the user gets visual feedback when selecting the button via the trackpad, or when clicking on the button. A "drawable" has built-in support for multiple images for each state.

Categories

Resources