0

I am creating an UI which has EditText when I set EditText text which has multiple lines then EditText height is changing. I have fixed EditText height in my XML.

Here is my XML:

<?xml version="1.0" encoding="utf-8"?> <com.daimajia.swipe.SwipeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/swipe"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:clickToClose="true">

    <LinearLayout
        android:id="@+id/bottom_wrapper"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:tag="Bottom1">

        <com.ventup.view.RobotoTextView
            android:id="@+id/delete"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:background="@color/red"
            android:gravity="center"
            android:paddingLeft="@dimen/activity_horizontal_margin"
            android:paddingRight="@dimen/activity_horizontal_margin"
            android:text="@string/action_delete"
            android:textColor="@color/white" />
    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:weightSum="6">

        <com.ventup.view.RobotoEditText
            android:id="@+id/etExercise"
            style="@style/EditTextWorkOutSheet"
            android:layout_width="0dp"
            android:layout_height="300px"
            android:layout_weight="1.7"
            android:imeOptions="actionNext"
            android:inputType="textCapSentences|textMultiLine"
            android:maxLength="2000"

            android:nextFocusRight="@+id/etTampo"
            android:scrollHorizontally="false"
            android:singleLine="true" />

        <com.ventup.view.RobotoEditText
            android:id="@+id/etTampo"
            style="@style/EditTextWorkOutSheet"
            android:layout_width="0dp"
            android:layout_height="300px"
            android:layout_weight="1.3"
            android:inputType="textCapSentences|textMultiLine"
            android:imeOptions="actionNext"
            android:nextFocusRight="@+id/etRest"
            android:singleLine="true" />

        <com.ventup.view.RobotoEditText
            android:id="@+id/etRest"
            style="@style/EditTextWorkOutSheet"
            android:layout_width="0dp"
            android:layout_height="300px"
            android:layout_weight="1"
            android:inputType="textCapSentences|textMultiLine"
            android:imeOptions="actionNext"
            android:nextFocusRight="@+id/etSet"
            android:singleLine="true" />

        <com.ventup.view.RobotoEditText
            android:id="@+id/etSet"
            style="@style/EditTextWorkOutSheet"
            android:layout_width="0dp"
            android:layout_height="300px"
            android:layout_weight="1"
            android:inputType="textCapSentences|textMultiLine"
            android:imeOptions="actionNext"
            android:nextFocusRight="@+id/etReps"
            android:singleLine="true" />

        <com.ventup.view.RobotoEditText
            android:id="@+id/etReps"
            style="@style/EditTextWorkOutSheet"
            android:layout_width="0dp"
            android:layout_height="300px"
            android:layout_weight="1"

            android:imeOptions="actionDone"
            android:singleLine="true" />
    </LinearLayout> </com.daimajia.swipe.SwipeLayout>

Any suggestion would be appreciated, Thanks.

This is my layout

Furqan
  • 787
  • 2
  • 13
  • 28

0 Answers0