android基础知识汇集

1 android中设置组件在LinearLayout中居中

 有两种方式: 在LinearLayout加上 android:gravity="center" 或 在子控件中加上 android:layout_gravity="center"

2 TextView增加滑动效果    

<ScrollView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" >

        <.TextView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:isScrollContainer="true"
            android:text="@string/txt_agreement_context"
            android:textColor="@color/button_textcolor"
            android:textSize="@dimen/bottom_button_textsize" />
    </ScrollView>

 

posted @ 2015-11-18 09:02  liuyanbo  阅读(172)  评论(0)    收藏  举报