项目地址:ChildLayout一. 问题起因:新项目中首页有这么一个需求:看布局:主要就是“大牌专场”这个栏目的布局问题,呈现一个,左——右上——右下 的形式,因为不能像 iOS 那样直接根据 UED 给的标注来写死布局尺寸,Android 混乱的分辨率决定了这个布局需要采用 android:layout_height="wrap_content" 的形式来决定它的高。二. 解决方法1:使用 Li...
分类:
其他好文 时间:
2015-07-01 23:44:42
阅读次数:
404
当输入文字过多的时候,固定的高度,让字体可以滚动查看:
<ScrollView
android:id="@+id/ScrollView2"
android:layout_width="fill_parent"
android:layout_height="200px"
android:layout_marginBottom="8d...
分类:
其他好文 时间:
2015-06-26 16:19:19
阅读次数:
122
下面是布局文件里的代码,有两个TextView,但是为什么运行后只显示第一个TextView?? 1 2 6 10 11 15 16 解决办法:android:layout_width="match_parent" android:layout_height="m...
分类:
系统相关 时间:
2015-06-26 16:15:11
阅读次数:
167
<?xmlversion="1.0"encoding="utf-8"?>
<FrameLayoutxmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/view_compass"
android:layout_..
分类:
移动开发 时间:
2015-06-26 15:09:20
阅读次数:
219
xml文件代码部分<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<Image..
分类:
移动开发 时间:
2015-06-25 21:23:55
阅读次数:
170
1,titlebar button + textview实现 在layout文件夹内创建titlebar.xml文件 创建一个水平linearlayout ,将button与text放进去,根绝上一节的 自适应特性 设置 layout-width 与layout-height 值...
分类:
移动开发 时间:
2015-06-25 19:04:24
阅读次数:
259
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity" ...
分类:
其他好文 时间:
2015-06-25 17:35:24
阅读次数:
115
edittext 默认自动获取焦点的 而且会出现小键盘很烦人
android:id="@+id/focus"
android:layout_width="fill_parent"
android:layout_height="60dp"
android:background="#E...
分类:
其他好文 时间:
2015-06-25 12:28:30
阅读次数:
150
最近看到同事写的一段代码,很简单吧就是:
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:orientation...
分类:
移动开发 时间:
2015-06-24 11:01:00
阅读次数:
122
xml文件<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="5dp"
&g..
分类:
移动开发 时间:
2015-06-23 18:12:19
阅读次数:
144