生成后再改方法很多,我是想问有没有办法生成Android项目的时候就直接能生成我想要的布局?

解决方案 »

  1.   

    这是Android SDK生成的额。
      2.3是LinearLayout。4.0就是RelativeLayout。 使用RelativeLayout的原因就是它的效率更高,因此默认才是RelativeLayout。
      

  2.   

    知道了 在 D:\Android\android-sdk-windows\platforms\android-7\templates路径下面有LinearLayout.templates文件用来修改默认布局
      

  3.   

    Android 4.0 默认就是RelativeLayout,足以证明相对布局的优势。所以你要做的不是改回去,而是适应和习惯。
      

  4.   

    我认为不好应该LinearLayout 套 RelativeLayout 而不喜欢 RelativeLayout  套 LinearLayout  手改吧。。我都是这么改的。。
      

  5.   

    点击右侧RELATIVE 然后右击有CHANGE LAYOUT 那里面可以修改 希望可以帮到你
      

  6.   

    D:\android-sdk-windows\tools\templates\activities\BlankActivity\root\res\layout \activity_simple.xml.ftl
    我改了这个文件. 之后创建的  BlankActivity  就都是LinearLayout的了. 
    <LinearLayout 
    xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
    android:orientation="vertical"
        android:layout_width=<#if buildApi lt 8 >"fill_parent"<#else>"fill_parent"</#if>
        android:layout_height=<#if buildApi lt 8 >"fill_parent"<#else>"fill_parent"</#if> >    <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:padding="@dimen/padding_medium"
            android:text="@string/hello_world"
            tools:context=".${activityClass}" /></LinearLayout>
      

  7.   

    右侧哪里有RELATIVE 啊,能否截个图啊?
      

  8.   

    窗口资源视图编辑页,在窗口上右键---changelayout