社区
Android
帖子详情
android请教,求好心人解答
Mr_JJ_Lian
2012-03-23 05:12:23
我的android UI在分辨率为480x800的手机上布局正确,但是到了400x480就乱了!请为用相对布局可以解决这个问题吗??但是用相对布局又不能很好精确到我想要的位置!请问大家有什么好的办法吗????
...全文
80
7
打赏
收藏
android请教,求好心人解答
我的android UI在分辨率为480x800的手机上布局正确,但是到了400x480就乱了!请为用相对布局可以解决这个问题吗??但是用相对布局又不能很好精确到我想要的位置!请问大家有什么好的办法吗????
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
7 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
Mr_JJ_Lian
2012-03-23
打赏
举报
回复
[Quote=引用 6 楼 leer168 的回复:]
2种方案
1.一种布局适应不同的分辨率
2.为不同的分辨率建立不同的布局
看哪种适合你的需求
[/Quote]
采用第一种就是要写成相对布局,但是相对布局又很难写出精确的大小和位置!
leer168
2012-03-23
打赏
举报
回复
2种方案
1.一种布局适应不同的分辨率
2.为不同的分辨率建立不同的布局
看哪种适合你的需求
Mr_JJ_Lian
2012-03-23
打赏
举报
回复
[Quote=引用 3 楼 freshui 的回复:]
设计几套UI,分别加载
[/Quote]
只有这种办法吗??
Mr_JJ_Lian
2012-03-23
打赏
举报
回复
只有这种办法吗??
freshui
2012-03-23
打赏
举报
回复
设计几套UI,分别加载
Mr_JJ_Lian
2012-03-23
打赏
举报
回复
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/widget41"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background" >
<!--
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="0dip"
android:layout_marginTop="15dip"
>
<LinearLayout
android:id="@+id/ll_bt_data_config"
android:layout_width="70dip"
android:layout_height="40dip"
android:layout_x="100dip"
android:layout_y="20dip"
android:background="#8B8378" />
<LinearLayout
android:id="@+id/ll_bt_data_config1"
android:layout_width="70dip"
android:layout_height="40dip"
android:layout_x="30sp"
android:layout_y="20sp"
android:background="#8B8378" />
<LinearLayout
android:id="@+id/ll_bt_data_config2"
android:layout_width="120px"
android:layout_height="62px"
android:layout_x="210dp"
android:layout_y="20dp"
android:background="#8B8378" />
</RelativeLayout>
-->
<RelativeLayout
android:id="@+id/widget40"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dip" >
<LinearLayout
android:id="@+id/ll_bt_data_config"
android:layout_width="77dip"
android:layout_height="40dip"
android:layout_marginLeft="25dip"
android:background="#8B8378"
android:orientation="vertical" >
</LinearLayout>
<LinearLayout
android:id="@+id/ll_bt_data_config1"
android:layout_width="77dip"
android:layout_height="40dip"
android:layout_marginLeft="120dip"
android:background="#8B8378"
android:orientation="vertical" >
</LinearLayout>
<LinearLayout
android:id="@+id/ll_bt_data_config2"
android:layout_width="77dip"
android:layout_height="40dip"
android:layout_marginLeft="215dip"
android:background="#8B8378"
android:orientation="vertical" >
</LinearLayout>
</RelativeLayout>
<!--
<AbsoluteLayout
android:id="@+id/widget171"
android:layout_width="316px"
android:layout_height="42px"
android:layout_x="2dp"
android:layout_y="16dp" >
<zsc.edu.lian.ImageButton1
android:id="@+id/button01"
android:layout_width="62px"
android:layout_height="30px"
android:layout_x="22dp"
android:layout_y="5dp"
android:src="@drawable/button"
android:textColor="#000000" />
<zsc.edu.lian.ImageButton1
android:id="@+id/button02"
android:layout_width="62px"
android:layout_height="30px"
android:layout_x="115dp"
android:layout_y="5dp"
android:background="#FFFFFF"
android:src="@drawable/button"
android:text="Button" />
<zsc.edu.lian.ImageButton1
android:id="@+id/button03"
android:layout_width="62px"
android:layout_height="30px"
android:layout_x="211dp"
android:layout_y="5dp"
android:src="@drawable/button"
android:text="Button" />
</AbsoluteLayout>
-->
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="75dip" >
<TextView
android:id="@+id/textview01"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg3" />
<TextView
android:id="@+id/textview11"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="130dip"
android:layout_marginTop="25dip"
android:text="@string/app_name"
android:textColor="#FFFFFF"
android:textSize="13sp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/widget178"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="128dip" >
<EditText
android:id="@+id/edittext1"
android:layout_width="220dip"
android:layout_height="30dip"
android:layout_marginLeft="17dip"
android:layout_marginTop="10dip"
android:background="@drawable/myeditview"
android:textColor="#000000"
android:textSize="15sp" />
<Button
android:id="@+id/button04"
android:layout_width="55dip"
android:layout_height="35dip"
android:layout_marginLeft="235dip"
android:layout_marginTop="8dip"
android:background="@drawable/button_new"
android:text="@string/sousuo_name"
android:textColor="@color/white"
android:textSize="10dp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="13dip"
android:layout_marginTop="167dip" >
<ListView
android:id="@+id/listView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dip" />
</RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dip"
android:layout_marginTop="442dip" >
<TextView
android:id="@+id/textviewball"
android:layout_width="10dip"
android:layout_height="10dip"
android:layout_marginLeft="109dip"
android:background="@drawable/ball1" />
<TextView
android:id="@+id/textviewball1"
android:layout_width="10dip"
android:layout_height="10dip"
android:layout_marginLeft="120dip"
android:background="@drawable/ball2" />
<TextView
android:id="@+id/textviewball2"
android:layout_width="10dip"
android:layout_height="10dip"
android:layout_marginLeft="131dip"
android:background="@drawable/ball2" />
<TextView
android:id="@+id/textviewball3"
android:layout_width="10dip"
android:layout_height="10dip"
android:layout_marginLeft="142dip"
android:background="@drawable/ball2" />
<TextView
android:id="@+id/textviewball4"
android:layout_width="10dip"
android:layout_height="10dip"
android:layout_marginLeft="153dip"
android:background="@drawable/ball2" />
<TextView
android:id="@+id/textviewball5"
android:layout_width="10dip"
android:layout_height="10dip"
android:layout_marginLeft="164dip"
android:background="@drawable/ball2" />
</RelativeLayout>
</RelativeLayout>
这是我的布局,,这个布局一到不同分辨率的手机,呈现的效果就不同了!
小笨熊
2012-03-23
打赏
举报
回复
呵呵,兼容性问题。。。不管用啥布局都可以,那你怎么设置了
题解 | #
求
小球落地5次后所经历的路程和第5次反弹的高度#
】学校在北方,全是北京上海的推送,好难筛
求
个
好心人
分享一下好人有好报! 机械9月投递记录 #机械制造投递记录#双九硕,项目主要是结构和仿真,投递以研究所为主9.1 vivo CAE 已测评9.1 复旦微电子 工艺 评估中9.3 ...
获取员工其当前的薪水比其manager当前薪水还高的相关信息
求
求
大佬,救救萌新,北京金风科技下属金风慧能(软件助理工程师)17K/月,私企,还是上海国核自仪(岗位不确定,应该是工程岗)17W+3w/年,央企正式员工,没宿。本人双非硕,河北人,菜鸡一枚,目前有以下三个工作...
题解 | #统计每个月兔子的总数#个人感觉最直观的解法
实习工作自定义view 过程中要注意的点(触摸事件...实习结束需要回学校了,合租房,朝南带小阳台,采光很好,位置上海闵行区大上海国际花园6楼,房东人也挺好的还有家具定期的维修,来了和房东签合同,我大概3.29搬走,
webmagic采集CSDN的Java_WebDevelop页面
,
请教
hibernate排序问题, java 权限管理, 如何实现在jsp页面中选择txt文件,点击下载时进行下载, 帮忙注释下面代码,谢谢, HIBERNATE HQL查询问题
请教
, 第一次发帖,
求
各位大神帮忙解决个tomcat问题。, 大家帮忙看...
【虹软科技25届实习】--算法&;开发&;产品&;测试岗可转正
工作地:深圳 or 上海方向:1、
Android
开发,ROS开发 2、AI算法(机器学习 深 题解 | #JAVA字符串分隔# import java.util.Scanner;public class Main { public static void main ( String 简历都过不去,找实习,...
Android
80,493
社区成员
91,382
社区内容
发帖
与我相关
我的任务
Android
移动平台 Android
复制链接
扫一扫
分享
社区描述
移动平台 Android
android
android-studio
androidx
技术论坛(原bbs)
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章