Simple full screen image in Android - 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.

Related

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

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 :)

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.

Full Screen Gallery View on User Click

I use a Gallery view to display set of images in the header part of my application's main page. Now I need to make the Gallery full screen when user click on any gallery image. In the full screen mode it should have the Gallery functionality (Should be able to move between images...). Finally, in the full screen mode, when user click the image, it should go back to normal screen.
It this possible with Android? Please help me.
Unfortunately you haven't told us what you've tried or haven't and thus it's hard to pick a starting point...
How I would do it, might be a little over kill using an added activity but I prefer the organization, but launch a new activity on view click and pass the strings of the paths in a bundle and the index of the one selected. Then create a bitmap or imageview, however you want to do it but make sure it can have a setOnTouchListener. This way you can use the MotionEvent to see if they swiped left or right and navigate through the list of images you passed to the activity as strings.
If you don't feel like doing bundles, you can make a static class that holds all the image information..

Android - Best Implementation of an expanding ImageView

I have a gallery and I am trying to expand an image that the user selects. Currently what I have is a new xml layout with the ImageView (and will eventually have a close and maximize button. I add the view using an inflater and addContentView() but when I reload the old layout using setContentView I can't edit any of the views and they all go back to their default value.
Best case scenario for the scenario would be for the user to click the picture and have it launch the new layout with the ImageView and buttons on top of the layout behind it but when exited the layout returns to normal.
So I guess the question is, how would you do this? I have a very basic understanding of layout inflating and this might be a little more advanced.
Instead of doing that you should try using an intent with the ACTION_VIEW action, that way other applications can handle the displaying.

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