How to add bottom round icon like gmail application android? - android

i want to make view like this with a button at the bottom. how can i do it? i am new to material design. I tried RecyclerView but i don't know whats that button.

you have to use FloatingActionButton try this.
http://developer.android.com/samples/FloatingActionButtonBasic/index.html

Visit https://github.com/vinc3m1/RoundedImageView/
this library can help you.
When you add library to your project write your xml file like that:
<com.makeramen.roundedimageview.RoundedImageView
android:id="#+id/imageViewID"
android:layout_width="40dp"
android:layout_height="40dp"/>

Related

Strange problems with ConstraintLayout and Toolbar

I've got some problems. with Costraint Layout and Toolbar. I upload some images to explain better what happens. I can't do nothing. If I add a new button It doesn't show it. I don't know if it is a normal situation, but if you have a solution, please, help me.
Thanks in advance
enter image description here
change your android api target to 25 in your gradle file
Change your ConstraintLayout to RelativeLayout and then add below code and see what happens:
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"

Extended Android Floating Button

I developed Android Application and I want to use extended floating button like floating button on Path Application in my layout. I hope someone can give me example about the code how to make this things. Thank You.
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hellooooo"
app:icon = "#drawable/pass_resource_here"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
</com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton>
Here's a detailed tutorial on how to create a good extended floating button with animations https://www.learn2crack.com/2015/10/android-floating-action-button-animations.html
Try using this library and modify it to your liking by using the sam ple project in the library
https://github.com/oguzbilgener/CircularFloatingActionMenu

What are the different types of circular buttons in material design?(other than floating action button)

The default lollipop apps(like dialer in motoG) has some rounded iconic buttons in the LISTVIEWS and also the TOOLBAR, please refer the screenshot
Please tell me what are these buttons as per my understanding 2,3 are TOOLBAR(actionbar) icons and I assume 1 button is the floating action button.
Please share a sample code to create a button like the ones in the image especially the 1st button.
That button is pretty straight forward. Using the AppCompat library lets you use ?attr/selectableItemBackgroundBorderless as a background, which achieves the desired effect.
<ImageButton
android:src="#drawable/some_drawable"
android:layout_width="wrap_content"
android:background="?attr/selectableItemBackgroundBorderless"
android:layout_height="wrap_content" />
This is a fab button.
Include Angular Material in your project then use the following code to create a 'Comment' fab button.
<md-button class="md-fab" aria-label="Comment">
<md-icon md-svg-src="img/icons/ic_comment_24px.svg"></md-icon>
</md-button>

How to add image buttons with ripple effect in cardview?

I'm looking at implementing a cardview which has a button with the ripple effect.
I'm talking about something like this :
https://lh5.ggpht.com/uTRdkJMNyy3KasauJsyGTTRHn5EZBtmA3-BVHCaHWiqBIF_XQmJg_MuE8OdisvefdEk=h900-rw)
I'm trying to implement the download/share button as present on those cards.
Should I be using an ImageButton or something else?
Also, how can I extend the same support for pre-lollipop devices?
UPDATE:
This is the code I'm using right now. It gives me an image button but I'n not able to get touch/ripple effects. The android:foreground property works for cardView and gives the ripple effect, but not for ImageButton.
<ImageButton
android:id="#+id/ib_open_map"
android:background="#drawable/ic_directions_grey600_36dp"
android:foreground="?android:attr/selectableItemBackground"
android:clickable="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
I think this can be interesting for you.
You will have to import or link the library to be able to use it.
Here is the link to the library :
Link to the library
It is easy to use and it is based on imageView.
Hope it helps you :) Let me know
EDIT
Editing my link for your update :)
Take a look at this : MaterialRipple

How to add a "plus" button on top of emptyView in ListView

I'd like to add a Button like this one below into my ListView when the list is empty using the setEmptyView() method.
Is there a built-in style in Android for this? Because I noticed that a few apps are using exactly the same Button style.
Look at this link: Add Items to ListView - Android
It shows the correct Android resource to use, which shows a green "+" symbol on the ImageButton.
To be precise:
<ImageButton
android:id="#+id/moreImageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:contentDescription="#string/image_button_delete"
android:src="#android:drawable/ic_input_add" />
Short answer: No, this is not a standard Button.
However, you can add a similar Button by using an ImageView. You just have to design/download something you like.

Categories

Resources