title: Scrolling right to left using horizontal scrollview
body: <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;HorizontalScrollView
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:fillViewport="true"
      android:id="@+id/resend_scroll"&gt;
  
      &lt;LinearLayout
          android:layout_width="wrap_content"
          android:layout_height="110dp"
          android:orientation="horizontal"&gt;
  
          &lt;include layout="@layout/partial_resend_layout"
              android:layout_height="110dp"
              android:layout_width="124dp"
              android:id="@+id/resend_invite"
              /&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="110dp"
              android:orientation="vertical"&gt;
  
          &lt;TextView
              android:id="@+id/text_invitee_name"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:background="@android:color/transparent"
              android:layout_marginTop="24dp"
              android:layout_marginLeft="30dp"
              android:layout_marginStart="30dp"
              android:fontFamily="@string/regular_roboto"
              android:textColor="@color/white"
              android:textSize="22sp"/&gt;
  
          &lt;TextView
              android:id="@+id/text_invitee_contact_number"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:background="@android:color/transparent"
              android:layout_marginTop="18dp"
              android:layout_marginLeft="30dp"
              android:layout_marginStart="30dp"
              android:fontFamily="@string/regular_roboto"
              android:textColor="@color/white"
              android:textSize="22sp"/&gt;
          &lt;/LinearLayout&gt;
  
      &lt;/LinearLayout&gt;
  &lt;/HorizontalScrollView&gt;
  </code></pre>
  
  <p>This is my xml file but linearlayout match_parent width is not working both include and the layout is visible in screen! I'm scrolling the item right to left so the item at the left side should not be visible! I dont know how to do that..
  This xml file is item of recyclerview. if i set the width to some value it works fine. but when screen size changes width size changes hence it shows the include partially now i'm doing this</p>
  
  <pre><code>DisplayMetrics metrics = new DisplayMetrics();
          WindowManager wm = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
          wm.getDefaultDisplay().getMetrics(metrics);
          LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(metrics.widthPixels, holder.mWidthTextView.getHeight());
          holder.mWidthTextView.setLayoutParams(lp);
          holder.mResendScroll.postDelayed(new Runnable() {
              public void run() {
                  holder.mResendScroll.fullScroll(HorizontalScrollView.FOCUS_RIGHT);
              }
          }, 10L);
  </code></pre>
  
  <p>It works but i dont think this is the correct way as this is called every time in onBindViewHolder.</p>