Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5637c793 authored by Moez Bhatti's avatar Moez Bhatti
Browse files

Merge color picker dialog layouts

parent a7abe2d1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -499,7 +499,7 @@ public class ThemeManager {
    private static void showColorPicker(QKActivity context, View.OnClickListener saveListener) {
        final QKDialog dialog = new QKDialog();

        View view = LayoutInflater.from(mContext).inflate(R.layout.dialog_color_picker_pager, null, false);
        View view = LayoutInflater.from(mContext).inflate(R.layout.dialog_color_picker, null, false);
        ColorPickerViewHolder holder = new ColorPickerViewHolder(view);

        holder.mTab1.setBackgroundDrawable(getRippleBackground());
@@ -724,7 +724,7 @@ public class ThemeManager {
        @Bind(R.id.tab_1) QKTextView mTab1;
        @Bind(R.id.tab_2) QKTextView mTab2;
        @Bind(R.id.pager) ViewPager mPager;
        @Bind(R.id.palette_view) ColorPickerPalette mPalette;
        @Bind(R.id.palette) ColorPickerPalette mPalette;
        @Bind(R.id.preview) View mPreview;
        @Bind(R.id.red) SeekBar mRed;
        @Bind(R.id.red_value) QKTextView mRedValue;
+1 −1
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ public class ColorPickerDialog extends DialogFragment implements ColorPickerSwat
    }

    public Dialog onCreateDialog(Bundle bundle) {
        View view = LayoutInflater.from(getActivity()).inflate(R.layout.dialog_color_picker, null);
        View view = LayoutInflater.from(getActivity()).inflate(R.layout.dialog_color_picker_led, null);
        mProgress = ((ProgressBar) view.findViewById(android.R.id.progress));
        mPalette = ((ColorPickerPalette) view.findViewById(R.id.color_picker));
        mPalette.init(mSize, mColumns, this);
+163 −26
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="48dp"
        android:paddingLeft="16dp"
        android:paddingRight="16dp">

        <com.moez.QKSMS.ui.view.QKTextView
            android:id="@+id/tab_1"
            android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:gravity="center">
            android:layout_height="match_parent"
            android:gravity="center"
            android:paddingLeft="16dp"
            android:paddingRight="16dp"
            android:text="@string/title_palette"
            app:type="primary_bold" />

    <FrameLayout
        <com.moez.QKSMS.ui.view.QKTextView
            android:id="@+id/tab_2"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:gravity="center"
            android:paddingLeft="16dp"
            android:paddingRight="16dp"
            android:text="@string/title_rgb"
            app:type="primary_bold" />

    </LinearLayout>

    <android.support.v4.view.ViewPager
        android:id="@+id/pager"
        android:layout_width="match_parent"
        android:layout_height="320dp">

        <com.moez.QKSMS.ui.view.colorpicker.ColorPickerPalette
            android:id="@+id/palette"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="center" />

        <LinearLayout
            android:id="@+id/rgb"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical">

            <View
                android:id="@+id/preview"
                android:layout_width="match_parent"
                android:layout_height="128dp"
                android:background="#e2e28e" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="36dp"
                android:layout_marginTop="16dp"
                android:gravity="center_vertical">

                <com.moez.QKSMS.ui.view.QKTextView
                    android:layout_width="24dp"
                    android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
                    android:layout_marginLeft="16dp"
                    android:gravity="center"
        android:padding="28dp">
                    android:lines="1"
                    android:text="R"
                    app:type="secondary"
                    tools:ignore="HardcodedText" />

        <ProgressBar
            android:id="@android:id/progress"
            style="?android:attr/progressBarStyleLarge"
            android:layout_width="wrap_content"
                <SeekBar
                    android:id="@+id/red"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:gravity="center" />
                    android:layout_weight="1"
                    android:max="255" />

        <com.moez.QKSMS.ui.view.colorpicker.ColorPickerPalette
            android:id="@+id/color_picker"
            android:layout_width="wrap_content"
                <com.moez.QKSMS.ui.view.QKTextView
                    android:id="@+id/red_value"
                    android:layout_width="36dp"
                    android:layout_height="wrap_content"
                    android:layout_marginRight="16dp"
                    android:gravity="center"
                    android:lines="1"
                    app:type="primary"
                    tools:text="41" />

            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="36dp"
                android:gravity="center_vertical">

                <com.moez.QKSMS.ui.view.QKTextView
                    android:layout_width="24dp"
                    android:layout_height="wrap_content"
            android:layout_gravity="center"
                    android:layout_marginLeft="16dp"
                    android:gravity="center"
            android:visibility="gone" />
    </FrameLayout>
</ScrollView>
 No newline at end of file
                    android:lines="1"
                    android:text="G"
                    app:type="secondary"
                    tools:ignore="HardcodedText" />

                <SeekBar
                    android:id="@+id/green"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:max="255" />

                <com.moez.QKSMS.ui.view.QKTextView
                    android:id="@+id/green_value"
                    android:layout_width="36dp"
                    android:layout_height="wrap_content"
                    android:layout_marginRight="16dp"
                    android:gravity="center"
                    android:lines="1"
                    app:type="primary"
                    tools:text="22" />

            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="36dp"
                android:layout_marginBottom="16dp"
                android:gravity="center_vertical">

                <com.moez.QKSMS.ui.view.QKTextView
                    android:layout_width="24dp"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="16dp"
                    android:gravity="center"
                    android:lines="1"
                    android:text="B"
                    app:type="secondary"
                    tools:ignore="HardcodedText" />

                <SeekBar
                    android:id="@+id/blue"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:max="255" />

                <com.moez.QKSMS.ui.view.QKTextView
                    android:id="@+id/blue_value"
                    android:layout_width="36dp"
                    android:layout_height="wrap_content"
                    android:layout_marginRight="16dp"
                    android:gravity="center"
                    android:lines="1"
                    app:type="primary"
                    tools:text="231" />

            </LinearLayout>

        </LinearLayout>

    </android.support.v4.view.ViewPager>

</LinearLayout>
 No newline at end of file
+31 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:gravity="center">

    <FrameLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        android:gravity="center"
        android:padding="28dp">

        <ProgressBar
            android:id="@android:id/progress"
            style="?android:attr/progressBarStyleLarge"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:gravity="center" />

        <com.moez.QKSMS.ui.view.colorpicker.ColorPickerPalette
            android:id="@+id/color_picker"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:gravity="center"
            android:visibility="gone" />
    </FrameLayout>
</ScrollView>
 No newline at end of file
+0 −65
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
    android:orientation="vertical">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="48dp"
        android:paddingLeft="16dp"
        android:paddingRight="16dp">

        <com.moez.QKSMS.ui.view.QKTextView
            android:id="@+id/tab_1"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:gravity="center"
            android:paddingLeft="16dp"
            android:paddingRight="16dp"
            android:text="@string/title_palette"
            app:type="primary_bold" />

        <com.moez.QKSMS.ui.view.QKTextView
            android:id="@+id/tab_2"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:gravity="center"
            android:paddingLeft="16dp"
            android:paddingRight="16dp"
            android:text="@string/title_rgb"
            app:type="primary_bold" />

    </LinearLayout>

    <android.support.v4.view.ViewPager
        android:id="@+id/pager"
        android:layout_width="match_parent"
        android:layout_height="320dp">

        <FrameLayout
            android:id="@+id/palette"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <com.moez.QKSMS.ui.view.colorpicker.ColorPickerPalette
                android:id="@+id/palette_view"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:gravity="center" />

        </FrameLayout>

        <FrameLayout
            android:id="@+id/rgb"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <include layout="@layout/dialog_color_picker_rgb" />

        </FrameLayout>

    </android.support.v4.view.ViewPager>

</LinearLayout>
 No newline at end of file
Loading