Git Product home page Git Product logo

Comments (2)

jafu888 avatar jafu888 commented on July 16, 2024

ConstraintLayout does not control the contentment of children views. It only constrains the position of views.
Research ellipsis of multiline textView for a solution.

from constraintlayout.

Hpbbs avatar Hpbbs commented on July 16, 2024

I encounter this situation too, i solved, but i dont know why that help
In addition background follows:

<ImageButton
        android:id="@+id/fragment_dshell_state"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:layout_constraintWidth_max="350dp"
        app:layout_constraintWidth_percent="@dimen/status_width_percent"
        app:layout_constraintDimensionRatio="1"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.5"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.38" />

    <com.didi.it.dday.ui.widget.SelfOnDrawView
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:gravity="center"
        android:padding="0dp"
        app:layout_constraintWidth_max="330dp"
        app:layout_constraintWidth_percent="0.54"
        app:layout_constraintBottom_toBottomOf="@+id/fragment_dshell_state"
        app:layout_constraintEnd_toEndOf="@+id/fragment_dshell_state"
        app:layout_constraintStart_toStartOf="@+id/fragment_dshell_state"
        app:layout_constraintTop_toTopOf="@+id/fragment_dshell_state"
        app:backWidth="7dp"
        app:backColor="#F6F6F9"
        app:progFirstColor="#FF0027EC"
        app:progStartColor="#FF6E9DFF"
        app:progWidth="7dp" />

if put SelfOnDrawView above(means write xml before) ImageButton, the app:layout_constraintWidth_max attr will not efficient

from constraintlayout.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.