我是靠谱客的博主 痴情帆布鞋,这篇文章主要介绍Android 隐藏软键盘、进出动画、图片进行缩放,现在分享给大家,希望可以做个参考。

一、我们很多时候会用到隐藏键盘的时候 。

如何去实现:

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内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(124)

评论列表共有 0 条评论

立即
投稿
返回
顶部