2015/8/31

2015/8/31问题集

for each循环

  • 1.首先要传入多个参数
  • 2.for(View i:view)这里这个View要与传入的类型是相同的。
  • 3.i是要传入的每个值

o

private void ViewGone(View... view){
    for (View i:view){
        i.setVisibility(View.GONE);
    }

使用theme将ActionBar隐藏

再目录:\main\res\values\strings.xml 中的theme中更改

<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <!-- Customize your theme here. -->
</style>

</resources>

再AndroidManifest.xml的application中更改设置

<application

 android:theme="@style/AppTheme" >

EditText 不要背景下面的横线

<EditText

              android:background="@null"
              />

text文字加粗

android:textStyle=”bold”

调用string中的东西

tvTopBarTitle.setText(R.string.myinfo_title);

主布局LinearLayout之—-fitsSystemWindows

设置应用布局时是否考虑系统窗口布局;如果为true

<item name="android:fitsSystemWindows">true</item>

主布局LinearLayout 之——clipToPadding

clipToPadding:控件的绘制区域是否在padding里面, 值为true时padding那么绘制的区域就不包括padding区域;
定义一个孩子是否仅限于画里面的界限。

<item name="android:clipToPadding">true</item>