如何在Android Studio中创建自定义图像按钮? [英] How to create custom image buttons in Android studio?

查看:1109
本文介绍了如何在Android Studio中创建自定义图像按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在android studio中创建像这样的图像按钮?需要依赖吗?还是还有其他方法?

How to create image buttons like this one in android studio? Does it need dependencies? or are there any other methods?

推荐答案

可以通过多种方式完成.它仅取决于您如何自定义布局.您可以通过...做到这一点.

It can be done by various ways. Its just depends upon how you customize your layout. you can do that by....

1-带有白色背景的线性布局,里面有1个图像视图和1个textview ...

1- Linear layout with with white background with 1 image view and 1 textview inside...

2-使用带有图像视图和文本视图的框架布局.

2- using frame layout with image view and Text view.

3-图像中的视图是带有cardviews的回收者视图.要使用回收站和卡片,您需要支持设计依赖性.

3- the view in your image is a recycler view with cardviews. for using recycler and card you need support design dependencies..

// RecyclerView
compile 'com.android.support:recyclerview-v7:23.3.+'

// CardView
compile 'com.android.support:cardview-v7:23.3.+'

有关更多信息,您可以点击此链接...本教程与您的图片相同

For more info you can follow this link... this tutorial is same as your image

Android简单的RecyclerView和CardView

ANDROID回收视图和卡片视图材料设计教程

这篇关于如何在Android Studio中创建自定义图像按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆