File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Android-SegmentView
2
+ Simple Android Segment Control cloned from iOS 13
3
+
4
+
5
+
6
+ ## XML layout code
7
+ ```
8
+ <com.trinnguyen.SegmentView
9
+ android:id="@+id/segment_2"
10
+ android:layout_width="300dp"
11
+ android:layout_height="36dp"
12
+ android:layout_marginTop="100dp"
13
+ android:layout_marginStart="24dp"
14
+ app:separateLineColor="#D6D6D9"
15
+ app:unselectedTextColor="#7F7F7F"
16
+ app:selectedTextColor="#FFFFFF"
17
+ app:unselectedBackgroundColor="#EEEEEF"
18
+ app:selectedBackgroundColor="@color/colorPrimary"
19
+ app:textAppearance="@style/TextAppearance.AppCompat.Body1"
20
+ app:numSegments="3"
21
+ app:selectedIndex="1"/>
22
+ ```
23
+
24
+ ## Update title
25
+ ```
26
+ segmentView.setText(0, "Map");
27
+ segmentView.setText(1, "Transit");
28
+ segmentView.setText(2, "Satellite");
29
+ ```
You can’t perform that action at this time.
0 commit comments