XML : How to make my imagebuttons bigger in my layout xml file?

I've arranged my image buttons and textView into a linear layout and I was wondering when I ran the application on the emulator and on my phone the image buttons was equally laid out but the were small and too far apart.

Here is a link of what the picture looks like. http://i1207.photobucket.com/albums/bb478/Xxsoralover_1001xX/12980419_1141027192594851_48037648_n.png.jpeg?t=1460182699

This is the inside of my content xml file.

  <?xml version="1.0" encoding="utf-8"?>  <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"  xmlns:tools="http://schemas.android.com/tools"  xmlns:app="http://schemas.android.com/apk/res-auto"  android:layout_width="match_parent"  android:layout_height="match_parent"  android:paddingLeft="@dimen/activity_horizontal_margin"  android:paddingRight="@dimen/activity_horizontal_margin"  android:paddingTop="@dimen/activity_vertical_margin"  android:paddingBottom="@dimen/activity_vertical_margin"  app:layout_behavior="@string/appbar_scrolling_view_behavior"  android:orientation="vertical"  android:weightSum="8"  tools:showIn="@layout/activity_emotions"  tools:context="com.example.chadymaebarinan.emoji_express.Needs"  android:background="@drawable/backgroundnew">    <LinearLayout      android:layout_width="match_parent"      android:layout_height="wrap_content"      android:layout_weight="1"      android:weightSum="5"      android:orientation="vertical">      <ImageView          android:layout_weight="4"          android:layout_width="100dp"          android:layout_height="70dp"          android:src="@drawable/kid"          android:layout_gravity="center"/>      <TextView          android:layout_width="wrap_content"          android:layout_height="wrap_content"          android:layout_weight="1"          android:text="ME"          android:textSize="20sp"          android:layout_gravity="center" />  </LinearLayout>    <LinearLayout      android:layout_width="match_parent"      android:layout_height="wrap_content"      android:layout_weight="11"      android:weightSum="6"      android:orientation="vertical">        <LinearLayout          android:layout_width="match_parent"          android:layout_height="wrap_content"          android:layout_weight="2"          android:weightSum="5"          android:orientation="vertical">          <LinearLayout              android:layout_width="match_parent"              android:layout_height="wrap_content"              android:layout_weight="3"              android:weightSum="3"              android:orientation="horizontal"              android:padding="10dp">              <ImageButton                  android:layout_weight="1"                  android:id="@+id/buttonAngry"                  android:layout_width="wrap_content"                  android:layout_height="wrap_content"                  android:scaleType="fitCenter"                  android:src="@drawable/angrybutton"                  android:background="@null"/>              <ImageButton                  android:layout_weight="1"                  android:id="@+id/buttonHappy"                  android:layout_width="wrap_content"                  android:layout_height="wrap_content"                  android:scaleType="fitCenter"                  android:src="@drawable/happybutton"                  android:background="@null"/>              <ImageButton                  android:layout_weight="1"                  android:layout_width="wrap_content"                  android:id="@+id/buttonSad"                  android:layout_height="wrap_content"                  android:scaleType="fitCenter"                  android:src="@drawable/sadbutton"                  android:background="@null"/>          </LinearLayout>            <LinearLayout              android:layout_width="match_parent"              android:layout_height="wrap_content"              android:layout_weight="0"              android:weightSum="3"              android:orientation="horizontal">                <TextView                  android:padding="10dp"                  android:layout_weight="1"                  android:layout_width="wrap_content"                  android:layout_height="wrap_content"                  android:text="Angry"                  android:gravity="center" />              <TextView                  android:padding="10dp"                  android:layout_weight="1"                  android:layout_width="wrap_content"                  android:layout_height="wrap_content"                  android:text="Happy"                  android:gravity="center"/>              <TextView                  android:padding="10dp"                  android:layout_weight="1"                  android:layout_width="wrap_content"                  android:layout_height="wrap_content"                  android:text="Sad"                  android:gravity="center"/>          </LinearLayout>        </LinearLayout>        <LinearLayout          android:layout_width="match_parent"          android:layout_height="wrap_content"          android:layout_weight="2"          android:weightSum="5"          android:orientation="vertical">          <LinearLayout              android:layout_width="match_parent"              android:layout_height="wrap_content"              android:layout_weight="4"              android:weightSum="3"              android:orientation="horizontal"              android:padding="10dp">              <ImageButton                  android:layout_weight="1"                  android:layout_width="wrap_content"                  android:layout_height="wrap_content"                  android:scaleType="fitCenter"                  android:id="@+id/buttonPainful"                  android:src="@drawable/painfulbutton"                  android:background="@null"/>              <ImageButton                  android:layout_weight="1"                  android:layout_width="wrap_content"                  android:layout_height="wrap_content"                  android:id="@+id/buttonScared"                  android:scaleType="fitCenter"                  android:src="@drawable/scaredbutton"                  android:background="@null"/>              <ImageButton                  android:layout_weight="1"                  android:id="@+id/buttonInLove"                  android:layout_width="wrap_content"                  android:layout_height="wrap_content"                  android:scaleType="fitCenter"                  android:src="@drawable/inlovebutton"                  android:background="@null"/>          </LinearLayout>            <LinearLayout              android:layout_width="match_parent"              android:layout_height="wrap_content"              android:layout_weight="0"              android:weightSum="3"              android:orientation="horizontal">                <TextView                  android:padding="10dp"                  android:layout_weight="1"                  android:layout_width="wrap_content"                  android:layout_height="wrap_content"                  android:text="Painful"                  android:gravity="center" />              <TextView                  android:padding="10dp"                  android:layout_weight="1"                  android:layout_width="wrap_content"                  android:layout_height="wrap_content"                  android:text="Scared"                  android:gravity="center"/>              <TextView                  android:padding="10dp"                  android:layout_weight="1"                  android:layout_width="wrap_content"                  android:layout_height="wrap_content"                  android:text="In Love"                  android:gravity="center"/>          </LinearLayout>          </LinearLayout>        <LinearLayout          android:layout_width="match_parent"          android:layout_height="wrap_content"          android:layout_weight="2"          android:weightSum="5"          android:orientation="vertical">          <LinearLayout              android:layout_width="match_parent"              android:layout_height="wrap_content"              android:layout_weight="4"              android:weightSum="3"              android:orientation="horizontal"              android:padding="10dp">              <ImageButton                  android:layout_weight="1"                  android:id="@+id/buttonTired"                  android:layout_width="wrap_content"                  android:layout_height="wrap_content"                  android:scaleType="fitCenter"                  android:src="@drawable/tiredbutton"                  android:background="@null"/>              <ImageButton                  android:layout_weight="1"                  android:id="@+id/buttonEmbarrased"                  android:layout_width="wrap_content"                  android:layout_height="wrap_content"                  android:scaleType="fitCenter"                  android:src="@drawable/embarrasedbutton"                  android:background="@null"/>              <ImageButton                  android:layout_weight="1"                  android:id="@+id/buttonConfused"                  android:layout_width="wrap_content"                  android:layout_height="wrap_content"                  android:scaleType="fitCenter"                  android:src="@drawable/confusedbutton"                  android:background="@null"/>          </LinearLayout>            <LinearLayout              android:layout_width="match_parent"              android:layout_height="wrap_content"              android:layout_weight="0"              android:weightSum="3"              android:orientation="horizontal">                <TextView                  android:padding="10dp"                  android:layout_weight="1"                  android:layout_width="wrap_content"                  android:layout_height="wrap_content"                  android:text="Tired"                  android:gravity="center" />              <TextView                  android:padding="10dp"                  android:layout_weight="1"                  android:layout_width="wrap_content"                  android:layout_height="wrap_content"                  android:text="Embarrased"                  android:gravity="center"/>              <TextView                  android:padding="10dp"                  android:layout_weight="1"                  android:layout_width="wrap_content"                  android:layout_height="wrap_content"                  android:text="Confused"                  android:gravity="center"/>          </LinearLayout>      </LinearLayout>  </LinearLayout>  </LinearLayout>    

Thank you guys for helping. :)

No comments:

Post a Comment