How to add dyanmic circular borders to imageview like whatsapp [duplicate] - android

This question already has answers here:
How to represent circle border with multiple colors in android
(3 answers)
Closed 5 years ago.
Please guide me to add dynamic dotted border to image view like whatsapp doing in status screen, Kindly see the below image, I circled the functionality of that I want to achieve,
Whatsapp Status Screen

You can try CircularImageView. You can dynamically change borders. Maybe you'il have to make some arrangements. You can look at example project.
Example.
<com.mikhaellopez.circularimageview.CircularImageView
android:layout_width="250dp"
android:layout_height="250dp"
android:src="#drawable/image"
app:civ_border_color="#EEEEEE"
app:civ_border_width="4dp"
app:civ_shadow="true"
app:civ_shadow_radius="10"
app:civ_shadow_color="#8BC34A"/>

Related

Floating Action Button colour [duplicate]

This question already has answers here:
Set FAB icon color
(18 answers)
Closed 4 years ago.
I am using one of the preset button designs (an add button) for my FAB. I was able to change the colour of the background colour of the button but the plus is green and I want to change that. How can I change that?
Using
android:tint
property you can set the color like this
<android.support.design.widget.FloatingActionButton
android:id="#+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:tint="#android:color/white"
android:src="#android:drawable/ic_input_add" />
Hope this helps. Good luck :)

Android Eclipse how to add an image button with text [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How do I use a compound drawable instead of a LinearLayout that contains an ImageView and a TextView
I currently just have just a button with text in it but now I want to add a background image to it. But I don't want the background image to cover the whole button. I would like it to look something like the buttons in this picture. (Look at the picture under the app screenshots, it's the first image.) Here is a link to the picture.
https://play.google.com/store/apps/details?id=com.pxstudios.minecraftpro&feature=related_apps#?t=W251bGwsMSwxLDEwOSwiY29tLnB4c3R1ZGlvcy5taW5lY3JhZnRwcm8iXQ..
You mean the list view with the text to the right of the buttons? You use two views, a text view and an image view
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal" >
<ImageView ...>
<TextView ...>
</LinearLayout>
You can do something like this:
<Button
android:id="#+id/button_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/[your_image]"
android:text="Your_Text"
android:textSize="48dp" //<==give a dimension to a text
android:textStyle="bold"//<==is better your text is bold
/>
If u use Eclipse, use graphic editor to create how many buttons you wants, just copy and paste in your Xml file. And use Strings.xml to store your text.
You can use android:drawableLeft attribute to set the icon to the left. Button is derived from TextView so it supports this attribute,

How can we use custom progress bar with image in android [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Custom Progress Bar in Android?
How can we use image with in progress bar like used in that a bucquet image marked by red rectangle.
Please provide me some code for customizing progress bar and use image in that
If you want to set the thumb image of the progressBar moving with the progress then you can you a seekBar and define the thumb image like this
<SeekBar
android:id="#+id/seekBar1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:progress="50"
android:thumb="#drawable/icon"
/>

ImageButton in Android with transparent background [duplicate]

This question already has answers here:
How to have a transparent ImageButton: Android
(23 answers)
Closed 2 years ago.
I have follow this post to make ImageButton in android
android image button
The image appears to the button but it has some background , my Image is a png image and I want the button to be transparent background
any one help please
add this line to your ImageButton xml layout.
android:background="#null"
Here's an alternative solution that worked for me:
android:background="#android:color/transparent"
As Sunny said, add it to the ImageButtons' XML layout
In your code use this:
ImageButton btn = new ImageButton(this);
btn.setImageResource(R.drawable.btn_close);
btn.setBackgroundResource(0);
I don't know if there is any method to do that, but you can paint completely transparent .png file and use method setBackGroundResource() or in XML using this : android:background
By this way you can set transparent background to ImageButton:
<ImageButton android:id="#+id/imagebutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/<imageresourcename>"
android:background="#null"></ImageButton>

Setting the height of the TabWidget on Android? [duplicate]

This question already has answers here:
Don't want icons on my TabWidget
(2 answers)
Closed 3 years ago.
I'm making an Android app that has a TabWidget along the bottom of the screen.
I want the tabs to all be 77px (or, dp, I suppose) high. To do this, I've added the following lines of code:
<FrameLayout
...
android:layout_height="77dp"
/>
<TabWidget
...
android:layout_height="77dp"
/>
This elevates the tabs above their original position, however, rather than the tabs actually getting taller, there's simply white space added beneath the tabs. Here is a screenshot to show what I mean.
Does anyone know how to increase the height of an Android tab widget / tabs themselves? Thanks in advance!
Can you post the entire layout? I'm curious to see what you did to get the tabs to align at the bottom. Try using the padding top and bottom to see if that helps.
android:paddingTop="39dp"
android:paddingBotom="38dp"
if this doesn't help please post your entire layout.

Categories

Resources