Skip to content

Justified textview not working in horizontal linear layout #12

Description

@poo0392

I am using com.uncopt:android.justified:1.0 version used gradle, but not working in my application,
here is the xml Layout.

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="135dp"
    android:layout_marginBottom="5dp"
    android:orientation="horizontal"
    android:padding="5dp"
    android:weightSum="1">

    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="0.3">

        <ImageView
            android:id="@+id/holder_img"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_gravity="center"
            android:src="@drawable/launcher" />

    </LinearLayout>

    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="0.7"
        android:orientation="vertical">

        <TextView
            android:id="@+id/title_txtView"
            style="@style/home_tv_title"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="left"
            android:text="@string/imonitorstr" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <com.example.custom.MyJustifiedTextView
                android:id="@+id/desc_txtView"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginTop="5dp"
                android:focusable="true"
                android:focusableInTouchMode="false"
                android:maxLines="5"
                android:paddingBottom="5dp"
                android:paddingLeft="10dp"
                android:paddingRight="5dp"
                android:paddingTop="5dp"
                android:text="@string/imon_desc"
                android:textColor="@color/black"
                android:textSize="14sp" />
        </LinearLayout>
    </LinearLayout>

</LinearLayout>

<View
    android:layout_width="match_parent"
    android:layout_height="1dp"
    android:layout_marginTop="3dp"
    android:background="@color/viewcolor" />

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions