Android - full-screen-Schaltfläche "transparent"

Ist es möglich, eine full-screen-Tasten transparent ist, so dass egal wo der Benutzer klickt die Schaltfläche ist aktiviert?

Nachfolgend finden Sie einige grundlegende java-zeigt eine Schaltfläche und bei betätigung startet einen neuen Vorsatz. Ich habe auch die main.xml layout, aber ich bin nicht sicher, wie Sie Sie zu aktualisieren, so dass die Schaltflächen füllt den Bildschirm, sondern ist transparent.

package com.MeetingManager;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;

public class MeetingManager extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
                            WindowManager.LayoutParams.FLAG_FULLSCREEN);
    setContentView(R.layout.main);



    layout.setOnTouchListener(new View.OnTouchListener() {
        public boolean onTouch(View v, MotionEvent e) {
            Intent myIntent = new Intent(MeetingManager.this,CreateMeeting.class);
            startActivityForResult(myIntent, 0);
        }
    });

}



}

XML:

<?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"
    android:background="@drawable/meetingbg"
    >
    <TableRow android:layout_height="wrap_content" android:layout_width="match_parent" android:id="@+id/tableRow5">
        <Button android:text="Button" android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content"></Button>
    </TableRow>

</LinearLayout>
InformationsquelleAutor Denoteone | 2011-10-08
Schreibe einen Kommentar