title: Why my GridView cuts off at The End?
body: <p><a href="https://i.stack.imgur.com/2FGo5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2FGo5.png" alt="Screenshoot of the cropped end of the GridView"></a></p>
  
  <p>In the above picture, the item at the bottom is cut off like a red arrow.
  Perhaps the size of the Gridview is the entire screen, and NavigationBottomView seems to cover part of the GridView. I want to specify the height of the GridView from the top of the screen to the top of the BottomNavigationView. </p>
  
  <p>Below is my xml code.</p>
  
  <p>1> Home screen xml code with NavigationBottomView(home.xml)</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout 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/container"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context=".home"&gt;
      &lt;FrameLayout
          android:id="@+id/fragment_container"
          android:layout_width="match_parent"
          android:layout_height="520dp"
          android:orientation="horizontal"&gt;
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_marginLeft="32dp"
              android:layout_gravity="left|center_vertical"
              android:text="All Of "
              android:textColor="@color/colorPrimaryDark"
              android:textSize="60sp"
              android:textStyle="bold"/&gt;
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_marginLeft="196dp"
              android:layout_centerInParent="true"
              android:layout_gravity="left|center_vertical"
              android:text="G"
              android:textColor="#8e1414"
              android:textSize="60dp"
              android:textStyle="bold"/&gt;
          &lt;TextView
              android:id="@+id/message"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_marginLeft="240dp"
              android:layout_gravity="left|center_vertical"
              android:text="IST"
              android:textColor="@color/colorPrimaryDark"
              android:textSize="60dp"
              android:textStyle="bold"/&gt;
      &lt;/FrameLayout&gt;
      &lt;android.support.design.widget.BottomNavigationView
          android:id="@+id/navigation"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:background="?android:attr/windowBackground"
          app:menu="@menu/navigation"&gt;
      &lt;/android.support.design.widget.BottomNavigationView&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>2> Xml code using GridView(site_list.xml)</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;GridView xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:background="#FFFFFF"
      tools:context=".home"
      android:id="@+id/gridView"
      android:columnWidth="96dp"
      android:numColumns="2"
      android:verticalSpacing="10dp"
      android:horizontalSpacing="10dp"
      android:stretchMode="columnWidth"
      android:gravity="center"&gt;
  &lt;/GridView&gt;
  </code></pre>
  
  <p>3> The xml code that designed the items in the GridView(list_item.xml)</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout    
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:orientation="vertical"
      android:layout_gravity="center"
      &gt;
      &lt;ImageView
          android:layout_width="144dp"
          android:layout_height="144dp"
          android:id="@+id/image"
          tools:src="@mipmap/ic_launcher"
          android:layout_gravity="center_vertical"
          /&gt;
      &lt;TextView
          android:layout_width="144dp"
          android:layout_height="wrap_content"
          android:id="@+id/name"
          tools:text="Gistsite"
          android:textAppearance="?android:textAppearanceMedium"
          android:textStyle="bold"
          android:gravity="center_horizontal"
          android:textSize="16sp"
          /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>4> The class that created the data type named Site(Site.java)</p>
  
  <pre><code>public class Site {
      private String msite_name;
      private String msite_url;
      private int msite_imagesource;
  
      public Site(String name, String url, int imagesource){
          msite_name = name;
          msite_url = url;
          msite_imagesource = imagesource;
      }
  
      public String getMsite_name() {
          return this.msite_name;
      }
      public String getMsite_url(){
          return this.msite_url;
      }
      public int getMsite_imagesource(){
          return this.msite_imagesource;
      }
  }
  </code></pre>
  
  <p>5> SideAdapter code created by customizing an ArrayAdapter(SiteAdapter.java)</p>
  
  <pre><code>import android.app.Activity;
  import android.content.Context;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.ArrayAdapter;
  import android.widget.ImageView;
  import android.widget.LinearLayout;
  import android.widget.TextView;
  import java.util.ArrayList;
  
  public class SiteAdapter extends ArrayAdapter&lt;Site&gt; {
      private Site currentSite;
  
      public SiteAdapter(Activity context, ArrayList&lt;Site&gt; sites){
          super(context,0,sites);
      }
  
      @Override
      public View getView(int position, View convertView, ViewGroup parent) {
          View listItemView = convertView;
          if(listItemView == null){
              listItemView = 
   LayoutInflater.from(getContext()).inflate(R.layout.list_item,parent,false);
          }
          currentSite = getItem(position);
  
      ImageView imageView = (ImageView) listItemView.findViewById(R.id.image);
          imageView.setImageResource(currentSite.getMsite_imagesource());
  
          TextView name = (TextView) listItemView.findViewById(R.id.name);
          name.setText(currentSite.getMsite_name());
  
          return listItemView;
      } 
  }
  </code></pre>
  
  <p>6> A fragment code indicating the capture screen attached above(OrganizationFragment.java)</p>
  
  <pre><code>import android.content.Context;
  import android.content.Intent;
  import android.net.Uri;
  import android.os.Bundle;
  import android.support.v4.app.Fragment;
  import android.support.annotation.Nullable;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.AdapterView;
  import android.widget.GridView;
  import java.util.ArrayList;
  
  public class OrganizationFragment extends Fragment {
  
      @Nullable
      @Override
      public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState){
          View organizationView = inflater.inflate(R.layout.site_list, null);
          final ArrayList&lt;Site&gt; organizations = new ArrayList&lt;Site&gt;();
          organizations.add(new Site("Gist 총학생회", "https://www.facebook.com/gistunion/",R.drawable.gistunion));
          organizations.add(new Site("Gist 동아리연합회", "https://www.facebook.com/gistclubunite/",R.drawable.clubnight));
          organizations.add(new Site("Gist 하우스", "https://www.facebook.com/GISTcollegeHOUSE/",R.drawable.gisthouse));
          organizations.add(new Site("Gist 문화행사위원회", "https://www.facebook.com/Moonhangwe/",R.drawable.moonhangwe));
          organizations.add(new Site("Gist 신문", "https://www.facebook.com/pg/GistSinmoon/posts/",R.drawable.gistnews));
          organizations.add(new Site("Gist 홍보대사", "http://blog.naver.com/PostList.nhn?blogId=gist1993&amp;from=postList&amp;categoryNo=28",R.drawable.gionnare));
  
          SiteAdapter organizationAdapter = new SiteAdapter(getActivity(), organizations);
          GridView gridViewO = 
  (GridView)organizationView.findViewById(R.id.gridView);
          gridViewO.setAdapter(organizationAdapter);
       gridViewO.setOnItemClickListener(new AdapterView.OnItemClickListener() 
       {
              @Override
                  public void onItemClick(AdapterView&lt;?&gt; adapterView, View view, int position, long id) {
                      Site site = organizations.get(position);
                      openWebPage(site.getMsite_url());
                  }
          });
          return organizationView;
      }
      public void openWebPage(String url){
          Uri webpage = Uri.parse(url);
          Intent siteMove = new Intent(Intent.ACTION_VIEW, webpage);
          if(siteMove.resolveActivity(getActivity().getPackageManager()) != null)
              startActivity(siteMove);
      }
  }
  </code></pre>
  
  <p>7> Java code representing the main home screen(home.java)</p>
  
  <pre><code>import android.content.Intent;
  import android.os.Bundle;
  import android.support.annotation.NonNull;
  import android.support.design.widget.BottomNavigationView;
  import android.support.v7.app.AppCompatActivity;
  import android.support.v4.app.Fragment;
  import android.util.DisplayMetrics;
  import android.util.Log;
  import android.view.MenuItem;
  import android.widget.TextView;
  
  public class home extends AppCompatActivity {
  
      private TextView mTextMessage;
      private BottomNavigationView.OnNavigationItemSelectedListener 
  mOnNavigationItemSelectedListener
          = new BottomNavigationView.OnNavigationItemSelectedListener() {
  
          @Override
          public boolean onNavigationItemSelected(@NonNull MenuItem item) {
               Fragment selectedFragment = null;
              switch (item.getItemId()) {
                  case R.id.navigation_officials:
                      selectedFragment = new OfficialFragment();
                      break;
                  case R.id.navigation_organizations:
                      selectedFragment = new OrganizationFragment();
                      break;
                  case R.id.navigation_circles:
                      selectedFragment = new CircleFragment();
                      break;
                  case R.id.navigation_projects:
                      selectedFragment = new ProjectFragment();
                      break;
               }
               return loadFragment(selectedFragment);
          }
      };
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.home);
          loadFragment(new HomeFragment());
          BottomNavigationView navigation = (BottomNavigationView) 
   findViewById(R.id.navigation);
  
   navigation.setOnNavigationItemSelectedListener 
  (mOnNavigationItemSelectedListener);
      }
      private boolean loadFragment(Fragment fragment) {
          //switching fragment
          if (fragment != null) {
              getSupportFragmentManager() 
              .beginTransaction()
              .replace(R.id.fragment_container, fragment).commit();
              return true;
          }
          return false;
      }
  }
  </code></pre>
  
  <p>I would be grateful if you could read the questions I have made and give them some advice.</p>