Tag: 布局

淡入淡出元素,而不改变页面的布局

使用fadeIn和fadeOut时的正常行为是使用display属性 。 但是,这会更改页面的布局。 我如何使fadeIn和fadeOut不修改页面的布局?

Android覆盖了一切的顶部?

你能覆盖在android的一切视图顶部? 在iPhone中,我会得到新的视图设置frame.origin (0,0),其宽度和高度frame.origin的宽度和高度。 将它添加到self.view会导致它作为一个覆盖,覆盖背后的内容(或者如果它有一个透明的背景,然后显示后面的视图)。 在android中有类似的技术吗? 我意识到,意见稍有不同(有三种types(或更多…)relativelayout,linearlayout和framelayout),但是有什么办法只是不分青红皂白地覆盖视图的顶部?

Android:如何alignment上面的底部和listviewbutton?

我想在列表视图的底部有一个button。 如果我使用relativeLayout / FrameLayout,它会alignment,但listView会下降到很低的程度。 (在底部的button后面) 的FrameLayout: <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <ListView android:id="@+id/listview" android:layout_width="match_parent" android:layout_height="wrap_content" /> <FrameLayout android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_alignParentBottom="true"> <Button android:id="@+id/btnButton" android:text="Hello" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" /> </FrameLayout> </FrameLayout> RelativeLayout的: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <ListView android:id="@+id/listview" android:layout_width="match_parent" android:layout_height="match_parent" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true"> <Button android:id="@+id/btnButton" android:text="Hello" android:layout_width="match_parent" android:layout_height="wrap_content" […]

仅使用CSS在HTML元素之间添加空格

我有几个相同的HTML元素接踵而来: <span>1</span> <span>2</span> <span>3</span> 我正在寻找使用CSS的元素之间添加空间的最佳方式 [no space] [1] [space 10px] [2] [space 10px] [3] [no space] 另外: 请记下您收据的浏览器兼容性 UPDATE 看起来我不清楚。 我不想使用任何额外的HTML标记 <span></span> <span></span> <span class="last_span"></span> 我不想使用表格 我希望第一个和最后一个跨度被CSS自动定位 我不想使用JavaScript 可选要求:最后一个跨度可以不是父标记的最后一个子项,而是最后一个子标记的最后一个跨度。 跨度之间没有任何其他标签。

Android布局右alignment

我有以下布局 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1"> <WebView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/webview" android:layout_width="fill_parent" android:layout_height="fill_parent" /> </LinearLayout> <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="13"> <LinearLayout android:id="@+id/LinearLayout01" android:layout_width="wrap_content" android:layout_height="wrap_content"> <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1"> <ImageButton android:background="@null" android:id="@+id/back" android:layout_width="fill_parent" android:layout_height="wrap_content" android:src="@drawable/back" android:padding="10dip" /> </LinearLayout> <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1"> <ImageButton android:background="@null" android:id="@+id/forward" android:layout_width="fill_parent" android:layout_height="wrap_content" android:src="@drawable/forward" […]

在故事板中重用uiview xib

我通常喜欢在界面构build器中创build和devise我的uiviews。 有时我需要在xib中创build一个可以在故事板中的多个视图控制器中重用的单个视图。

如何强制两个数字留在LaTeX的同一页面?

我有两个图像,我想要显示在一个页面上的数字。 每个人吃了不到一半的空间,所以没有太多的空间放在那个页面上的任何其他东西,但是我知道这两个数字都有足够的空间。 我试图用[ht]和[hb]将[h]和[ht]两个数字放在一起,但是仍然无法在同一页面上显示这两个图像,而是至less在它们之间有几个段落。 我如何强迫这两个数字留在同一页?

如何让我的布局能够向下滚动?

我无法向下滚动屏幕查看“已答复:”部分中的数据。 我怎样才能让我的布局滚动?

如何使RatingBar显示五颗星

我正在遵循如何添加RatingBar的标准示例。 要控制星号的数量,我尝试使用android:numStars="5" 。 问题是,明星的数量似乎没有做任何事情。 在肖像布局,我得到6星,当我翻转手机,我得到约10星。 我试图设置加载xml的Activity( myBar.setNumStars(5) )中星号的数量,但是这个选项也没有成功。 所以我的问题是如何定义我的布局,以便它只显示五颗星? 设置numStars似乎不工作。 在此先感谢罗兰

Android:使用FrameLayout将buttonalignment到屏幕的右下angular?

我正试图把地图的缩放控制放在屏幕的右下angular。 我可以用RelativeLayout同时使用alignParentBottom="true"和alignParentRight="true" ,但与Framelayout我没有find任何这样的属性。 我如何将它与屏幕的右下angularalignment?