-
Notifications
You must be signed in to change notification settings - Fork 30
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
how to align segment item? #26
Comments
The segmented control algorithm for layout do not support such a case, however this could be achieved with some little hacking ... Here is the result Wrap parent RelativeLayout in circle_text_segment.xml with FrameLayout as shown below <FrameLayout android:layout_width="wrap_content"
android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android">
<RelativeLayout
android:layout_width="65dp"
android:layout_height="65dp">
<ImageView
android:id="@+id/civ_fuel_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:src="@android:color/white"/>
<TextView
android:id="@+id/tv_fuel_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:textSize="14sp"/>
</RelativeLayout>
</FrameLayout> |
For now layouting algorithm doesn't support such a case, I will try to add support for this |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I want to align the data 11 to the left.
how to align?
[Segment item xml]
[Adapter class]
[color setting]
[SegmentedControl]
The text was updated successfully, but these errors were encountered: