-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android开发中遇到的问题记录 #10
Comments
|
2.
|
3.
|
3.
|
4.
|
5.
|
6. 比较好的屏幕适配现在可以用as插件了,真tm高级! 另外一种思路(今日头条)相关文章 |
7. fragment 中 toolbar 的问题一个 Activity 中含有多个fragment,且每个fragment有toolbar。那么每个fragment的toolbar是不同的实例,但是 解决方案:
相关问题: |
8.SwipeRefreshLayout 与 CoordinatorLayout 嵌套刷新Appbar相关 public abstract class AppBarStateChangeListener implements AppBarLayout.OnOffsetChangedListener {
public enum State {
EXPANDED,
COLLAPSED,
IDLE
}
private State mCurrentState = State.IDLE;
@Override
public final void onOffsetChanged(AppBarLayout appBarLayout, int i) {
if (i == 0) {
if (mCurrentState != State.EXPANDED) {
onStateChanged(appBarLayout, State.EXPANDED);
}
mCurrentState = State.EXPANDED;
} else if (Math.abs(i) >= appBarLayout.getTotalScrollRange()) {
if (mCurrentState != State.COLLAPSED) {
onStateChanged(appBarLayout, State.COLLAPSED);
}
mCurrentState = State.COLLAPSED;
} else {
if (mCurrentState != State.IDLE) {
onStateChanged(appBarLayout, State.IDLE);
}
mCurrentState = State.IDLE;
}
}
public abstract void onStateChanged(AppBarLayout appBarLayout, State state);
} |
9. Toolbar 中 标题居中确保添加了下面的属性: <android.support.v7.widget.Toolbar
<TextView
android:layout_width="wrap_content"
android:layout_gravity="center"
android:gravity="center" />
</android.support.v7.widget.Toolbar> |
10.
|
11. ConstraintLayout 中 Group 的注意点
|
12.
|
13.
|
14.查看 android gradle 源码的一种方式在 dependencies 加入 |
15.高德地图POI搜索多个类别搜索多个类别。多个关键字用“|”分割 。 |
16.记录一个奇怪的bug,可能是混淆文件写的不正确kotlin package级别的一个常量导致了android 在打包混淆 时某个依赖包的asstes 文件丢失一部分
|
17.
|
18. 一行代码帮你检测Android模拟器 |
强制刷新app的依赖
|
阿里云推送的坑Android集成阿里云推送时,如果使用 |
Drawable 多次tint时的问题
|
Android O1. Service 使用
|
ADB 操作1 . adb shell am start -n "package/package+classname" |
记录在Android开发的问题,包括kotlin
The text was updated successfully, but these errors were encountered: