小编use*_*383的帖子

如何使用ListView使Fragment可滚动

我想要一个有2个ListView的Fragment.我不希望listView滚动而只是想让整个片段滚动.下面是代码:

    <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#fff" >

    <TextView
        android:id="@+id/day"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:gravity="center_horizontal"
        android:paddingTop="15dp"
        android:text="Monday"
        android:textColor="#000"
        android:textSize="55sp" />

    <TextView
        android:id="@+id/date"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/day"
        android:gravity="center_horizontal"
        android:text="27 April, 2014"
        android:textColor="#000"
        android:textSize="45sp" />

    <ListView
        android:id="@+id/home_list_time"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/date"
        android:layout_margin="10dp"
        android:background="@color/list_home_time_bg"
        android:divider="@android:color/white"
        android:dividerHeight="20.0sp" />

    <ListView
        android:id="@+id/home_list_stime"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/home_list_time"
        android:layout_margin="10dp"
        android:background="@color/list_home_stime_bg"
        android:divider="@android:color/white"
        android:dividerHeight="20.0sp" />

    </RelativeLayout>
Run Code Online (Sandbox Code Playgroud)

当我运行此代码时,第二个listView获得自己的滚动条,有没有办法停止这个并使整个片段滚动?

android listview android-listview android-fragments

5
推荐指数
1
解决办法
1万
查看次数

使用css锐利边缘到圆形边框?

我正在尝试创建一个带圆角边框的div元素.我知道使用了border-radius,但我注意到使用这个属性只会弯曲角落,如右上角,左上角等等所以我想知道是否有一些属性可以弯曲div元素的一面,像border-radius上,下,左,右的东西.

例如,div具有直的顶部,底部和左侧但是圆形的右侧.我想创建右侧,使其在顶部比底部更圆.

我的目标是创建一个右侧为圆形的div元素,不会影响顶部和底部.我的意思是右侧的曲线一到达顶部或底部就会停止.(使顶部和底部保持笔直而不是略微弯曲).

有没有办法使用CSS获得此效果?

css css3

4
推荐指数
1
解决办法
2万
查看次数

如何在gtk中打开并保存文件?

我是gtk的新手.我正在尝试制作一个简单的文本编辑器.我正在使用代码块作为我的ide.

在查看https://developer.gnome.org/gtk3/stable/GtkFileChooserDialog.html上打开和保存的文档后,显示的代码片段使用了一个名为open_file(filename)的函数.编译器抛出open_file()未声明的错误.

有人可以帮我实现这个功能吗?

c gtk

2
推荐指数
1
解决办法
2397
查看次数

标签 统计

android ×1

android-fragments ×1

android-listview ×1

c ×1

css ×1

css3 ×1

gtk ×1

listview ×1