WEB开发网
开发学院手机开发Android 开发 Android 浮动信息框 阅读

Android 浮动信息框

 2010-09-10 00:21:00 来源:WEB开发网   
核心提示:mButton = (Button) findViewById(R.id.button_id);mButton.setOnClickListener(new OnClickListener() {public void onClick(View v) {// TODO Auto-generated method stu

mButton = (Button) findViewById(R.id.button_id);

mButton.setOnClickListener(new OnClickListener() {

public void onClick(View v) {

// TODO Auto-generated method stub

Editable Str;

Str = mEditText.getText();

Toast.makeText(ShowToast.this, Str, Toast.LENGTH_SHORT).show();

mEditText.setText("");

}

});

}

}

view plaincopy to clipboardprint?

< ?xml version="1.0" encoding="utf-8"?>

< LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

android:orientation="vertical"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

>

< EditText

android:id="@+id/text_id"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

/>

< Button

android:id="@+id/button_id"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:text="333"

/>

< /LinearLayout>

< ?xml version="1.0" encoding="utf-8"?>

< LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

android:orientation="vertical"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

>

< EditText

android:id="@+id/text_id"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

/>

< Button

android:id="@+id/button_id"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:text="333"

/>

< /LinearLayout>

上一页  1 2 

Tags:Android 浮动 信息

编辑录入:coldstar [复制链接] [打 印]
赞助商链接