diff options
Diffstat (limited to '')
3 files changed, 272 insertions, 0 deletions
diff --git a/libs/colorpicker/src/main/res/layout-land/ambilwarna_dialog.xml b/libs/colorpicker/src/main/res/layout-land/ambilwarna_dialog.xml new file mode 100644 index 00000000..bd4b9089 --- /dev/null +++ b/libs/colorpicker/src/main/res/layout-land/ambilwarna_dialog.xml @@ -0,0 +1,127 @@ +<?xml version="1.0" encoding="utf-8"?> + +<RelativeLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/ambilwarna_viewContainer" + android:paddingTop="@dimen/ambilwarna_spacer" + android:paddingRight="@dimen/ambilwarna_spacer" + android:paddingBottom="0dp" + android:paddingLeft="@dimen/ambilwarna_spacer" + android:clipToPadding="false" + android:layout_gravity="center" +> + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/ambilwarna_state" + android:orientation="vertical" + android:paddingRight="@dimen/ambilwarna_spacer" + android:gravity="center" + android:layout_centerVertical="true" + > + <FrameLayout + android:layout_width="60dp" + android:layout_height="30dp"> + + <View + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:background="@drawable/ambilwarna_alphacheckered_tiled" /> + + <View + android:id="@+id/ambilwarna_oldColor" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:background="#faa" /> + </FrameLayout> + + <ImageView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@drawable/ambilwarna_arrow_down" + android:paddingTop="@dimen/ambilwarna_spacer" + android:paddingBottom="@dimen/ambilwarna_spacer" + /> + <FrameLayout + android:layout_width="60dp" + android:layout_height="30dp"> + + <View + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:background="@drawable/ambilwarna_alphacheckered_tiled" /> + + <View + android:id="@+id/ambilwarna_newColor" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:background="#aaf" /> + </FrameLayout> + </LinearLayout> + <yuku.ambilwarna.AmbilWarnaSquare + android:id="@+id/ambilwarna_viewSatBri" + android:layout_width="@dimen/ambilwarna_hsvWidth" + android:layout_height="@dimen/ambilwarna_hsvHeight" + android:layout_toRightOf="@id/ambilwarna_state" + android:layerType="software" + /> + <!-- needed because i can't get parent keeping its bottom layout + and its wrap_content height. This view will serve as a bottom spacer. --> + <View + android:layout_width="@dimen/ambilwarna_spacer" + android:layout_height="@dimen/ambilwarna_spacer" + android:layout_below="@id/ambilwarna_viewSatBri" + /> + <ImageView + android:id="@+id/ambilwarna_viewHue" + android:layout_width="@dimen/ambilwarna_hueWidth" + android:layout_height="@dimen/ambilwarna_hsvHeight" + android:layout_toRightOf="@id/ambilwarna_viewSatBri" + android:layout_marginLeft="@dimen/ambilwarna_spacer" + android:src="@drawable/ambilwarna_hue" + android:scaleType="fitXY" + /> + + <ImageView + android:id="@+id/ambilwarna_alphaCheckered" + android:layout_width="@dimen/ambilwarna_hueWidth" + android:layout_height="@dimen/ambilwarna_hsvHeight" + android:layout_marginLeft="@dimen/ambilwarna_spacer" + android:layout_toRightOf="@id/ambilwarna_viewHue" + android:scaleType="fitXY" + android:src="@drawable/ambilwarna_alphacheckered_tiled" /> + + <View + android:id="@+id/ambilwarna_overlay" + android:layout_width="@dimen/ambilwarna_hueWidth" + android:layout_height="@dimen/ambilwarna_hsvHeight" + android:layout_marginLeft="@dimen/ambilwarna_spacer" + android:layout_toRightOf="@id/ambilwarna_viewHue" /> + + <ImageView + android:id="@+id/ambilwarna_cursor" + android:layout_width="9dp" + android:layout_height="9dp" + android:src="@drawable/ambilwarna_cursor" + android:scaleType="matrix" + /> + + <ImageView + android:id="@+id/ambilwarna_alphaCursor" + android:layout_width="9dp" + android:layout_height="9dp" + android:scaleType="matrix" + android:src="@drawable/ambilwarna_cursor" /> + + <ImageView + android:id="@+id/ambilwarna_target" + android:layout_width="15dp" + android:layout_height="15dp" + android:src="@drawable/ambilwarna_target" + android:scaleType="matrix" + /> + + +</RelativeLayout> diff --git a/libs/colorpicker/src/main/res/layout/ambilwarna_dialog.xml b/libs/colorpicker/src/main/res/layout/ambilwarna_dialog.xml new file mode 100644 index 00000000..8a1a403e --- /dev/null +++ b/libs/colorpicker/src/main/res/layout/ambilwarna_dialog.xml @@ -0,0 +1,122 @@ +<?xml version="1.0" encoding="utf-8"?> +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/ambilwarna_dialogView" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_gravity="center" > + + <RelativeLayout + android:id="@+id/ambilwarna_viewContainer" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:clipToPadding="false" + android:paddingBottom="@dimen/ambilwarna_spacer" + android:paddingLeft="@dimen/ambilwarna_spacer" + android:paddingRight="@dimen/ambilwarna_spacer" + android:paddingTop="@dimen/ambilwarna_spacer" > + + <yuku.ambilwarna.AmbilWarnaSquare + android:id="@+id/ambilwarna_viewSatBri" + android:layout_width="@dimen/ambilwarna_hsvWidth" + android:layout_height="@dimen/ambilwarna_hsvHeight" + android:layerType="software" /> + + <ImageView + android:id="@+id/ambilwarna_viewHue" + android:layout_width="@dimen/ambilwarna_hueWidth" + android:layout_height="@dimen/ambilwarna_hsvHeight" + android:layout_marginLeft="@dimen/ambilwarna_spacer" + android:layout_toRightOf="@id/ambilwarna_viewSatBri" + android:scaleType="fitXY" + android:src="@drawable/ambilwarna_hue" /> + + <ImageView + android:id="@+id/ambilwarna_alphaCheckered" + android:layout_width="@dimen/ambilwarna_hueWidth" + android:layout_height="@dimen/ambilwarna_hsvHeight" + android:layout_marginLeft="@dimen/ambilwarna_spacer" + android:layout_toRightOf="@id/ambilwarna_viewHue" + android:scaleType="fitXY" + android:src="@drawable/ambilwarna_alphacheckered_tiled" /> + + <View + android:id="@+id/ambilwarna_overlay" + android:layout_width="@dimen/ambilwarna_hueWidth" + android:layout_height="@dimen/ambilwarna_hsvHeight" + android:layout_marginLeft="@dimen/ambilwarna_spacer" + android:layout_toRightOf="@id/ambilwarna_viewHue" /> + + <ImageView + android:id="@+id/ambilwarna_cursor" + android:layout_width="9dp" + android:layout_height="9dp" + android:scaleType="matrix" + android:src="@drawable/ambilwarna_cursor" /> + + <ImageView + android:id="@+id/ambilwarna_alphaCursor" + android:layout_width="9dp" + android:layout_height="9dp" + android:scaleType="matrix" + android:src="@drawable/ambilwarna_cursor" /> + + <ImageView + android:id="@+id/ambilwarna_target" + android:layout_width="15dp" + android:layout_height="15dp" + android:scaleType="matrix" + android:src="@drawable/ambilwarna_target" /> + + <LinearLayout + android:id="@+id/ambilwarna_state" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_below="@id/ambilwarna_viewSatBri" + android:layout_centerHorizontal="true" + android:layout_marginTop="@dimen/ambilwarna_spacer" + android:gravity="center" + android:orientation="horizontal" > + + <FrameLayout + android:layout_width="60dp" + android:layout_height="30dp" > + + <View + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:background="@drawable/ambilwarna_alphacheckered_tiled" /> + + <View + android:id="@+id/ambilwarna_oldColor" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:background="#faa" /> + </FrameLayout> + + <ImageView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingLeft="@dimen/ambilwarna_spacer" + android:paddingRight="@dimen/ambilwarna_spacer" + android:src="@drawable/ambilwarna_arrow_right" /> + + <FrameLayout + android:layout_width="60dp" + android:layout_height="30dp" > + + <View + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:background="@drawable/ambilwarna_alphacheckered_tiled" /> + + <View + android:id="@+id/ambilwarna_newColor" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:background="#aaf" /> + </FrameLayout> + </LinearLayout> + </RelativeLayout> + +</FrameLayout>
\ No newline at end of file diff --git a/libs/colorpicker/src/main/res/layout/ambilwarna_pref_widget.xml b/libs/colorpicker/src/main/res/layout/ambilwarna_pref_widget.xml new file mode 100644 index 00000000..bbab8d95 --- /dev/null +++ b/libs/colorpicker/src/main/res/layout/ambilwarna_pref_widget.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<FrameLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="24dp" + android:layout_height="24dp" + android:layout_gravity="center_vertical" + android:layout_marginRight="6dp" + android:focusable="false" + android:clickable="false"> + + <ImageView + android:layout_width="match_parent" + android:layout_height="match_parent" + android:scaleType="fitXY" + android:src="@drawable/ambilwarna_alphacheckered_tiled"/> + + + <yuku.ambilwarna.widget.AmbilWarnaPrefWidgetView + android:layout_width="match_parent" + android:layout_height="match_parent" + android:id="@+id/ambilwarna_pref_widget_box" + /> +</FrameLayout> |