I am trying to achieve a rounded corner hexagon ImageView on Android
Exactly like this one but Hexagon :
I tried my best but failed in every possible way, i did find this answer which is perfect as it lets u enter number of sides required and it does the rest. but sadly it was for iOS, so i am not sure if it is helpful to anyone that know both languages, and can recreate it in android
I found a library that can accomplish that but that was after i done it myself, So here is the link to library and it does many shapes
use this lib
this can be helpful for you . i used this and made just like yours.
Related
I know this question is a duplicate, but I have not found the answer. So, is it possible to create a barely visible blurred shadow from a button in Android Studio? I found an example of a button with the shadow I need. How to make such a shadow so that it is adaptable to each size of the button? Thx.
you have few ways to achieve this. easiest would be to create 9-patch from an image, read carefully how to in official DOC. most pro would be to write own blurring code with probably most efficient for this purpose RenderScript. IN HERE you can find useful article how to blur images with this tool
you can always implement common material-design-styled Button using elevation/translationZ for increasing size of rendered-by-default shadow, but afaik there is no option for changing its color...
The design I received from the designer is something like this, but I'm not able to build this just using layer-list.
Is there any way to achieve this UI? It will really helpful for me as well as other fellow developers!
Thanks :)
looks like job for custom onDraw method or at least 9-patch. you won't achieve blur effect with layer-list
Could anyone lead me in the right direction to build something like the following image? Specifically the bottom part where the contact images appear.
How could I make the table view horizontal and have an arc?
Looking for answers for both ios and android.
Thanks!
There is a great library out there for this on iOS: https://github.com/nicklockwood/iCarousel
Inverted wheel is what you want, you'll need to tweak it a little but that is easily achieved by looking at the demo project.
This should help you on the Android side:
Basically, you get some images from artwork, then you write code with some trigonometry in it.
This will get you started: android-rotaryknob-view
There is a link at the bottom with more detailed code and explanation.
One of the applications in my mobile has this glossy and transparent look(refer the snapshot below), which is quite beautiful. Just want to know how I can achieve this.
I am developing an application for myself and want to implement similar kind of GUI. Although I can create a layout, I am still not good in creating beautiful icons like the one shown above. Any information (or) a link to icon development related tutorials should also be quite helpful. Thanks everyone in advance.
Those are just PNG images with transparency and glossy effect... it almost has nothing to do with programming. Just find a good designer and tell him/her to do a 9patch image like that.
By the way... background buttons, in that case should have the border only. The icon and text can be then added easily.
You have to combine multiple techniques. You can use Button where the background will be defined with a nine-patch image, with rounded corners. Then you can use android:drawableLeft parameter of the Button, to define the icon it will have.
As also Cristian suggests, this is not hard to implement. You need a good designer and get to know the basic techniques like 9patch png images, transparency and basic layout definitions. Good luck
iam stuck with the creation of a nine patch for a progressbar background.
It has a repeating pattern like a ruler-scala and that given me headache.
here is a image of what i want(at the bottom) and what i have (top).
can someone give me a hint how to acomplish my goal?
edit: or is it generelly possible to do this with a 9patch?
my other attempt was to make a with android:tileMode="repeat" but there i get problems with the height of my image (repeating in the second line), i need something like repeat-x.
Thanks in advance
edit2: ok i managed to do my repeating 9patch by stretching the whole repeating pattern, but its not ideal :(
You seem to be overestimating the power of 9-patches. The most you could do is have a ruler image with expanding space between the ticks. You can't, however, make a 9-patch that automatically tiles parts of your image.
On the other hand, if you create a BitmapDrawable programatically, you can set the tile mode separately for the X and Y axes.
I used to do this in my webview project using border image which provides both options (repeat, stretch, fill).
As webview has kind of it's own problems in android (mostly fixed element) I decided to be more android for the next project and I found out that it's not possible to have the repeated border using 9Patch. It's so awkward as it's needy but not implemented.
In a word android development area makes me crazy, one option here one option there is a usual thing here.