请问关于android的控件布局问题 @u013405006 谢谢回复但是在可视化界面操作的话,很难做到最左的 “<” 返回键在 editext 键的左边, 而 搜索键在edittext的右边。但是很难通过拖动让他们对齐。这个怎么处理呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我去,那个可视化界面上不是有个放大的按钮吗?多点击几下就能够放大可视化操作的界面了,然后你就能够很好的拖动了<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="50dip" android:background="@color/layout_header" > <Button android:id="@+id/sys_back" android:layout_width="28dip" android:layout_height="28dip" android:layout_alignParentLeft="true" android:layout_centerInParent="true" android:layout_marginLeft="5dip" android:background="@drawable/ico_fanhui_01" /> <Button android:id="@+id/sys_optional" android:layout_width="35dip" android:layout_height="35dip" android:layout_alignParentRight="true" android:layout_centerInParent="true" android:layout_marginRight="10dip" android:background="@drawable/ico_person_01" /> <TextView android:id="@+id/sys_title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:layout_marginLeft="10dip" android:layout_toRightOf="@+id/sys_back" android:text="新兴系统" android:textColor="#FFFFFF" android:textSize="24sp" /></RelativeLayout>这个头部的设计样式,应该和你的是一样的,只要把TextView改成EditView就行了 @ u013405006 谢谢您的回复,放大后,可以方便拖动了。另外 我还有一个疑问,请问在可视化操作的界面,有没有ViewPager这个控件可以直接拖动的呢?(我看了并没有找出来,所以想确认下)还想问下,请问 为什么在布局文件里边要写上这句话-<android.support.v4.view.ViewPager呢?也就是说什么情况下,就要写的刚才那句代码呢? 因为比如说 添加个 imageview 并不需要类似的代码的,所以挺混淆的。麻烦会的话,告知下,谢啦。在网上下载了一个app,里边的layout目录下有这样的一个布局文件 main.xml:<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:umadsdk="http://schemas.android.com/apk/res/com.LoveBus" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <android.support.v4.view.ViewPager android:id="@+id/vPager" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_weight="1.0" android:background="#000000" android:flipInterval="30" android:persistentDrawingCache="animation" /></LinearLayout> android.support.v4.view.ViewPager 这个组件不是android.jar自带的包里面的组件,而是外部添加组件,这个组件的位置就在android.support.v4.view.ViewPager这里,android.support.v4.view.ViewPager这个其实是ViewPager这个组件类的路径 android scrollView和动态更新的TextView如何合理设计 这样界面的布局xml怎样写? 请教关于音视频同步的问题 ontouch事件遇到的问题 请问content://media/external/images/media 指的到底是什么内容啊? android 页面布局问题 ndk哪个版本可以支持 C++的STL呢? 做一个项目,如何开头啊 百度定位崩溃 自定义控件放在Scrollview中,当控件高度设置大于700dp就显示不出来 android入门学习 如何重启一个应用,应用中有Application
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="50dip"
android:background="@color/layout_header" > <Button
android:id="@+id/sys_back"
android:layout_width="28dip"
android:layout_height="28dip"
android:layout_alignParentLeft="true"
android:layout_centerInParent="true"
android:layout_marginLeft="5dip"
android:background="@drawable/ico_fanhui_01" /> <Button
android:id="@+id/sys_optional"
android:layout_width="35dip"
android:layout_height="35dip"
android:layout_alignParentRight="true"
android:layout_centerInParent="true"
android:layout_marginRight="10dip"
android:background="@drawable/ico_person_01" /> <TextView
android:id="@+id/sys_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginLeft="10dip"
android:layout_toRightOf="@+id/sys_back"
android:text="新兴系统"
android:textColor="#FFFFFF"
android:textSize="24sp" /></RelativeLayout>
这个头部的设计样式,应该和你的是一样的,只要把TextView改成EditView就行了
也就是说什么情况下,就要写的刚才那句代码呢? 因为比如说 添加个 imageview 并不需要类似的代码的,所以挺混淆的。
麻烦会的话,告知下,谢啦。在网上下载了一个app,里边的layout目录下有这样的一个布局文件 main.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:umadsdk="http://schemas.android.com/apk/res/com.LoveBus"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
>
<android.support.v4.view.ViewPager
android:id="@+id/vPager"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1.0"
android:background="#000000"
android:flipInterval="30"
android:persistentDrawingCache="animation" /></LinearLayout>