2012-02-19 104 views
-1

我正在考虑为我的应用程序的界面,所以我应用了一个GridView有一个仪表板,但我不满意的结果,所以我浏览了一些应用程序,发现这个有一个非常漂亮的界面: http://images.frandroid.com/wp-content/uploads/2012/02/patiner.jpg 我想知道这是基于GridView还是简单的按钮图像还是有任何其他提示? 非常感谢。如何创建这样的界面?

+0

请尽量回答问题,不要打扰投票! – androniennn 2012-02-19 20:17:12

+0

不知道,但它确实让我想家。 – 2012-02-19 20:20:45

+0

*“请尝试[..]”* - 很好的建议。这正是你从我这里得到一个赞誉的原因。有很多方法可以实现这一点。但你似乎没有尝试过。回答你的问题,我不会奖励你的懒惰。 – 2012-02-19 20:25:35

回答

1

这应该让你得到你想要的东西。但我使用常规按钮,你可能会需要图像按钮。我只是碰巧打开了这段代码,所以为了让它更“友好”,它可能并不完美。

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:orientation="vertical"> 
      <LinearLayout 
       android:id="@+id/LinearLayout01" 
       android:layout_width="match_parent" 
       android:layout_height="fill_parent" 
       android:layout_weight="1" > 

       <Button 
        android:id="@+id/btn1" 
        android:layout_weight="1" 
        android:text="1" 
        android:layout_width="0dp"/> 

       <Button 
        android:id="@+id/btn2" 
        android:layout_width="0dp" 
        android:layout_weight="1" 
        android:text="2" /> 
      </LinearLayout> 

      <LinearLayout 
       android:id="@+id/LinearLayout02" 
       android:layout_width="match_parent" 
       android:layout_height="fill_parent" 
       android:layout_weight="1" > 

       <Button 
        android:id="@+id/btn3" 
        android:layout_weight="1" 
        android:text="1" 
        android:layout_width="0dp"/> 

       <Button 
        android:id="@+id/btn4" 
        android:layout_width="0dp" 
        android:layout_weight="1" 
        android:text="2" /> 
      </LinearLayout> 
</LinearLayout> 
+0

谢谢你回答,只是不放弃投票:)。无论如何,这只是简单的按钮,默认的Android的,如何使图像按钮?有没有可以做到的XML代码?非常感谢你。 – androniennn 2012-02-19 20:21:55

+1

是的,如果您使用图形编辑器,他们也在那里。这很简单,'' – bwoogie 2012-02-19 20:23:51

+0

Clear;)。非常感谢你 :)。 – androniennn 2012-02-19 20:25:34