小编Sac*_*hin的帖子

查看ExpandableListView下面的内容

我有一组TextView下面一个S ExpandableListView在我的.xml文件.当列表展开时,所有TextViews隐藏在屏幕下方.我试着把我的清单放在一个ScrollView结果是一个非常糟糕的主意.

有没有办法让我能够滚动查看我的TextViews?

这是我的样本xml布局,可能有一些用处..

<RelativeLayout 
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical" >

        <TextView
            android:id="@+id/textview1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="10dp"
            android:layout_marginRight="10dp"
            android:layout_marginTop="10dp"
            android:layout_alignParentTop="true" />

        <ExpandableListView
            android:id="@+id/elv"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/textview1"
            android:layout_marginLeft="10dp"
            android:layout_marginRight="10dp"
            android:groupIndicator="@null" />

        <TextView
                android:id="@+id/tvone"
                android:layout_width="fill_parent"
                android:layout_height="50dp"
                android:layout_marginTop="1dp"
                android:layout_below="@id/elv"
                android:background="@android:color/white"
                android:drawableRight="@drawable/arrow_left_grey"
                android:gravity="center_vertical"
                android:paddingLeft="15dp"
                android:paddingRight="20dp"
                android:text="xyz" />


        <LinearLayout
            android:id="@+id/middle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/tvone"
            android:layout_margin="10dp"
            android:orientation="vertical" >

            <TextView
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/number" />

            <TextView
                android:layout_width="fill_parent"
                android:layout_height="50dp"
                android:background="@android:color/white"
                android:drawableRight="@drawable/arrow_left_grey"
                android:gravity="center_vertical"
                android:paddingLeft="15dp"
                android:paddingRight="20dp"
                android:text="number1" />

            <TextView
                android:layout_width="fill_parent"
                android:layout_height="50dp"
                android:layout_marginTop="1dp"
                android:background="@android:color/white"
                android:gravity="center_vertical" …
Run Code Online (Sandbox Code Playgroud)

android scrollview textview expandablelistview android-ui

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

pip install python3-memcached失败

当我尝试使用以下命令安装python3-memcached时,

pip install python3-memcahed
Run Code Online (Sandbox Code Playgroud)

它失败并出现以下错误输出,

Collecting python3-memcached  
Using cached python3-memcached-1.51.tar.gz
Traceback (most recent call last):
  File "<string>", line 20, in <module>
  File "/private/var/folders/pl/5d9_g9ld38d9r_36fhqwzzb40000gp/T/pip-build-UuR8g9/python3-memcached/setup.py", line 4, in <module>
    import memcache
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

  File "<string>", line 20, in <module>

  File "/private/var/folders/pl/5d9_g9ld38d9r_36fhqwzzb40000gp/T/pip-build-UuR8g9/python3-memcached/setup.py", line 4, in <module>

    import memcache

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/pl/5d9_g9ld38d9r_36fhqwzzb40000gp/T/pip-build-UuR8g9/python3-memcached
Run Code Online (Sandbox Code Playgroud)

上述错误中指定的文件路径不存在.

仅供参考:我用brew来安装python3

python memcached python-3.x

3
推荐指数
1
解决办法
2642
查看次数

Facebook位置ID的意义

发出请求朋友姓名,身份和位置的api电话,

FB.api('/me/friends', {fields: 'name,id,location'}, function(response) {
//...
});
Run Code Online (Sandbox Code Playgroud)

返回位置(id和name)的两个参数."name"参数指定朋友位置,但"id"参数的重要性是什么?

如果该参数非常重要,那么它如何对Facebook应用程序开发人员有用?

我一直在寻找这个问题的答案.

提前致谢.

facebook facebook-graph-api facebook-javascript-sdk

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

ReactJS中"this"之谜

我对Facebook的React世界还不熟悉.他们的文档看起来非常好,但有一些方面我需要一点点清晰度.这是其中之一.

Src:http://tuts-javascript.appspot.com/reactjs-add-remove-table-row

    var CompanyApp = React.createClass({
    getInitialState: function() {
      return {companylist:this.props.companies};
    },
    handleNewRowSubmit: function( newcompany ) {
      this.setState( {companylist: this.state.companylist.concat([newcompany])} );
    },
    handleCompanyRemove: function( company ) {

      var index = -1;   
      var clength = this.state.companylist.length;
        for( var i = 0; i < clength; i++ ) {
            if( this.state.companylist[i].cname === company.cname ) {
                index = i;
                break;
            }
        }
        this.state.companylist.splice( index, 1 );  
        this.setState( {companylist: this.state.companylist} );
    },
    render: function() {
      var tableStyle = {width: '100%'};
      var leftTdStyle …
Run Code Online (Sandbox Code Playgroud)

facebook reactjs react-router react-native

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