我有一个android.support.v4.preference.PreferenceFragment,它使用以下PreferenceScreen:
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:title="Cat1"
android:key="pref_cat1">
<ListPreference
android:key="pref_list1"
android:title="@string/pref_list1"
android:dialogTitle="@string/pref_list1"
android:entries="@array/pref_list1_entries"
android:entryValues="@array/pref_list1_entries"
android:defaultValue="@string/pref_list1_default"/>
<EditTextPreference
android:key="pref_text2"
android:title="@string/pref_text2"
/>
</PreferenceCategory>
<PreferenceCategory
android:title="Cat2"
android:key="pref_cat2">
<EditTextPreference
android:key="pref_text3"
android:title="@string/pref_text3"
/>
</PreferenceCategory>
Run Code Online (Sandbox Code Playgroud)
显示PreferenceFragment时,会在首选项之间显示一些分隔符,但也会在每个PreferenceCategory的名称下显示.虽然我可以通过访问PreferenceFragment的ListView轻松修改首选项之间的分隔符颜色,但这对PreferenceCategory分隔符没有影响.
如何改变这种分隔线的颜色?
android android-preferences divider android-styles preferencefragment
从我的问题的标题,我的问题很清楚.我有一个自定义listView和标题和一些项目.当然,我在所有项目之间添加了分隔线.我唯一不想要的是标题和第一项之间的分隔符.但是,下面的代码不起作用..我也想知道这一行的确切工作
list.setHeaderDividerEnabled(false);
Run Code Online (Sandbox Code Playgroud)
我搜索过并尝试了很多也访问了这个链接,但没有运气..
提前致谢.
更新!
public class ListView extends android.widget.ListView {
private OnScrollListener onScrollListener;
private Onscroll onscrollObj;
public ListView(Context context) {
super(context);
onCreate(context, null, null);
}
public ListView(Context context, AttributeSet attrs) {
super(context, attrs);
onCreate(context, attrs, null);
}
public ListView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
onCreate(context, attrs, defStyle);
}
@SuppressWarnings("UnusedParameters")
private void onCreate(Context context, AttributeSet attrs, Integer defStyle) {
setListeners();
}
private void setListeners() {
super.setOnScrollListener(new OnScrollListener() {
private int oldTop;
private int …Run Code Online (Sandbox Code Playgroud) 在我的style.css我有:
.navbar-default .navbar-nav > li > a {
color: #fff;
border-right: 1px solid rgba(0,0,0,.2);
box-shadow: 1px 0 0 rgba(255, 255, 255, 0.10);
}
Run Code Online (Sandbox Code Playgroud)
这会导致我的菜单显示:Home | 关于| 博客| 购物|
我希望它显示:主页/关于/博客/商店
有没有人对我有任何暗示?我试过了:
.navbar-default .navbar-nav > li > a {
color: #fff;
content: "/" rgba(0,0,0,.2);
}
Run Code Online (Sandbox Code Playgroud)
但这只是让分隔符完全消失了.
我在Bootstrap自己的一些页面上有一个例子:http: //getbootstrap.com/components/ 在标题文本"Glyphicons"下看看有一条1px高灰度水平线?它是一些自动插入标题下的分隔符,但我无法弄清楚需要更改哪些样式属性来修复它.谢谢.
美好的一天。
我在这个网站上浏览有关如何在Flutter中的列上的小部件之间添加垂直分隔线的信息?但是我什么都没有。
我已经做了水平分隔线。但是,当我尝试制作一个垂直分隔线来分隔两个对象(文本|图像)时,我什么也没得到。
这是代码:
Row(children: <Widget>[
Expanded(
child: new Container(
margin: const EdgeInsets.only(left: 10.0, right: 20.0),
child: Divider(
color: Colors.black,
height: 36,
)),
),
Text("OR"),
Expanded(
child: new Container(
margin: const EdgeInsets.only(left: 20.0, right: 10.0),
child: Divider(
color: Colors.black,
height: 36,
)),
),
]),
Run Code Online (Sandbox Code Playgroud)
上面的代码是水平的
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
Row(
children: <Widget>[
Image.asset('images/makanan.png', width: 30,),
Text('Diskon 20%', style: TextStyle(fontSize: 5, color: Colors.green),)
],
),
VerticalDivider(
color: Colors.red,
width: 20,
),
Row(
children: <Widget>[
Image.asset('images/makanan.png', width: 30,),
Text('Diskon 20%', …Run Code Online (Sandbox Code Playgroud) 我有一个小节,我想知道如何html在每个小节之间放置分隔线,但不知道如何做到这一点,所以如果我能得到任何建议或帮助,我将不胜感激。
<div>
<a mat-list-item *ngFor="let subsection of section.subSections" (click)="navigateToSubsection(section.id,subsection.id)">{{subsection.sectionName}}
</a>
</div>
Run Code Online (Sandbox Code Playgroud)
例如这样的事情:
我有两个 StackPanes(pane1 和 pane2)显示在 SplitPane (splitPane) 中。SplitPane 的分隔线位置在构建器中设置为 0.3。第二个 StackPane (pane2) 包含一个 Button,它也将 SplitPane 的分隔线位置设置为 0.3。
在其他条件不变的情况下,预期的行为是两个操作(在构建器中设置分隔符位置并通过操作设置分隔符位置)都有效或无效。
然而,只有后者才真正起作用。
SplitPane 的构造和 Button 的 onAction 之间有什么变化。是什么阻碍了分隔器在构建器中的放置?
StackPane pane1 = new StackPane();
StackPane pane2 = new StackPane();
final SplitPane splitPane = SplitPaneBuilder.create()
.items(pane1, pane2)
// Environment A
.dividerPositions(new double[] {.3}) // splitPane.setDividerPosition(s)(...), etc. yield same result
.orientation(Orientation.HORIZONTAL)
.build();
// The following line influences environment A outcome, though it does not fix the issue
SplitPane.setResizableWithParent(pane1, false);
pane2.getChildren().add(ButtonBuilder.create()
.text("Divider Position")
.onAction(new EventHandler<ActionEvent>() {
@Override
public …Run Code Online (Sandbox Code Playgroud) 
我想将上面显示的数字选择器的分隔线颜色(蓝色)更改为透明。我尝试了很多事情,比如
number_picker.setDividerDrawable(getResources().getDrawable(R.color.transparent));
number_picker.setShowDividers(NumberPicker.SHOW_DIVIDER_NONE);
Run Code Online (Sandbox Code Playgroud)
我也试过设置 android:divider in xml 但没有一个工作
然后我尝试使用样式设置它,但是当我将以下条目放入我的样式时,它说所需的最低版本为 14,而我的应用程序的最低版本为 11
<style name="AppTheme" parent="@android:style/Widget.DeviceDefault.DatePicker">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
<item name="android:divider">@color/transparent</item>
</style>
Run Code Online (Sandbox Code Playgroud)
谁能建议我如何实现这一目标?
我有一张 224w x 400h 的图像。漂浮在该图像上的是一个简单的形式。
我的目标是使包含该图像+覆盖形式的 div 在移动设备上查看时占据整个屏幕。我尝试了使用媒体标头、视口元数据和大量我从类似的堆栈溢出问题中拼凑而成的 css 的各种组合。我目前不知道下一步该做什么。
我还尝试至少将 img+form 居中,但我放弃了它,因为它不相对于移动设备屏幕尺寸居中。(相反,它将 div 推离屏幕并创建水平滚动条,就好像它认为移动设备屏幕非常宽一样。)
如何更改以便移动设备能够用我指定的 div 填满其屏幕?(或者至少,将 fullsrceen div 类集中在移动设备的较小屏幕上。)非常感谢任何帮助!
当前 HTML
<!DOCTYPE html>
<html>
<head>
<title>Reg</title>
<meta name="viewport" content="target-densitydpi=device-dpi">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
<link href="Form.css" rel="stylesheet">
</head>
<body>
<div class="fullscreen" id="fullscreen">
<div style="position:relative">
<img src="fbg.png" alt="" />
<div style="position:absolute;left:0;top:0;">
<div id"=main">
<form method="post" action="SMA_Send2.php">
<label for="form">
First Name: <input type="text" maxlength="20" name="Fname" required><br />
Last Name: <input type="text" maxlength="36" name="Lname" required><br />
Student ID: <input type="number" …Run Code Online (Sandbox Code Playgroud) 在我的应用程序中,我正在创建家庭小部件,但我有问题找到如何在2个TextViews之间创建简单的水平分隔符/分隔符.
这是一个家庭小部件布局:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/widget_RL_id"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#09C"
android:padding="@dimen/widget_margin">
<TextView
android:id="@+id/widget_title_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:contentDescription="@string/appwidget_text"
android:text="@string/appwidget_text"
android:textSize="20sp"
android:textStyle="bold|italic"
android:layout_marginStart="5dp"
android:layout_marginEnd="5dp"/>
<TextView
android:id="@+id/widget_datum_id"
android:layout_alignParentEnd="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Datum"
android:textStyle="bold|italic"
android:textSize="8sp"
android:layout_margin="8dp"
/>
<TextView
android:id="@+id/widget_theRest_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/widget_title_id"
android:layout_centerHorizontal="true"
android:layout_marginTop="8dp"
android:contentDescription="@string/appwidget_text"
android:text="@string/appwidget_text"
android:textColor="#ffffff"
android:textSize="20sp"
android:textStyle="bold|italic"
android:layout_marginStart="5dp"
android:layout_marginEnd="5dp"/>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)
我想在两个TextViews之间放置分隔符/分隔符,其中第一个视图是id:widget_title_id,第二个视图是id:widget_theRest_id.
我尝试以这种方式添加divider,但是android主页小部件不支持View,所以它不起作用或者可能是我做错了:
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="@id/widget_title_id"
android:background="@android:color/darker_gray"/>
Run Code Online (Sandbox Code Playgroud)