我在Android平板电脑上创建应用和即时测试。这意味着即时通讯使用尺寸和位置来适应平板电脑屏幕。然而,因为这个应用程序将可用于平板电脑和手机我想知道是否有任何设备自动缩放的方式?使用地图片段将Android平板电脑应用调整为Android手机
由于
林,RSS馈送包含在列表视图和我的按钮。
即时通讯想知道如果它的复杂缩小为Android手机?还是很简单。我目前在运行4.0.4的平板电脑上进行测试,但应用程序与较新和较旧的Android版本兼容。
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/tableLayout1"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/white">
<fragment
android:id="@+id/map"
android:layout_width="300dp"
android:layout_height="413dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="@+id/button5"
class="com.google.android.gms.maps.MapFragment" />
<Button
android:id="@+id/button3"
android:layout_width="305dp"
android:layout_height="100dp"
android:layout_marginLeft="34dp"
android:layout_marginTop="10dp"
android:onClick="ClickTourismButton"
android:layout_below="@+id/map"
android:text="Touism Guide" />
<TextView
android:id="@+id/button5"
android:layout_width="34dp"
android:textIsSelectable="true"
android:layout_height="match_parent"
android:background="@color/grey"
/>
<TextView
android:id="@+id/button6"
android:layout_width="34dp"
android:textIsSelectable="true"
android:layout_alignParentRight="true"
android:layout_height="match_parent"
android:background="@color/grey"
/>
<Button
android:id="@+id/button4"
android:layout_width="305dp"
android:layout_height="100dp"
android:layout_marginLeft="34dp"
android:layout_below="@+id/button3"
android:text="Whats Nearby" />
<Button
android:id="@+id/button2"
android:layout_width="305dp"
android:layout_height="100dp"
android:layout_marginLeft="34dp"
android:layout_below="@+id/button4"
android:text="Favouites" />
<Button
android:id="@+id/button1"
style="?android:attr/buttonStyleSmall"
android:layout_width="304dp"
android:layout_marginLeft="34dp"
android:layout_height="100dp"
android:layout_below="@+id/button2"
android:text="See Full Map" />
<TextView
android:layout_width="260dp"
android:layout_height="413dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
android:textIsSelectable="true"
android:layout_toRightOf="@+id/map"
android:layout_toLeftOf="@+id/button6"
android:id="@+id/feedupdate1" />
<ListView
android:id="@android:id/list"
android:background="@color/red"
android:layout_toRightOf="@+id/map"
android:layout_width="260dp"
android:layout_marginTop="5dp"
android:layout_marginLeft="10dp"
android:layout_height="413dp" />
<TextView
android:id="@+id/empty"
android:textIsSelectable="true"
android:layout_width="260dp"
android:layout_height="413dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
/>
<TextView
android:id="@+id/feedupdate"
android:layout_width="260dp"
android:layout_height="390dp"
android:layout_marginLeft="6dp"
android:layout_marginTop="430dp"
android:textIsSelectable="true"
android:layout_toRightOf="@+id/button3"
/>
<ListView
android:id="@+id/list1"
android:background="@color/blue"
android:layout_toRightOf="@+id/button3"
android:layout_width="260dp"
android:layout_marginTop="430dp"
android:layout_marginLeft="6dp"
android:layout_height="390dp" />
</RelativeLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/LinearLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
android:background="@color/white">
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<fragment
android:id="@+id/map"
android:layout_marginTop="5dp"
android:layout_weight="1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
class="com.google.android.gms.maps.MapFragment"
/>
<Button
android:id="@+id/button3"
android:layout_weight=".10"
android:layout_marginLeft="34dp"
android:layout_marginTop="10dp"
android:layout_width="0dp"
android:layout_height="0dp"
android:onClick="ClickTourismButton"
android:label="@string/Tourism" />
<Button
android:id="@+id/button4"
android:layout_weight=".10"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginLeft="34dp"
android:label="@string/Nearby" />
<Button
android:id="@+id/button2"
android:layout_weight=".25"
android:layout_marginLeft="34dp"
android:layout_width="300dp"
android:layout_height="50dp"
android:label="@string/Favourites" />
<Button
android:id="@+id/button1"
android:layout_weight=".25"
android:layout_width="300dp"
android:layout_height="50dp"
android:layout_marginLeft="34dp"
android:label="@string/Map" />
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textIsSelectable="true"
android:id="@+id/feedupdate1" />
<ListView
android:id="@android:id/list"
android:background="@color/red"
android:layout_weight="1"
android:layout_marginTop="5dp"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginLeft="10dp"/>
<TextView
android:id="@+id/empty"
android:textIsSelectable="true"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"/>
<TextView
android:id="@+id/feedupdate"
android:layout_marginLeft="6dp"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginTop="430dp"
android:textIsSelectable="true"/>
<ListView
android:id="@+id/list1"
android:background="@color/blue"
android:layout_weight="1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginTop="430dp"
android:layout_marginLeft="6dp" />
</LinearLayout>
</LinearLayout>
你的形象没有在这里看到 – Pratik 2013-03-25 10:26:00
这个主题是广泛描述[这里](http://developer.android.com/design/style/devices-displays.html)。 – adrianp 2013-03-25 10:27:12
增加我的'reptutation'。应用程序的主屏幕是你看到的。我好奇布局缩放? ive听说你需要的是兼容性库或其他东西? – PropK 2013-03-25 10:27:54