一、我们很多时候会用到隐藏键盘的时候 。
如何去实现:
InputMethodManager inputMsg = (InputMethodManager) LXApplication.getInstance().getSystemService(Context.INPUT_METHOD_SERVICE); if (inputMsg.isActive()) { // 隐藏软键盘 if (getCurrentFocus()!= null) { inputMsg.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0); } }
二、我们通常会给Activity添加启动动画。
如何实现:
//复写 Activity的转度动画三、我们会看到有时候我们需要对图片进行手势的放大缩小//R.anim.start 开启动画//R.anim.end 结束动画overridePendingTransition(R.anim.start, R.anim.end);
如何实现: 使用HackyViewPager
<com.senab.photoview.HackyViewPager android:id="@+id/pager" android:layout_width="match_parent" android:layout_height="match_parent" />
最后
以上就是痴情帆布鞋最近收集整理的关于Android 隐藏软键盘、进出动画、图片进行缩放的全部内容,更多相关Android内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复