# notes_android
**Repository Path**: louisgeek/notes_android
## Basic Information
- **Project Name**: notes_android
- **Description**: Android笔记
- **Primary Language**: Android
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2017-02-16
- **Last Updated**: 2020-12-19
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
#notes_android
一、优秀开源库:
状态栏
https://github.com/luckyandyzhang/StatusBarCompat
侧滑
https://github.com/Jude95/SwipeBackHelper
控件继承体系图
http://blog.csdn.net/lsyz0021/article/details/53144273
二、记录
1.android 主题样式
继承方式 xx.yy 继承 xx
继承方式 mm parent="nn" mm继承 nn
两个继承方式不能同时起作用 有parent 前面就是单纯的名字了
2.矢量图支持 < API 21
android.support.v7.app.AppCompatDelegate
public static void setCompatVectorFromResourcesEnabled(boolean enabled)
Sets whether vector drawables on older platforms (< API 21) can be used within android.graphics.drawable.DrawableContainer resources.
When enabled, AppCompat can intercept some drawable inflation from the framework, which enables implicit inflation of vector drawables within android.graphics.drawable.DrawableContainer resources. You can then use those drawables in places such as android:src on android.widget.ImageView, or android:drawableLeft on android.widget.TextView. Example usage:
This feature defaults to disabled, since enabling it can cause issues with memory usage, and problems updating Configuration instances. If you update the configuration manually, then you probably do not want to enable this. You have been warned.
Even with this disabled, you can still use vector resources through android.support.v7.widget.AppCompatImageView.setImageResource(int) and it's app:srcCompat attribute. They can also be used in anything which AppCompat inflates for you, such as menu resources.
Please note: this only takes effect in Activities created after this call.
3.getDimension和getDimensionPixelOffset、getDimensionPixelSize
/**
* getDimension和getDimensionPixelOffset差不多,前者返回float,后者返回int
* 如果单位是dp或sp,则需要将其乘以density。如果是px,则不乘。
* 而getDimensionPixelSize则不管写的是dp,sp,px, 都会乘以denstiy.
*/
三、配置常用
1.lib
allprojects {
repositories {
jcenter()
mavenCentral()
maven { url "https://jitpack.io" }
}}
2.compile
compile 'com.android.support:support-vector-drawable:25.1.1'
compile 'com.android.support:support-v4:25.1.1'
compile 'com.android.support:support-v13:25.1.1'
compile 'com.android.support:appcompat-v7:25.1.1'
compile 'com.android.support:recyclerview-v7:25.1.1'
compile 'com.android.support:cardview-v7:25.1.1'
compile 'com.android.support:design:25.1.1'
compile 'com.android.support:gridlayout-v7:25.1.1'
compile 'com.android.support:cardview-v7:25.1.1'
compile 'com.android.support:palette-v7:25.1.1'
compile 'com.android.support.constraint:constraint-layout:1.0.0-beta1'
compile 'com.google.code.gson:gson:2.7'
compile 'com.github.chrisbanes:PhotoView:1.3.1'
compile 'com.jakewharton:disklrucache:2.0.2'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'jp.wasabeef:glide-transformations:2.0.1'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.tencent.bugly:crashreport_upgrade:1.2.3'
compile 'com.yalantis:ucrop:2.2.0'
compile 'com.makeramen:roundedimageview:2.2.1'
compile 'com.squareup.okhttp3:okhttp:3.4.2'
compile 'com.squareup.okhttp3:logging-interceptor:3.4.2'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.jude:swipebackhelper:3.1.2'
compile 'com.yqritc:recyclerview-flexibledivider:1.4.0'
compile 'com.jaeger.statusbaruitl:library:1.3.2'
compile 'com.github.SilenceDut:jpinyin:v1.0'
compile 'com.github.promeg:tinypinyin:1.0.0'
compile 'com.github.classichu:ClassicDoubanLoadingView:1.0.0'
compile 'com.github.classichu:ClassicTitleBar:1.0.3'
compile 'com.github.classichu:ClassicDialogView:1.0.2'