Set the thickness of Android Circle Progress Bar - android

I find the default Android progress bar very thick when large, is there anyway to make the bar thinner in the circular indetermindate.
I dont want to use a custom drawable if possible. It always slows things down and gives a two two gradient I dont like

I don't think it's possible without using custom drawables. As an alternative, you can use a third-party library, such as CircularProgressView, to create a customizable Material progress indicator.

Related

How to create circle button, change its colour and animate it with Material Design themes Android?

I am trying to create a circle button (not a rounded square), with a different colour and wish for it to animate with a pulsing yellow aura when it is clicked.
I am using the latest version of Android Studio (4.1.2) which includes Material Design Components themes automatically.
What's the updated way to achieve this sort of button? I've read that changing the background resource of a button is outdated which is what I see a lot in Google results (How to make buttons rounded with Material Design Theming?).
You can use always use a material card view or a regular card view, and if you set the radius exactly the half of its height it will be rounded, beware there is a chance if you have multiline text it will get cut off, for the effect you can define a selector with different states.

Android custom layout

I am developing an android application with very complex design here is how it should look
I want to achieve this star-like design on the lower half of the image. Icons would represent buttons as well.
What I tried before coming here is
https://github.com/ManuelPeinado/ImageLayout
But that didn't work out so well.
Does anyone had similar experience ?
Make an image like that as layout background and place buttons with transparent background wherever u want.

Android custom ProgressBar with custom progress

Is that possible to have a custom ProgressBar in Android like this:
I mean:
Not spinning (static)
Progress with one color and remaining area with another color
With text in center
If that's not possible, what's the nearest result that I can have? Maybe using XML Shapes? Thanks!
There is not a standard Android component for reaching this result.
However, there is a library that you can use to achieve that effect.
Check this library.
You can customize this component as you like and use it on your xml layouts like a Custom View.
Check this library: https://github.com/wasabeef/awesome-android-ui/blob/master/pages/Progress.md. It does what you want.

How to color a portion of a view in android?

Now I have this task where I should create a rating bar just like youtube in my app , and so my idea was to have a textview where I set its background to a color but then remove the color according to an equation I will make so it displays only a percentage of it... any idea how can I do this or where to look ?
The simplest way to do this would be to create a selector.xml. You would assign android:background="#drawable/selector". Your selector would decide which background color to show based on what percentage you have assigned.
This link explains how to use selectors with buttons. It should help to get you on the right track...http://developer.android.com/guide/topics/resources/color-list-resource.html
EDIT: You can still accomplish a custom progress bar by xml. It is very similar to the selector. Just think of it as many more selectors based on progress instead of state. Here is a nice example...Custom Drawable for ProgressBar/ProgressDialog
You can also look into xml animations. They are similar.

How to make a custom progress bar in Android

I need help in doing a custom progress bar.
I would like to change the stock android progress bar like this one:
http://i56.tinypic.com/dlgbae.jpg
To something like this or any other shape:
http://i52.tinypic.com/2r750dh.jpg
Can someone point me to the right direction, please?
Thanks
You need to load different Drawable for the progress bar
Simple way to do this is just using
android:progressDrawable="#drawable/myprogbar_new_drawable"
Either put PNG in res/drawable folder in your project or create your own xml with specify colors/gradients/shapes etc.

Categories

Resources