我需要将我的页脚保持在浏览器窗口的底部,这不是粘性页脚的页面底部.
我希望它始终在屏幕上,但在浏览器窗口的底部,即使它们向上或向下滚动.
我需要在TextView中正确对齐我的文本.
怎么做到这一点?
下面是我的layout.xml文件的textview
<TextView
android:id="@+id/sampleTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/dummyTextView"
android:layout_alignLeft="@+id/dummyTextView"
android:gravity="right" />
Run Code Online (Sandbox Code Playgroud) 我使用下面的代码来创建带有复选框的对话框:
创建:
AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
LayoutInflater adbInflater = LayoutInflater.from(getContext());
LinearLayout eulaLayout = (LinearLayout) adbInflater.inflate(R.layout.checkbox, null);
dontShowAgain = (CheckBox)eulaLayout.findViewById(R.id.skip);
Run Code Online (Sandbox Code Playgroud)
checbox.xml的布局:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout_root" android:orientation="horizontal"
android:layout_height="fill_parent"
android:padding="10dp">
<CheckBox
android:text="Do not show again"
android:id="@+id/skip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android">
</CheckBox>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud) 这是我的HTML页面:
https://jsfiddle.net/62czmtvt/2/(实际看到HTML页面正常工作)
来自JSFiddle的代码:
:root {
background-color: #FFFACD;
}
div.infoguide {
width: 240px;
font-family: Arial, sans-serif;
font-size: 13px;
background-color: #F0FFF0;
}
div {
margin: 5;
padding: 0;
border: 0;
outline: 0;
}
A:link {
text-decoration: underline;
color: rgb(204, 51, 51);
}
A:visited {
text-decoration: underline;
color: rgb(204, 51, 51);
}
A:active {
text-decoration: underline;
color: rgb(204, 51, 51);
}
A:hover {
text-decoration: underline;
color: rgb(204, 51, 51);
}
body {
margin-left: 0px;
margin-top: 0px;
}
body,
td,
th {
font-family: …Run Code Online (Sandbox Code Playgroud)我想设计一个与下图完全相同的布局。
当我将线性布局 alpha 设置为透明时,其中的所有图标也变得透明并且完全正常。但我想要一种只有透明背景而不是所有项目的方法!
我想要一个像这样的透明布局:
但我的布局显示如下:
这是我的代码:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="100dp"
android:background="@color/colorPrimary"
android:orientation="vertical"
android:alpha="0.5"
>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:alpha="1"
>
<RelativeLayout
android:layout_width="1dip"
android:layout_height="fill_parent"
android:layout_weight="0.333"
android:padding="10dp"
>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@mipmap/consert"
android:layout_gravity="center_horizontal"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width="1dip"
android:layout_height="fill_parent"
android:layout_weight="0.333"
android:padding="10dp">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@mipmap/consert"
android:layout_gravity="center_horizontal"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width="1dip"
android:layout_height="fill_parent"
android:layout_weight="0.333"
android:padding="10dp">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@mipmap/consert"
android:layout_gravity="center_horizontal"
/>
</RelativeLayout>
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<RelativeLayout
android:layout_width="1dip"
android:layout_height="fill_parent"
android:layout_weight="0.333">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@mipmap/consert"
android:layout_gravity="center_horizontal"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width="1dip"
android:layout_height="fill_parent" …Run Code Online (Sandbox Code Playgroud)