[英]Does android native support items to Floating Action Button?
I want to create a floating action button with items like the picture. 我想创建一个浮动动作按钮,其中包含图片等项目。 & also add some text beside the item.
并在项目旁边添加一些文字。 The picture is taken from google website .
图片来自谷歌网站 。 But i found some libraries to solve the problem.
但我找到了一些解决问题的库。 like this & this I am pretty much curious about android native design libraries.
像这样 这个我对Android原生设计库非常好奇。 Any one have idea how to make possible with native library?
任何人都知道如何使用本机库?
Picture: 图片:
Update: Code i written 更新:代码我写的
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// my actions is here
}
});
Xml are as follows Xml如下
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
android:src="@android:drawable/ic_dialog_email"
app:layout_behavior="com.alhikmah.weather360.utility.ScrollAwareFABBehavior" />
After finish my searching , i am decide to use FloatingActionButton library to achieve such effect what i need. 完成搜索后,我决定使用FloatingActionButton库来达到我需要的效果。 I didn't find any native library to do this.
我没有找到任何本地库来执行此操作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.