Horizontal Scroll View, Scrolling Issue Android
<p>I am new to android programming. I am implementing a simple calculator and I am facing issues with horizontal scroll View. I am using an edit text within Horizontal scroll view. It works completely fine for the first time but as soon as I clear the screen it retains it scrolling limit, meaning that even though there are few digits on the screen I am able to scroll more than it. What I want to achieve is to limit its scrolling. Below are the screen shots and XML code.</p>

<p><a href="https://i.stack.imgur.com/gGdaK.png" rel="nofollow noreferrer">First Time</a></p>

<p>[Second Time][2]</p>

<p><a href="https://i.stack.imgur.com/1Vj3U.png" rel="nofollow noreferrer">It is still scroll-able even though there are few digits</a></p>

<pre><code> &lt;HorizontalScrollView
        android:id="@+id/hsvMain"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="end"
        android:scrollbars="none"
     &gt;

        &lt;EditText

            android:id="@+id/mainEditText"
            android:paddingTop="10dp"
            android:paddingRight="2dp"
            android:background="#ffff"
            android:ellipsize="end"
            android:focusable="false"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:textSize="55sp"

            android:textStyle="bold"

             /&gt;

    &lt;/HorizontalScrollView&gt;
</code></pre>