首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

软键盘弹出的时候界面被挤上去的有关问题

2012-08-11 
软键盘弹出的时候界面被挤上去的问题布局文件大概是这样的LinearLayout??????? LinearLayout???????????

软键盘弹出的时候界面被挤上去的问题

布局文件大概是这样的

<LinearLayout

??????? <LinearLayout

???????????????? android:id="@+id/title"/>

??????? <ScrollView

???????????????? android:id="@+id/scrollview"/>

/>

?

我希望的是当键盘弹出的时候不要隐藏title的布局

一直都不行,

发现如果把1. Scrollview的android:scrollbars = "gone"

并在manifest文件中的Activity中加入

2. android:windowSoftInputMode="adjustUnspecified|stateHidden"去掉就可以了

?

而下面这句好像没有用啊?

android:windowSoftInputMode="adjustPan"

?

?

?

?

?

但是这样的话如何去掉ScrollView的滚动条呢?

?

在stackoverflow找到

?

android:scrollbarThumbVertical="@drawable/trans_pic"? 设置一张透明的图片就可以了

?

竖直方向:android:scrollbarThumbHorizontal

?

?

?

?

?

?

?

?

?

热点排行