Android UI框架——QMUI Android 环境搭建(一)
16lz
2021-01-23
官网:https://qmuiteam.com/android/get-started
网上的例子很多没有写清楚。
最新的库会上传到 JCenter 仓库上,请确保配置了 JCenter 仓库源,然后直接引用:
compile 'com.qmuiteam:qmui:1.1.3'
至此,QMUI 已被引入项目中。
看下图配置,否则会提示库相关的警告
dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) //implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support:appcompat-v7:27.1.0' implementation 'com.android.support.constraint:constraint-layout:1.1.3' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' implementation 'com.qmuiteam:qmui:1.1.3'}
2. 配置主题
把项目的 theme
的 parent
指向 QMUI.Compat
,至此,QMUI 可以正常工作。
3. 覆盖组件的默认表现
你可以通过在项目中的 theme
中用
的形式来覆盖 QMUI 组件的默认表现。具体可指定的属性名请参考 @style/QMUI.Compat
中的属性。
更多相关文章
- Android 开发环境下载地址 -- 百度网盘 adt-bundle android-stud
- Android自学总结――第一篇:关于导入项目时出的错误
- eclipse:运行 Android 项目时出现 “Unable to execute dex: Mult
- [转]Android的多媒体框架OpenCore(PacketVideo)介绍
- 用gradle编译任意结构的Android项目
- android轻量框架五__配置界面
- 10个经典的Android开源项目
- 在Windows下搭建Android2.2开发环境
- Android开发学习总结——搭建最新版本的Android开发环境