I know this question has been asked before and I am unable to get a good solution so far.
I need to create a custom ImageView like the one use in the yahoo news app like below screenshot.
In the View hierarchy in the right, you can see its an imageview only. Below there is a framelayout and I attached a screenshot of that as well.
I don't think this is achieved using a layer-list, which can draw custom shapes on top of views.
So how to create a custom imageview with custom shape like this in android?
Any suggestion is really appreciated.
Thanks.
Related
In my app i need to create cardview with curved top and bottom lines, like this:
I tried to search answer on stackoverflow and google but i haven't found anything. Also i tried to make it via xml, but i couldn't.
Can anyone help me with this? I can't use it like image background because i need to change background color when i click on card and i have a lot of such card in my recyclerview and a lot of different colors for every card.
Thx.
You need to use a custom shape a la this as the background of the view. edit see this post
I am unable to figure out how to design layout in android like the images shown below.
Please suggest some solutions in order to achieve the same.
This can be achieved in two ways:
1- Use images in the background and position them accordingly.
2- Write your own View class and override the onDraw(Canvas canvas) method. You can get help from Android documentation.
Creating Custom Views
Creating a View Class
OR
Check this solution for help:
Android custom shape
As the other answers said, you can create custom views in android.
The curves are called Bézier curves. Similar questions have been asked before.
This question and this tutorial might help you on how to implement the curved view.
You can use SVG wave for background, and you can use this link to make online.
i'm trying to design a custom shaped imageview in my application... similar to the one in Yahoo news digest application...
Here's the shape i'm seeking to achieve :
Anyone have any idea how to do this? Thanks guys!
Well you'll simply need an image (filling the background) and overlapping view for displaying the news, date and day. I suggest you look for RelativeLayout.
Hi,
I want to design the buttons like the image above. eight button in a circular way. I am confusing how to design them in a circular to cricket logo.
I have tried it using relative layout and linear layout but can not make like this.
Please help me to make this view possible to implement.
Check out the Wheel Component which shows the circular views with the scrolling layout.
You can also download the reference demo HERE.
EDITED:
Check out other similar demo HERE and HERE
I was browsing internet for tutorial on custom view widget creatin, but they all were creating views of regular form, like rectangle, circle. But I need a widget that looks something like this:
Can you help me with brief overlook on how I create it? All that matters is outline form. I need it to be animated - I can extend it and shrink.
You can use shape drawables mentioned here: http://developer.android.com/guide/topics/resources/drawable-resource.html#Shape
If you are looking for making your own custom view by drawing the layouts on the canvas and providing it with the necessary functionalities you should look into this
Custom views