// Path: app/src/main/java/in/blogspot/anselmbros/torchie/utils/Constants.java
// public class Constants {
//     public final static String ID_DEVICE = "0";
// 
//     public final static String ID_DEVICE_OUTPUT = "1";
//     public final static String ID_DEVICE_OUTPUT_TORCH = "10";
//     public final static String ID_DEVICE_OUTPUT_TORCH_FLASH = "11";
//     public final static String ID_DEVICE_OUTPUT_TORCH_FLASH_LEGACY = "12";
//     public final static String ID_DEVICE_OUTPUT_TORCH_FLASH_NEW = "13";
//     public final static String ID_DEVICE_OUTPUT_TORCH_SCREEN = "14";
//     public final static String ID_DEVICE_OUTPUT_VIBRATOR = "15";
// 
//     public final static String ID_DEVICE_INPUT = "2";
//     public final static String ID_DEVICE_INPUT_VOLUMEKEY = "20";
//     public final static String ID_DEVICE_INPUT_VOLUMEKEY_NATIVE = "21";
//     public final static String ID_DEVICE_INPUT_VOLUMEKEY_ROCKER = "22";
//     public final static String ID_DEVICE_INPUT_PROXIMITY = "23";
// 
//     public final static String PLAY_URI = "https://play.google.com/store/apps/details?id=in.blogspot.anselmbros.torchie";
//     public final static String WEB_URI = "https://torchieapp.wordpress.com";
//     public final static String ABOUTANSELM_URI = "https://anselm.in";
//     public final static String FACEBOOK_URI = "https://facebook.com/torchieapp";
//     public final static String WEB_DONATE_URI = "https://torchieapp.wordpress.com/donate/";
// }


import android.app.DialogFragment;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.Button;
import in.blogspot.anselmbros.torchie.R;
import in.blogspot.anselmbros.torchie.utils.Constants;
        butDismiss = (Button) rootView.findViewById(R.id.but_thanks_dismiss);
        butShare = (Button) rootView.findViewById(R.id.but_thanks_share);

        butDismiss.setOnClickListener(this);
        butShare.setOnClickListener(this);

        return rootView;
    }

    @Override
    public void onClick(View v) {

        if (v == butDismiss) {
            Handler mHandler = new Handler();
            mHandler.postDelayed(new Runnable() {

                @Override
                public void run() {
                    dismiss();
                }

            }, 350L);
        } else if (v == butShare) {
            Handler mHandler = new Handler();
            mHandler.postDelayed(new Runnable() {

                @Override
                public void run() {
                    Intent int_tell = new Intent(Intent.ACTION_SEND);
                    int_tell.setType("text/plain");
// Path: app/src/main/java/in/blogspot/anselmbros/torchie/utils/Constants.java
// public class Constants {
//     public final static String ID_DEVICE = "0";
// 
//     public final static String ID_DEVICE_OUTPUT = "1";
//     public final static String ID_DEVICE_OUTPUT_TORCH = "10";
//     public final static String ID_DEVICE_OUTPUT_TORCH_FLASH = "11";
//     public final static String ID_DEVICE_OUTPUT_TORCH_FLASH_LEGACY = "12";
//     public final static String ID_DEVICE_OUTPUT_TORCH_FLASH_NEW = "13";
//     public final static String ID_DEVICE_OUTPUT_TORCH_SCREEN = "14";
//     public final static String ID_DEVICE_OUTPUT_VIBRATOR = "15";
// 
//     public final static String ID_DEVICE_INPUT = "2";
//     public final static String ID_DEVICE_INPUT_VOLUMEKEY = "20";
//     public final static String ID_DEVICE_INPUT_VOLUMEKEY_NATIVE = "21";
//     public final static String ID_DEVICE_INPUT_VOLUMEKEY_ROCKER = "22";
//     public final static String ID_DEVICE_INPUT_PROXIMITY = "23";
// 
//     public final static String PLAY_URI = "https://play.google.com/store/apps/details?id=in.blogspot.anselmbros.torchie";
//     public final static String WEB_URI = "https://torchieapp.wordpress.com";
//     public final static String ABOUTANSELM_URI = "https://anselm.in";
//     public final static String FACEBOOK_URI = "https://facebook.com/torchieapp";
//     public final static String WEB_DONATE_URI = "https://torchieapp.wordpress.com/donate/";
// }


// Path: app/src/main/java/in/blogspot/anselmbros/torchie/ui/fragment/dialog/DonateSuccessDialog.java
import android.app.DialogFragment;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.Button;
import in.blogspot.anselmbros.torchie.R;
import in.blogspot.anselmbros.torchie.utils.Constants;

        butDismiss = (Button) rootView.findViewById(R.id.but_thanks_dismiss);
        butShare = (Button) rootView.findViewById(R.id.but_thanks_share);

        butDismiss.setOnClickListener(this);
        butShare.setOnClickListener(this);

        return rootView;
    }

    @Override
    public void onClick(View v) {

        if (v == butDismiss) {
            Handler mHandler = new Handler();
            mHandler.postDelayed(new Runnable() {

                @Override
                public void run() {
                    dismiss();
                }

            }, 350L);
        } else if (v == butShare) {
            Handler mHandler = new Handler();
            mHandler.postDelayed(new Runnable() {

                @Override
                public void run() {
                    Intent int_tell = new Intent(Intent.ACTION_SEND);
                    int_tell.setType("text/plain");
                    int_tell.putExtra(Intent.EXTRA_TEXT, getResources().getString(R.string.share_info) + Constants.PLAY_URI);