Collection of Android custom Views
<com.o3dr.android.lib.andwidgets.views.AspectRatioVideoView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:heightRatio="9"
app:widthRatio="15"/>
<com.o3dr.android.lib.andwidgets.views.SettingListItemView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:header="Test"
app:subHeader="Sub Test"/>
<com.o3dr.android.lib.andwidgets.views.VerticalSeekBar
android:layout_width="100dp"
android:layout_height="match_parent"
android:max="100"
android:splitTrack="false"
app:customThumb="@drawable/altitude_slider_icon"
app:onlyThumb="true" />
app:onlyThumb
allows the options to decide whether touching anywhere on the seekbar or only on the thumb should initiate the seekbar movement.true
if only want thumb touch to allow seekbar move.app:customThumb
is used instead ofandroid:thumb
to allow full redraw of the thumb.
NOTE:
android:thumb
will be ignored.
See http://stackoverflow.com/questions/33112277/android-6-0-marshmallow-stops-showing-vertical-seekbar-thumb/36094973
<com.o3dr.android.lib.andwidgets.views.TextVerticalSeekBar
android:layout_width="90dp"
android:layout_height="match_parent"
android:max="100"
android:splitTrack="false"
android:textSize="20sp"
android:progress="0"
android:text="text"
app:customThumb="@drawable/altitude_slider_icon"
app:disabledThumb="@drawable/disabled_thumb"
app:onlyThumb="true"
app:alignText="thumb"
app:textGravity="center"/>
app:textGravity
Location where the text should be drawn horizontally. The text will always be drawn in the center vertically. Possible values areleft
,right
, andcenter
. The default iscenter
app:customThumb
See above inVerticalSeekBar
app:disabledThumb
The thumb to show when the seekbar is disabled.app:alignText
Draws the text on either the thumb or end of seekbar. Possible values arethumb
orprogress
. Default isthumb
<com.o3dr.android.lib.andwidgets.views.IntervalSeekBar
android:id="@+id/interval_seek_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:max="100"
app:dotColor="@color/blue"
app:dotRadius="5dp"/>
app:dotColor
sets the color for the interval circlesapp:dotRadius
the radisu for the interval circles- In code, you can set the locations of the dots. The values indicate the progress where the dots should be drawn.
int[] dotLocations = new int[]{0, 50, 75, 100};
intervalSeekBar.setDotLocations(dotLocations);
<com.o3dr.android.lib.andwidgets.views.AutofitRecyclerView
android:id="@+id/auto_fit_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:columnWidth="100dp"/>
app:columnWidth
specifies the width of each recycler view item. The code will calcuate how many columns there should be
<com.o3dr.android.lib.andwidgets.views.CustomSwipeViewPager
android:id="@+id/custom_swipe_view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:swipeEnabled="false"/>
app:swipeEnabled
set whether the viewPager can be swiped or not.