1,键盘弹出,界面View会上移,不移动方法?
代码中设置:
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
或在AndroidManifest.xml文件中界面对应的里加入
android:windowSoftInputMode="adjustPan" 键盘覆盖屏幕
android:windowSoftInputMode="stateVisible|adjustResize" 屏幕整体上移
2,ScrollView 包含的子View高度小于屏幕高度,ScrollView不会充满屏幕?
在Layout中修改ScrollView属性
android:fillViewport="true"
3,虚线如何实现
drawable文件
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line" >
<!--线宽为dashWith,线之间空隙dashGap,dashGap=0dp时,是实线 -->
<stroke
android:dashGap="10dp"
android:dashWidth="10dp"
android:width="0.6dp"
android:color="@color/all9" />
<!-- 虚线高度 -->
<size android:height="0.6dp"/>
</shape>
布局文件中引用,由于Android3.0之后关掉了硬件加速,所以需要通过布局View中layerType打开,否则显示出来仍然为实线
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="@dimen/padding12"
android:background="@drawable/divider_dotted_line"
android:layerType="software" />