![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
android
zhdong
asdfasdfa
展开
-
PopupWindow 外部点击的时候,PopupWindow是弹出,还是非模态
经过测试 mPopupWindow.setBackgroundDrawable(getResources().getDrawable( R.drawable.textviewback));原创 2014-05-05 14:40:09 · 383 阅读 · 0 评论 -
android软键盘打开页面不弹出
activity的XML配置增加下android:focusable="true" android:focusableInTouchMode="true" android:windowSoftInputMode="adjustUnspecified|stateHidden"原创 2014-03-25 14:25:41 · 376 阅读 · 0 评论 -
Android textview 多行显示
TextView android:id="@+id/text_view" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="false" android:maxLines="10"转载 2014-04-09 16:55:32 · 908 阅读 · 0 评论 -
android 三方API
1. 使用上拉更多,下拉刷新:https://github.com/JosephPeng/XListView-Android这个是github上面更为火爆的:https://github.com/chrisbanes/Android-PullToRefresh2. 侧滑的菜单:SlidingMenu.rar(自己导入support-4v包)推荐github上面一个很好的库,不过这个转载 2014-04-11 14:03:05 · 370 阅读 · 0 评论 -
requestLayout,invalidate
requestLayout:当view确定自身已经不再适合现有的区域时,该view本身调用这个方法要求parent view重新调用他的onMeasure onLayout来对重新设置自己位置。特别的当view的layoutparameter发生改变,并且它的值还没能应用到view上,这时候适合调用这个方法。invalidate:View本身调用迫使view重画。转载 2014-10-27 14:10:08 · 343 阅读 · 0 评论 -
android 图片显示崩溃
106.186.115.23811111111111111111b#y#c5152! BitmapFactory.Options options = new BitmapFactory.Options();options.inSampleSize = 4;// 图片宽高都为原来的二分之一,即图片为原来的四分之一Bitmap bmp = BitmapFactory.decodeFile(转载 2014-11-07 13:40:22 · 481 阅读 · 0 评论 -
android 自适应空间大小
再空间内得到屏幕像素:WindowManager a = (WindowManager)context.getSystemService(Context.WINDOW_SERVICE);Display d1 = a.getDefaultDisplay(); // 获取屏幕宽、高用Point size = new Point();d1.getSize(size);in原创 2015-05-07 15:05:54 · 245 阅读 · 0 评论 -
webview ontouchevent 实效,增加
mWebView.getSettings().setBuiltInZoomControls(false)原创 2016-01-13 18:19:22 · 803 阅读 · 0 评论 -
兼容安卓7,8自动更新
1,安卓7后不能直接file://访问使用了provider2,安卓手机安装陌生应用权限<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"/><provider android:name="android.support.v4.content.FileProvider" ...原创 2018-04-12 09:24:34 · 774 阅读 · 0 评论