JGuizard
8/11/2015 - 5:41 PM

CustomDialogClass.java

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

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <LinearLayout
            android:orientation="vertical"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@drawable/round_dialog"
            android:layout_marginTop="15dp"
            android:layout_marginRight="10dp"
            android:layout_marginLeft="10dp">

            <LinearLayout
                android:orientation="vertical"
                android:layout_width="match_parent"
                android:layout_height="60dp">

                <FrameLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent">

                    <View
                        android:layout_width="wrap_content"
                        android:layout_height="30dp"
                        android:layout_marginTop="30dp"
                        android:background="#000000"
                        android:alpha="0.3" />

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:text="Ops"
                        android:id="@+id/tvDialogTitle"
                        android:layout_gravity="center"
                        android:textStyle="bold"
                        android:textColor="#ffffff"
                        android:textSize="26dp"
                        android:translationZ="10dp"
                        android:gravity="center" />

                </FrameLayout>

            </LinearLayout>

            <LinearLayout
                android:orientation="vertical"
                android:layout_width="match_parent"
                android:layout_height="150dp"
                android:background="#4C4C4C">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:text="Hai terminato le monete per poter utilizzare gli aiuti.\nOttieni altre monete adesso guardando un video di un nostro sponsor."
                    android:id="@+id/tvDialogText"
                    android:layout_gravity="center"
                    android:gravity="center"
                    android:textColor="#ffffff"
                    android:textSize="16dp"
                    android:layout_marginRight="15dp"
                    android:layout_marginLeft="15dp"
                    android:lineSpacingMultiplier="1.2"
                    android:textStyle="bold"
                    android:layout_marginTop="10dp" />
            </LinearLayout>

            <LinearLayout
                android:orientation="vertical"
                android:layout_width="match_parent"
                android:layout_height="70dp"
                android:background="@drawable/round">

                <Button
                    android:layout_width="120dp"
                    android:layout_height="match_parent"
                    android:text="Ok"
                    android:id="@+id/btDialogConfirm"
                    android:layout_gravity="center"
                    android:textColor="#ffffff"
                    android:textStyle="bold"
                    android:textSize="20dp"
                    android:hint="  "
                    android:background="@drawable/button_black"
                    android:gravity="center"
                    android:layout_marginTop="10dp"
                    android:layout_marginBottom="5dp" />
            </LinearLayout>

        </LinearLayout>

        <Button
            android:layout_width="50dp"
            android:layout_height="50dp"
            android:id="@+id/btDialogDismiss"
            android:layout_gravity="right|top"
            android:background="@drawable/close" />
    </FrameLayout>

</LinearLayout>
package com.shapeapp.fitness.dialogs;

import android.app.Dialog;
import android.content.Context;
import android.view.View;
import android.view.Window;
import android.widget.Button;

import com.shapeapp.fitness.R;
import com.shapeapp.fitness.activities.feedback.FeedbackActivity;
import com.shapeapp.fitness.models.Feedback;

/**
 * Created by gfg on 30/06/15.
 */
public class FeedbackDialog extends Dialog implements View.OnClickListener
{

    public FeedbackDialog(final Context context,FeedbackActivity feedbackActivity,int state,int feed,boolean onfeedback)
    {
        super(context);
        this.requestWindowFeature(Window.FEATURE_NO_TITLE);
        this.setContentView(R.layout.dialog_feedback);
    }
    
        @Override
    public void onClick(View v)
    {
        int id=v.getId();
    }
}