【问题标题】:How to Change height,width in curlView?如何在 curlView 中更改高度、宽度?
【发布时间】:2012-03-29 12:13:14
【问题描述】:

我点击此链接https://github.com/harism/android_page_curl 现在我想修改 curlview 的大小,我已经尝试在 main.xml 文件中更改 android:layout_width="fill_parent" android:layout_height="fill_parent" 但它不起作用。 所以,请告诉我如何更改 curlView 的高度、宽度和背景。 谢谢

【问题讨论】:

    标签: android


    【解决方案1】:

    对于宽度和高度的更改,您可以将该自定义视图放在线性布局中并更改线性布局属性,如下所示。

    <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_marginRight="50dp"
            android:layout_marginLeft="20dp"
            android:layout_marginTop="20dp"
            android:layout_marginBottom="20dp"
            android:layout_weight="1"
            android:orientation="vertical" >
    
            <com.mobinius.hungama.curl.CurlView
                android:id="@+id/curl"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent" />
    
        </LinearLayout>
    

    背景色

    mCurlView.setBackgroundColor(0xFF202830);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-10-28
      • 1970-01-01
      • 2014-01-12
      • 2013-01-05
      • 1970-01-01
      • 2015-03-30
      • 2014-09-26
      相关资源
      最近更新 更多