I want to create a swipeable views in android.
My aim is to achieve this effect.
Here, on swiping right i want to change only image source, background image should be fixed.
How can this be achieved?
You can use the ViewPager, see here.
You will have to modify it a bit.
Select a transparent background for the ViewPager, and set the background Image you need to the parent View of the ViewPager. The sample code for the implementation are here and also check the related xml files.
Related
I am trying to implement an image effects/filters preview in an android app.
Example [From CamScannner App]:
How do I implement the stack of horizontal image filter previews in android as shown in the example [Auto/Original/Lighten/Magic/Gray]? Note: I am not asking about the implementation of the filters. I would like to know how to render.
I tried:
https://github.com/moondroid/CoverFlow
But I am looking for a simple horizontal stacking.
I don't think so it would be much of work. You just have to use RecyclerView with horizontal LinearLayout I can just guide you here.
Once user take the image or select the image. You need to find a way to give that image to RecyclerView's adapter Inside then adapter. You just apply the respected filter to the image and return the image to ViewHolder. Simple it is. If you need more descriptive answer just let me know.
I need to make a layout similar to that Image.
I wish it were shown all the registered images and their attributes and a button to add the user would select an image and define the attributes of it. I do not want a complete example that ordered but at least one direction than I use to do the layout. By my research I should perhaps use a swipe view. Has anyone seen something similar?
Thank you
You can use ViewPager to display cards like in top part.
ViewPager with previous and next page boundaries
And use a ListView or RecyclerView to show the bottom part. https://code.tutsplus.com/tutorials/getting-started-with-recyclerview-and-cardview-on-android--cms-23465
I am new to view pager in android. I want to make my view pager like this.
In this my problem is to making the circles with the number showing. How can I achieve this in android.
I have tried the view pager customizations methods but I didn't succeed. Please tell me how can I achieve this type thing in android.
I have written true ViewPager indicators similar to PagerTabStrip which are embedded in the ViewPager and they are a pain.
This indicator looks like it might be separate from the ViewPager anyway, so here is an easier way to do this sort of thing:
Make a custom widget that extends LinearLayout. This will be a horizontal layout. Have it also implement ViewPager.OnPageChangeListener.
In the setup of this widget, you add ImageViews to the LinearLayout with the drawable set to the circle of your choice. Use ViewPager.getAdapter().getCount() for the number of circles to add.
in the onPageSelected() method, use the position argument as the index to LinearLayout.getChildAt() to get the ImageView that represents that selected page. Set the drawable to the image that represents your selected page. Don't forget to reset the ImageView that was previously selected!
Call ViewPager.setOnPageChangeListener() with your widget.
Now if you also want to put a number in there, the views you add to the LinearLayout will need to have a TextView as well. You'll also need to get the data to go into the TextView, perhaps from a custom method on the PagerAdapter.
Also, I'll bet the app you are referencing has an animation showing the bubble expanding.
I'll try to post some code later.
I have to create a screen in which multiple images will be scrolling (automatically) from right to left with following features:
I have to create a layout like this image:
Small circles will be scrolling automatically like marquee.
When Image would reach at center, image will be zoom by 20% than other image.
Images would be click able, so that an operation could be performed after click.
What I have done so far:
I have used ViewPager but neither images are not scrolling automatically nor center image is zooming.
Please suggest or give some example.
I've done some research on this, and found that basically Android ViewPager does not support such functionality. This requires you to create your own custom ViewPager.
For the scrolling, circular ViewPager, I suggest you to use InfiniteViewPager. For the adapter, you can try looking at here.
This is some alternative, but I prefer InfiniteViewPager.
You can achieve this using a CarouselView. There are several libraries available for it. You can try this one.
https://github.com/clkasd/CarouselViewProject.
To change the current item automatically, you can use setCurrentItem function with a timer.
I'm working on my first Android application and I have a pretty good idea of what I want my application to look like, I'm just not sure how to create the view.
I have a Listview with several items, I then want users to click on an item then get a detail page. I want my detail page to look like this.
I know how to get the background. What I'm trying to figure out is what's the best way to create that rounded, see-through table with a border. Any ideas?
The easiest way would be to create a linear layout with vertical orientation and define a drawable shape resource and set the corners to have a radius to match what you like. Then add your 2 text views and an image view and lines for the separators.