I need Help to extend layout ontouchlistener. Like Android Studio, where we can expand logcat(Android Monitor) view increase and decrease with point on it. I want same on app, If I expand height of view then below layout should decrease in size and when I touch to above and below view should increase in size, same as right to left and left to right view on run time. Please give your suggestions.
What exactly i want is like this. Kindly please check this link and let me know if it is possible then how ? Else suggest me that how to do this type of UI in android
I have not much more knowledge about this kind of view creation and resize that view. But If you want to resize any view in single screen as per that video then you have create custom view extend with LinearLayout. Please check this project that help you that how to resize the view?
For drag from one position to another position read this tutorial. With LinearLayout use this lib
If you want to Supporting Multiple Screens please refer this Google developer documentation.
Related
If you take a look at this app (https://play.google.com/store/apps/details?id=fr.recettetek&hl=en_GB) you'll see it provides image views with a little trash can icon in the top corner which deletes the image. Also the image views have borders around them and show the images without changing their length to width ratio. How is it possible to provide these features or any other feature in image views? Generally how is it possible to customize image views and make them more practical?
ImageView by themselves are used only to display a particular image. To have a custom behaviour or UI, such as the delete icon, you need to make a custom view.
You can do so by extending one of the ViewGroup, such as a RelativeLayout, and make your view.
For details on custom views, please refer to: https://developer.android.com/training/custom-views/create-view
I want to label different images and all the labels must be clickable.Is their a way to add particular hotspots in imageview that respond differently?
Please guide me in right direction.
Just create your own view which draws a bitmap and some lines with texts. if clicked get the position. resolve which text has been clicked.
https://developer.android.com/training/custom-views/index.html
I'd like to create something like a carousel with views. A continuum queue with an indetermined amount of the same type of view (just like a list), but when swiping left/right, (or up/down) it would move to the next/previous view (I could be cool if it did that with an animation, too). Plus, I also need to move though it by buttons. For example, "move to view 20".
Could you give me an advice on what to use for my purpose? Thanks in advance
Edit: By the way, grey big thing in the picture represents the current view, while the other thinner rectangles are the preceding and following view.
Please take a look on this answer Android page control like book?
You can make gaps between pages with setting margins or padding.
Looking for advice on the best View layout to use and avoid future re-work. The requirement is to display an image and a few lines of descriptive text (say, < 5 lines) in the middle of the screen. The image plus text will be of approximate size 1.5 inch square.
A future version will require that the image+text combo can be swiped left/right and up/down.
A menu of buttons will be provided but don't need help with that. I'm looking for advice on the best View layout to start with (not help with the code). Thanks
LinearLayout sounds pretty appetizing to me...
I have a HorizontalScrollView that consists of Images (Icons). I need to scroll the view in "blocks" the width of the icons, so as to never have a "piece" of the icon on the screen. I need more, but this question will give me all the other answers I need.
Does anyone have a code example to point me to for this?
Thank You in advance.
JS
You can either use a Gallery or create your own custom View that does this (maybe extend HorizontalScrollView).
I accomplished this in two parts.
I dynamically add the buttons from resource files and account for spacing on the left, right, and between.
I modified HorizontalScrollView to simply scroll to one of X positions (whichever is closer to the currently stopped position).
Again, thanks for reading.
JS