QMUI Android UI 框架正式发布

图片描述

QMUI Android 的设计目的是用于辅助快速搭建一个具备基本设计还原效果的 Android 项目,同时利用自身提供的丰富控件及兼容处理,让开发者能专注于业务需求而无需耗费精力在基础代码的设计上。不管是新项目的创建,或是已有项目的维护,均可使开发效率和项目质量得到大幅度提升。

官网:http://qmuiteam.com/android

Github 源码:https://github.com/QMUI/QMUI_...

功能特性

全局 UI 配置:只需要修改一份配置表就可以调整 App 的全局样式,包括组件颜色、导航栏、对话框、列表等。一处修改,全局生效。

丰富的 UI 控件:提供丰富常用的 UI 控件,例如 BottomSheet、Tab、圆角 ImageView、下拉刷新等,使用方便灵活,并且支持自定义控件的样式。

高效的工具方法:提供高效的工具方法,包括设备信息、屏幕信息、键盘管理、状态栏管理等,可以解决各种常见场景并大幅度提升开发效率。

功能列表

请查看官网的功能列表

使用方法

请查看官网的开始使用

Demo 下载及预览

扫描二维码至官网下载:
QRCode

Demo 预览:
Demo

意见反馈

如果有任何的意见或建议,欢迎直接留言或在 Github 创建 issue,感谢你的支持和贡献。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要在 Android 项目中使用 QMUI Android,可以按照以下步骤进行: 1. 将 QMUI Android 引入项目中,可以使用 Gradle,将以下代码添加到 `build.gradle` 文件中: ```groovy dependencies { implementation 'com.qmuiteam:qmui:2.1.0' } ``` 2. 在 Application 类中初始化 QMUI,可以在 `onCreate()` 方法中添加以下代码: ```java public class MyApplication extends Application { @Override public void onCreate() { super.onCreate(); QMUI.init(this); } } ``` 3. 在布局文件中使用 QMUI 的控件,例如: ```xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:qmui="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <com.qmuiteam.qmui.widget.QMUITopBarLayout android:id="@+id/topbar" qmui:layout_constraintTop_toTopOf="parent" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize"/> <com.qmuiteam.qmui.widget.QMUIRoundButton android:id="@+id/button" android:text="Button" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </LinearLayout> ``` 在这个例子中,我们使用了 `QMUITopBarLayout` 和 `QMUIRoundButton`,它们都是 QMUI 的控件,可以通过 `xmlns:qmui="http://schemas.android.com/apk/res-auto"` 引入 QMUI 的命名空间。 在 Activity 类中,可以通过以下方式来获取控件的实例: ```java public class MyActivity extends AppCompatActivity { private QMUITopBarLayout mTopBarLayout; private QMUIRoundButton mButton; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_my); mTopBarLayout = findViewById(R.id.topbar); mButton = findViewById(R.id.button); // 设置 TopBar 的标题 mTopBarLayout.setTitle("My Activity"); } } ``` 以上就是使用 QMUI Android 的基本步骤,更多的 QMUI 控件和用法可以参考官方文档。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值