title: When I change any item in my layout, the inner layout that I have changed its measure programatically, returns to its first measure
body: <p>I have a circle that i just one to show half of it in my page, and rotate. i pushed it up in code and its wok but any time that i want for example change the text of textviews or set its visibility in code it comes down again and if i want to push it up again the delay shows.
  why its happen and how can i fix it?
  or if you can suggest any other way i would be happy.</p>
  
  <p>This is my xml Layout:</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="@drawable/background_blue"
      android:fitsSystemWindows="true"&gt;
  
  
  
      &lt;com.aa.ccc.activities.CustomLinearLayout
          android:id="@+id/QuickPlayClipLayout"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_centerHorizontal="true"
          android:gravity="center_horizontal"&gt;
  
          &lt;RelativeLayout
              android:id="@+id/clip_layout"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center_horizontal"
              android:gravity="center_horizontal" /&gt;
      &lt;/com.aa.ccc.activities.CustomLinearLayout&gt;
  
          &lt;TextView
              android:id="@+id/text_no_score"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignParentEnd="true"
              /&gt;
  
  
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>this is CustomLinearLayout class:</p>
  
  <pre><code>   public CustomLinearLayout(Context context, AttributeSet attrs) {
          super(context, attrs);
          myContext = context;
      }
  
      @Override
      protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
      {
          super.onMeasure(widthMeasureSpec, heightMeasureSpec+((int)myContext.getResources().getDimension(R.dimen.quickplay_offset)));
      }
  </code></pre>
  
  <p>and i set position of QuickPlayClipLayout in my code like this:</p>
  
  <pre><code> @BindView(R.id.QuickPlayClipLayout)
      LinearLayout mainLayout;
  
  
  
      public static GameTestFragment newInstance() {
          GameTestFragment fragment = new GameTestFragment();
          return fragment;
      }
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
  
  
      @Override
      public void onAnimationStart(Animation animation) {
  
      }
  
      @Override
      public void onAnimationEnd(Animation animation) {
          mainLayout.setVisibility(View.VISIBLE);
          mainLayout.layout(0, -(int) this.getResources().getDimension(R.dimen.quickplay_offset),
                  mainLayout.getWidth(), mainLayout.getHeight() + (int) this.getResources().getDimension(R.dimen.quickplay_offset));
  
      }
  
      @Override
      public void onAnimationRepeat(Animation animation) {
  
      }
  </code></pre>