我现在编译好了,就在bin目录下声场了apk文件
我将其拷贝到手机,安装好后运行
控件TextView,EditText大小都不对了
变小了~
不像在模拟器里运行的那样了lauout文件如下,我是实用droiddraw生成的
在模拟器下运行大小都对着呢
<?xml version="1.0" encoding="utf-8"?>
<AbsoluteLayout
android:id="@+id/widget0"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
>
<TextView
android:id="@+id/accountLabel"
android:layout_width="45px"
android:layout_height="25px"
android:text="@string/accountLabel_name"
android:textSize="18sp"
android:layout_x="64px"
android:layout_y="98px"
>
</TextView>
<TextView
android:id="@+id/passwordLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/passwordLabel_name"
android:textSize="18sp"
android:layout_x="64px"
android:layout_y="144px"
>
</TextView>
<EditText
android:id="@+id/accountText"
android:layout_width="wrap_content"
android:layout_height="40px"
android:textSize="18sp"
android:layout_x="123px"
android:layout_y="90px"
>
</EditText>
<EditText
android:id="@+id/passwordText"
android:layout_width="wrap_content"
android:layout_height="40px"
android:textSize="18sp"
android:layout_x="122px"
android:layout_y="141px"
>
</EditText>
<Button
android:id="@+id/loginBtn"
android:layout_width="87px"
android:layout_height="45px"
android:text="@string/okBtn_name"
android:layout_x="65px"
android:layout_y="219px"
>
</Button>
<Button
android:id="@+id/quitBtn"
android:layout_width="87px"
android:layout_height="45px"
android:text="@string/cancelBtn_name"
android:layout_x="167px"
android:layout_y="219px"
>
</Button>
</AbsoluteLayout>

解决方案 »

  1.   

    主屏参数: 480×854像素 (FWVGA级) 
    MOTO的XT702
      

  2.   

    android:layout_width="45px"
    android:layout_height="25px"
    这是绝对的~
    屏幕大了~控件就是很小啦~~
      

  3.   

    你干嘛要用绝对布局呢?一般布局都用相对布局RelativeLayout或者线性布局LinearLayout
      

  4.   

    lz完全没必要用绝对布局,用线性或者相对布局就ok了