How do I code so a picture can be cropped on android app? : <p>here is my java:</p>

<pre><code>public class MainPage extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener, View.OnClickListener {

TabLayout tabLayout;
ViewPageAdapter viewPageAdapter;
ViewPager viewPager;
ImageView pfp;
Bitmap bitmap_one;

private String UPLOAD_URL = "http://.php";
private int PICK_IMAGE_REQUEST = 1;
private String KEY_IMAGE = "image";

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main_page);
    initTypeface();

    String username = getIntent().getStringExtra("Username");
    TextView tv = (TextView)findViewById(R.id.usernameND);
    tv.setText(username);

    //id's
    pfp = (ImageView) findViewById(R.id.imageView_one);
    pfp.setOnClickListener(this);


    //SearchIntent
    Intent searchI = getIntent();
    if (Intent.ACTION_SEARCH.equals(searchI.getAction())) {

        String query = searchI.getStringExtra(SearchManager.QUERY);
        Toast.makeText(MainPage.this, query, Toast.LENGTH_SHORT).show();
    }

    //Toolbar
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    getSupportActionBar().setTitle(null);

    //Tabs
    tabLayout = (TabLayout) findViewById(R.id.tablayout_two);
    viewPager = (ViewPager) findViewById(R.id.viewPager_two);
    viewPageAdapter = new ViewPageAdapter(getSupportFragmentManager());
    viewPageAdapter.addFragments(new FeedFragment(), "Feed");
    viewPageAdapter.addFragments(new MessagesFragment(), "Messages");
    viewPageAdapter.addFragments(new NotificationsFragment(), "Notifications");
    viewPager.setAdapter(viewPageAdapter);
    tabLayout.setupWithViewPager(viewPager);


    //FloatingActionButton
    FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
    fab.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
        }
    });


    //NavigationDrawer
    DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
    ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
            this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
    drawer.setDrawerListener(toggle);
    toggle.syncState();

    NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
    navigationView.setNavigationItemSelectedListener(this);
}

@Override
public void onBackPressed() {
    DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
    if (drawer.isDrawerOpen(GravityCompat.START)) {
        drawer.closeDrawer(GravityCompat.START);
    } else {
        super.onBackPressed();
    }
}

@Override
public boolean onNavigationItemSelected(MenuItem item) {
    int id = item.getItemId();

    if (id == R.id.profile) {

        Intent i = new Intent(this, Profile.class);
        startActivity(i);

    } else if (id == R.id.whatshot) {

        Intent i = new Intent(this, WhatsHot.class);
        startActivity(i);

    } else if (id == R.id.trending) {

        Intent i = new Intent(this, Trending.class);
        startActivity(i);

    } else if (id == R.id.radioplayer) {

        Intent i = new Intent(this, Radio.class);
        startActivity(i);

    } else if (id == R.id.musicplayer) {

        Intent i = new Intent(this, MusicPlayer.class);
        startActivity(i);

    } else if (id == R.id.settings) {

        Intent i = new Intent(this, Settings.class);
        startActivity(i);

    } else if (id == R.id.info) {

        Intent i = new Intent(this, Info.class);
        startActivity(i);

    }

    DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
    drawer.closeDrawer(GravityCompat.START);
    return true;
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {

    getMenuInflater().inflate(R.menu.main_menu, menu);

    SearchView searchView = (SearchView) menu.findItem(R.id.search_view).getActionView();
    SearchManager searchManager = (SearchManager) getSystemService(SEARCH_SERVICE);
    searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));

    return super.onCreateOptionsMenu(menu);
}


//ImageInfo
private void showFileChooser() {
    Intent intent = new Intent();
    intent.setType("image/*");
    intent.setAction(Intent.ACTION_GET_CONTENT);
    startActivityForResult(Intent.createChooser(intent, "Select Picture"), PICK_IMAGE_REQUEST);
}

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);

    if (requestCode == PICK_IMAGE_REQUEST &amp;&amp; resultCode == RESULT_OK &amp;&amp; data != null &amp;&amp; data.getData() != null) {
        Uri filePath = data.getData();
        try {

            bitmap_one = MediaStore.Images.Media.getBitmap(getContentResolver(), filePath);
            pfp.setImageBitmap(bitmap_one);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}



//Typeface
private void initTypeface() {

    Typeface myTypeface = Typeface.createFromAsset(getAssets(), "fonts/Amble-Regular.ttf");
    TextView text = (TextView) findViewById(R.id.toolbarTitle);
    text.setTypeface(myTypeface);

    myTypeface = Typeface.createFromAsset(getAssets(), "fonts/Amble-Regular.ttf");
    text = (TextView) findViewById(R.id.usernameND);
    text.setTypeface(myTypeface);

}

@Override
public void onClick(View v) {
    if (v == pfp) {
        showFileChooser();
    }
}
</code></pre>

<p>}</p>

<p>Here is my xml:</p>

<pre><code> &lt;android.support.v4.widget.DrawerLayout      xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start"&gt;

&lt;include
    layout="@layout/app_bar_main_page"
    android:layout_width="match_parent"
    android:layout_height="match_parent" /&gt;

&lt;android.support.design.widget.NavigationView
    android:id="@+id/nav_view"
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    android:background="#e9eaea"
    app:itemIconTint="#2A363B"
    app:itemTextColor="#2A363B"
    android:layout_gravity="start"
    android:fitsSystemWindows="true"
    app:headerLayout="@layout/nav_header_main_page"
    app:menu="@menu/main_page_drawer"&gt;

    &lt;ImageView
        android:id="@+id/imageView_one"
        android:layout_width="90dp"
        android:scaleType="fitCenter"
        android:padding="5dp"
        android:background="#2A363B"
        android:adjustViewBounds="true"
        android:onClick="pfpClick"
        android:layout_marginLeft="8dp"
        android:layout_marginTop="20dp"
        android:layout_height="90dp"/&gt;

    &lt;TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="108dp"
        android:text=""
        android:textColor="#FFf"
        android:textSize="18sp"
        android:id="@+id/usernameND"
        android:textAppearance="@style/TextAppearance.AppCompat.Body1" /&gt;

    &lt;TextView
        android:id="@+id/textView"
        android:layout_marginTop="126dp"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="" /&gt;


   &lt;/android.support.design.widget.NavigationView&gt;

  &lt;/android.support.v4.widget.DrawerLayout&gt;
</code></pre>

<p>What I want to know is, how can I code my app so onclick of my imageview (imageView_one) it opens up a window or an editor so I can crop a pic into a square so it fits and places it on the Imageview. that is what i am trying to figure out. I am new to android so thank you.</p>
