package com.github.javiersantos.bottomdialogs.demo;

import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.View;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.Toast;

import com.github.javiersantos.bottomdialogs.BottomDialog;
import com.mikepenz.iconics.IconicsDrawable;
import com.mikepenz.material_design_iconic_typeface_library.MaterialDesignIconic;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);

        FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
        fab.setImageDrawable(new IconicsDrawable(this).icon(MaterialDesignIconic.Icon.gmi_github).color(Color.WHITE).sizeDp(24));

    }

    public void sample(View view) {
        new BottomDialog.Builder(this)
                .setTitle("Awesome!")
                .setContent("Glad to see you like BottomDialogs! If you're up for it, we would really appreciate you reviewing us.")
                .setPositiveText("Google Play")
                .setNegativeText("Close")
                .show();
    }

    public void sampleCustomView(View view) {
        LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        View customView = inflater.inflate(R.layout.bottomdialog_layout, null);

        new BottomDialog.Builder(this)
                .setTitle("Awesome!")
                .setContent("Glad to see you like BottomDialogs! If you're up for it, we would really appreciate you reviewing us.")
                .setCustomView(customView)
                .setPositiveText("Google Play")
                .setNegativeText("Close")
                .show();
    }

    public void toGithub(View view) {
        startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/javiersantos/BottomDialogs")));
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_main, menu);

        menu.findItem(R.id.action_about).setIcon(new IconicsDrawable(this).icon(MaterialDesignIconic.Icon.gmi_info).color(Color.WHITE).actionBar());

        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == R.id.action_about) {
            startActivity(new Intent(this, AboutActivity.class));
            return true;
        }
        return super.onOptionsItemSelected(item);
    }
}

@@ -217,132 +217,42 @@
 ort.
-annotation.NonNull;%0Aimport android.support.design.widget.FloatingActionButton;%0Aimport android.support.design.widget.Snackbar
+design.widget.FloatingActionButton
 ;%0Aim
@@ -380,34 +380,8 @@
 er;%0A
-import android.view.View;%0A
 impo
@@ -451,20 +451,17 @@
 oid.
-widget.Toast
+view.View
 ;%0A%0Ai

Remove unnecessary imports