我的手機是Android 6,版本比較低,所以整合有些問題
1
Android Studio Plugins、2
3
4
android 開發工具?5
6
7
android studio linearlayout?8
9
10
qt android開發。11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
configurations.all{
resolutionStrategy{
//使用QMUI
force"com.android.support:recyclerview-v7:23.1.1"
force"com.android.support:design:23.1.1"
force"com.android.support:support-vector-drawable:24.1.1"
}
}
dependencies{
compilefileTree(include:['*.jar'],dir:'libs')
/*androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})*/
//注意這個地方
//testCompile 'junit:junit:4.12'
compile'com.android.support:appcompat-v7:23.0.1'
compile'com.android.support.constraint:constraint-layout:1.0.2'
//使用QMUI
compile'com.qmuiteam:qmui:1.1.7'
//使用Android-Bootstrap
compile'com.beardedhen:androidbootstrap:2.0.1'
//compile 'com.android.support:design:23.0.1'
compile'com.shamanland:fonticon:0.1.8'
compilefiles('libs/EventBus2.4.jar')
compile'com.squareup.okhttp3:okhttp:3.11.0'
//ButterKnife使用詳解
compile'com.jakewharton:butterknife:8.4.0'
annotationProcessor'com.jakewharton:butterknife-compiler:8.4.0'
}
QMUI Android
編譯啟動的時候碰到錯誤:No resource found that matches the given name ‘@style/Widget.AppCompat.ImageButton’.
因為沒有這個樣式,所以報錯
在style.xml定義
1
2
3
AndroidManifest.xml 定義主題
1
android:theme="@style/QMUI.Compat"
但有些地方是說:ctl+點 android:theme,然后進入style.xml,修改相應Theme的parent;
1)、添加包
2、在aseets中添加font awesome-webfont.ttf文件,直接復制項目里面的aseets文件夾過去
3、在Application–>oncreate()中添加:
TypefaceProvider.registerDefaultIconSets();
4、然后布局里就可以使用bootstrap了。例如添加一個TextView
android:layout_width=”wrap_content”
android:layout_height=”wrap_content”
bootstrap:bootstrapBrand=”success”
bootstrap:fontAwesomeIcon=”fa_thumbs_o_up”/>
注意別忘記添加命名空間:xmlns:bootstrap=”http://schemas.android.com/apk/res-auto”
Bootstrap:fontAwesomeIcon=”fa_thumbs_o_up”的值需要在string.xml中提前定義好.
復制value文件夾過去,但是color.xml不能覆蓋,應該合并
Icon的選擇可以在http://fortawesome.github.io/Font-Awesome/cheatsheet/里找到
版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。
工作时间:8:00-18:00
客服电话
电子邮件
admin@qq.com
扫码二维码
获取最新动态