-
-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic resize not working #26
Comments
I have the same issue. |
@vipulasri sir I have made a minor change to support the dynamic size ticket view. Please refer to the screenshot. I am using two ticket views and thus will have the advantage of changing ticket colors as well. Let me if I can share make a PR for the same. |
@mwshubham seems like a performance heavy solution. Can you please elaborate on the actual issue you are facing? |
It is not a performance heavy solution but rather not useful for many as it is a specific use case. But we can have a similar feature to have different top and bottom colors. The reason why it is not performance heavy is that I am achieving the same via special cases when scallop percentage is either 100 (for top ticket) and 0 for the bottom ticket. In the former case, I am not drawing the bottom line and arcs and top line and arcs for later. |
@mwshubham can you show me some screenshots for the same? I mean the desired result |
I have a view which contains multiple textviews which will be "part of the ticket", but when I increase one of the textviews number of lines from 1 to 2, it works on the preview, but in real-time execution the resize doesn't work.
`
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.appcompat.widget.Toolbar
android:id="@+id/fakeToolbar"
android:layout_width="match_parent"
android:layout_height="0dp"
android:backgroundTint="?attr/transparent"
android:elevation="1dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHeight_percent="0.08"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/ticketPreviewLayout"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="?attr/darkBackgroundColor"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/fakeToolbar">
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="?attr/surfaceColor"
android:padding="4dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ticketPreviewLayout" />
</androidx.constraintlayout.widget.ConstraintLayout>`
The text was updated successfully, but these errors were encountered: