Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/180.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 钛移动相对布局_Android_Layout_Titanium_Fill Parent - Fatal编程技术网

Android 钛移动相对布局

Android 钛移动相对布局,android,layout,titanium,fill-parent,Android,Layout,Titanium,Fill Parent,我正在使用Tianium mobile创建android应用程序。 如何使用垂直布局创建此界面 ---------------- Header View } height = 40dp ----------------- Content View } height = fill_parent ---------------- 在官方的android sdk中,我们有填充父级大小来将内容视图拉伸到底部。将高度设置为“自动”将根据内容的高度调整高度;将其设置为“1

我正在使用Tianium mobile创建android应用程序。 如何使用垂直布局创建此界面

----------------
Header View        } height = 40dp
-----------------


 Content View      } height = fill_parent


----------------
在官方的android sdk中,我们有填充父级大小来将内容视图拉伸到底部。将高度设置为“自动”将根据内容的高度调整高度;将其设置为“100%”将覆盖整个屏幕

我已经寻找这个答案好几天了,非常感谢你的帮助

编辑: 另一个问题是,如果标题视图位于底部会怎样

-----------------


 Content View      } height = fill_parent


----------------
 Header View        } height = 40dp
----------------

内容视图应该是这样的(就像你也可以用HTML那样)

如果该条位于底部,只需将其旋转:

var content_view = Ti.UI.createView({
    top: 0,
    bottom: 40
});

谢谢,但是如果标题视图在底部呢?(添加到我原来的问题)扭转它:)那么简单:)添加到我的答案
var content_view = Ti.UI.createView({
    top: 0,
    bottom: 40
});