title: LinearLayout, weightSum not working properly
body: <p>I have a base activity and main activity but in main activity I have applied <code>weightsum</code> but its not working properly. Below is the expected and current output
  <a href="https://i.stack.imgur.com/pbgbt.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pbgbt.jpg" alt="enter image description here"></a> </p>
  
  <p>MainActivity.java</p>
  
  <pre><code>public class MainActivity extends BaseActivity {
      LinearLayout dynamicContent,bottonNavBar;
  
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          dynamicContent = (LinearLayout)  findViewById(R.id.dynamicContent);
          bottonNavBar= (LinearLayout) findViewById(R.id.bottonNavBar);
          View wizard = getLayoutInflater().inflate(R.layout.activity_main, null);
          dynamicContent.addView(wizard);
  }
  }
  </code></pre>
  
  <p>Mainactivity.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:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:orientation="vertical"
      android:weightSum="2"
      android:layout_height="match_parent"
      android:background="#F5F5F5"
      tools:context="com.creativeframe.arun.pro.MainActivity"&gt;
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_weight="1"
          android:background="@drawable/cbseschool"
          android:orientation="vertical"&gt;
  
      &lt;/LinearLayout&gt;
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_weight="1"
          android:background="@drawable/college"
          android:orientation="vertical"&gt;
  
          &lt;/LinearLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>BaseActivity.java</p>
  
  <pre><code>public class BaseActivity extends AppCompatActivity {
  
  
      RadioGroup radioGroup1;
      RadioButton home,deals,account,settings;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_base);
          home = (RadioButton)findViewById(R.id.homebtn);
          deals = (RadioButton)findViewById(R.id.dealsbtn);
          account = (RadioButton)findViewById(R.id.accountbtn);
          settings = (RadioButton)findViewById(R.id.settingbtn);
  
          home.setCompoundDrawablesWithIntrinsicBounds( 0,R.mipmap.ic_home_white_24dp, 0,0);
         deals.setCompoundDrawablesWithIntrinsicBounds( 0,R.mipmap.ic_navigation_white_24dp, 0,0);
         account.setCompoundDrawablesWithIntrinsicBounds( 0,R.mipmap.ic_about, 0,0);
         settings.setCompoundDrawablesWithIntrinsicBounds( 0,R.mipmap.ic_call_white_24dp, 0,0);
  
          radioGroup1=(RadioGroup)findViewById(R.id.radioGroup1);
          radioGroup1.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener()
          {
              @Override
              public void onCheckedChanged(RadioGroup group, int checkedId)
              {
                  switch (checkedId)
                  {
                      case R.id.homebtn:
                          home.setTextColor(Color.parseColor("#FF4081"));
                          startActivity(new Intent(getBaseContext(),MainActivity.class));
                          finish();
                          overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
                          break;
                      case R.id.dealsbtn:
                          deals.setTextColor(Color.parseColor("#FF4081"));
                          startActivity(new Intent(getBaseContext(), location.class));
                          finish();
                          overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
  
                          break;
                      case R.id.settingbtn:
                          settings.setTextColor(Color.parseColor("#FF4081"));
                          startActivity(new Intent(getBaseContext(), contact.class));
                          finish();
                          overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
                          break;
                      case R.id.accountbtn:
                          account.setTextColor(Color.parseColor("#FF4081"));
                          startActivity(new Intent(getBaseContext(), about.class));
                          finish();
                          overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
                          break;
                      default:
                          break;
                  }
              }
          });
      }
  }
  </code></pre>