2012-03-12 125 views
0

我需要的是具有相同的佈局設計,因爲這(第一張照片在此頁)http://developer.android.com/resources/articles/speech-input.html應用程序..Android的佈局中的佈局設計

我不知道如何來實現這一任務..

在此先感謝.. =)

+0

你嘗試過什麼?您是否閱讀過[this](http://developer.android.com/guide/topics/ui/layout-objects.html)文檔? – kabuko 2012-03-12 18:52:38

+0

您是否熟悉android設計基礎知識? – 2012-03-12 18:55:09

+0

@Kabuko先生我知道的差異btw的佈局:) ..我沒有徹底讀它,但我知道它.. – Shah 2012-03-12 19:35:46

回答

0

可以使更多的幫助,請本使用自定義對話框custom dialog example

或根據太貴要求

這是你的主要XML

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

</LinearLayout> 

和java文件是

package com.chirag; 

import android.app.Activity; 
import android.app.Dialog; 
import android.os.Bundle; 
import android.view.View; 
import android.view.View.OnClickListener; 


public class TestActivity extends Activity { 
/** Called when the activity is first created. */ 
@Override 
public void onCreate(Bundle savedInstanceState) { 
    super.onCreate(savedInstanceState); 
    setContentView(R.layout.main); 
    Dialog dialog = new Dialog(TestActivity.this); 
      dialog.setContentView(R.layout.dialog_layout); 
      dialog.setCancelable(true); 
      //there are a lot of settings, for dialog, check them all out! 


      //now that the dialog is set up, it's time to show it  
      dialog.show(); 
    } 
} 

我現在希望它爲你工作...

+0

先生如果你的鏈接,我有張貼..佈局下面沒有按鈕或什麼..我想顯示兩個臨當應用程序啓動時開始的佈局... – Shah 2012-03-12 20:13:41

+0

意味着您希望在應用程序啓動時使用該對話框,以便您必須將背景圖像設置爲根佈局,並直接在onCreate()方法中顯示此對話框....因爲沒有AC你不能顯示你的對話......我根據你的要求編輯了我的答案...... – 2012-03-13 01:37:36