How can add my payment button in my customize dialog box?
<p>I am working in android. i want to add paypal button in my custom button. i have created both, custom dialog and paypal button. But these both are in different actitvity. please suggest me what should i do for this.</p>

<p>This is my class to create custom dialog.:-</p>

<pre><code>package com.pericent.musicapp;

import android.app.Dialog;
import android.content.Context;
import android.util.Log;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class CustomizeDialog extends Dialog implements OnClickListener {
    Button close;
    String TAG="CustomizeDialog";
    TextView text_view_artist_name;
    TextView text_view_song_title;
    TextView text_view_price;

    public CustomizeDialog(Context context,String title_of_song,String artist_of_song,float price_of_song){
        super(context);
        /** It will hide the title */
        requestWindowFeature(Window.FEATURE_NO_TITLE);      
        setContentView(R.layout.paypal_custom_dialog);
        Log.v(TAG, "i am gooing to perform close");

        text_view_song_title=(TextView)findViewById(R.id.Paypal_TextView_songName);

        text_view_artist_name=(TextView)findViewById(R.id.Paypal_TextView_byArtist);

        text_view_price=(TextView)findViewById(R.id.Paypal_TextView_songPrice);

        text_view_song_title.setText("Title : "+title_of_song);

        text_view_artist_name.setText("Artist : "+artist_of_song);

        close = (Button) findViewById(R.id.paypal_close);

        text_view_price.setText("Price : "+price_of_song);
        close.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        Log.v(TAG, "i am closing tag");
        if (v == close)
            dismiss();
    }

}
</code></pre>

<p>and this is the custom dialog box which is created by above code:- </p>

<p><img src="http://i.stack.imgur.com/qDcid.png" alt="enter image description here"></p>

<p>Now i want to add my paypal button in this custom dialog box. please suggest me what should i do for this. this is my code for creating the  paypal button:-</p>

<pre><code>package com.pericent;
import java.math.BigDecimal;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup.LayoutParams;
import android.widget.LinearLayout;   
import com.paypal.android.MEP.CheckoutButton;
import com.paypal.android.MEP.PayPal;
import com.paypal.android.MEP.PayPalActivity;
import com.paypal.android.MEP.PayPalPayment;
import com.paypal.android.MEP.PayPalAdvancedPayment;
import com.paypal.android.MEP.PayPalInvoiceData;
import com.paypal.android.MEP.PayPalInvoiceItem;
import com.paypal.android.MEP.PayPalReceiverDetails;

public class MypaypalActivity extends Activity implements OnClickListener{   

    @Override
        public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        LinearLayout mLinLay= new LinearLayout(this);
        setContentView(R.layout.main);
        PayPal pp = PayPal.initWithAppID(this, "APP-80W284485P519543T", PayPal.ENV_SANDBOX);

        LinearLayout layoutSimplePayment = new LinearLayout(this);
        layoutSimplePayment.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
        layoutSimplePayment.setOrientation(LinearLayout.VERTICAL);
        CheckoutButton launchSimplePayment = pp.getCheckoutButton(this, PayPal.BUTTON_118x24, CheckoutButton.TEXT_PAY);

        launchSimplePayment.setOnClickListener( this);   
        layoutSimplePayment.addView(launchSimplePayment);
        mLinLay.addView(layoutSimplePayment);

        setContentView(mLinLay);
    }

    public void onClick(View v) {
        PayPalPayment payment = new PayPalPayment();
        payment.setSubtotal(new BigDecimal("2.25"));
        payment.setCurrencyType("USD");
        payment.setRecipient("kuntal_1316186174_biz@gmail.com");
        payment.setPaymentType(PayPal.PAYMENT_TYPE_GOODS);

        Intent checkoutIntent = PayPal.getInstance().checkout(payment, this);
        startActivityForResult(checkoutIntent, 1);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        switch (resultCode) {
        case Activity.RESULT_OK:
            break;

        case Activity.RESULT_CANCELED:
            break;

        case PayPalActivity.RESULT_FAILURE:
        }
        super.onActivityResult(requestCode, resultCode, data);
    }
}
</code></pre>

<p>Thank you in advance...</p>
