随笔(二十四)

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_27073205/article/details/81366164

1.Android Studio 快捷键之切换大小写
大小写切换
Ctrl+Shift+U
Edit ToggleCase
2.Android自定义PopupWindow显示在控件上方或者下方
https://www.cnblogs.com/woaixingxing/p/5563171.html
https://www.jb51.net/article/106192.htm
https://www.jianshu.com/p/825d1cc9fa79
https://blog.csdn.net/ben0612/article/details/43191205
https://blog.csdn.net/dxj007/article/details/8026691
https://blog.csdn.net/Justwen26/article/details/61621076
3.[Android开发] RxJava2之路三 - 调度器Scheduler与线程控制
https://blog.csdn.net/niubitianping/article/details/54952827
observeOn() 指定的是它之后的操作所在的线程。因此如果有多次切换线程的需求,只要在每个想要切换线程的位置调用一次 observeOn() 即可。 subscribeOn() 的位置放在哪里都可以,但它是只能调用一次的。

Observable.just(1, 2, 3, 4) // IO 线程,由 subscribeOn() 指定
.subscribeOn(Schedulers.io())
.observeOn(Schedulers.newThread())
.map(mapOperator) // 新线程,由 observeOn() 指定
.observeOn(Schedulers.io())
.map(mapOperator2) // IO 线程,由 observeOn() 指定
.observeOn(AndroidSchedulers.mainThread)
.subscribe(subscriber); // Android 主线程,由 observeOn() 指定

4.Android利用动画实现背景逐渐变暗
https://www.jb51.net/article/100125.htm
0-255
/**
* Specify an alpha value for the drawable. 0 means fully transparent, and
* 255 means fully opaque.
*/
public abstract void setAlpha(@IntRange(from=0,to=255) int alpha);
5.Android中getDrawable和getColor过时的替代方法

int colorInt = getResources().getColor(R.color.colorAccent);//返回的是color的int类型值:-49023
int colorInt2 = ContextCompat.getColor(this, R.color.colorAccent);//返回的是color的int类型值:-49023

Drawable drawable = getResources().getDrawable(R.mipmap.ic_launcher);
Drawable drawable2 = ContextCompat.getDrawable(this,R.mipmap.ic_launcher);
6.android中如何获得drawable的颜色值?
https://zhidao.baidu.com/question/455188910525242005.html
setBackgroundDrawable(new ColorDrawable(color));
7.HeaderViewListAdapter cannot be cast to listAdapter问题原因及解决办法
https://www.cnblogs.com/misybing/p/5042482.html

猜你喜欢

转载自blog.csdn.net/qq_27073205/article/details/81366164