Giter VIP home page Giter VIP logo

Comments (2)

lozn00 avatar lozn00 commented on June 24, 2024
ImageView ivExpand = getBinding().ivExpandView;
        if (ivExpand != null) {
            ivExpand.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    if (getBinding().left.getVisibility() == View.VISIBLE) {
                        getBinding().left.setVisibility(View.GONE);

                        ivExpand.setImageResource(R.drawable.ic_view_fold);
                    } else {
                        getBinding().left.setVisibility(View.VISIBLE);
                        ivExpand.setImageResource(R.drawable.ic_view_expand);
                    }
                }
            });
        }

from views-widgets-samples.

lozn00 avatar lozn00 commented on June 24, 2024


        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:animateLayoutChanges="true"
            android:layout_height="match_parent"
            android:background="@color/shallowGray"
            android:paddingTop="@dimen/margin_default_dp"

            android:paddingLeft="@dimen/margin_default_dp"
            android:paddingRight="@dimen/margin_default_dp"
            android:orientation="horizontal"
            app:layout_behavior=".ui.behavior.FixScrollingFooterBehavior1">
            <androidx.cardview.widget.CardView

                android:layout_marginBottom="@dimen/margin_default_dp"
                android:id="@+id/left"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintWidth_percent="0.4"
                android:layout_width="0dp"
                android:layout_height="match_parent">

            <androidx.core.widget.NestedScrollView


                android:layout_height="match_parent"
                android:layout_width="match_parent" >


            <LinearLayout
                android:layout_marginTop="@dimen/margin_default_dp"
                android:layout_marginBottom="@dimen/margin_default_dp"
                android:layout_marginLeft="@dimen/margin_default_dp"
                android:layout_marginRight="@dimen/margin_default_dp"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical">

                <com.google.android.material.textfield.TextInputLayout

                    android:id="@+id/text_wrap_order_no"
                    style="@style/textinput_layout_style_black_deep"

                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_weight="0.6"
                    android:hint="@string/inspet_order_number"
                    android:textSize="50sp"
                    app:lock="@{lock}"

                    >

                    <com.sotrun.app.ui.ScanEditText
                        android:id="@+id/ev_woo"
                        style="@style/edit_text_style"
                        app:lock="@{lock}" />
                </com.google.android.material.textfield.TextInputLayout>



                <com.sotrun.app.ui.spinner.EditSpinner
                    android:id="@+id/spinner_inspect_single_line"
                    style="@style/edit_spinner_style"
                    android:layout_width="match_parent"
                    android:layout_weight="1"
                    app:spinner_hint="@string/inspect_single_line"
                    app:spinner_mode="dialog" />



                    <com.google.android.material.textfield.TextInputLayout
                        android:id="@+id/text_wrap_Cargo_receipt_number"
                        style="@style/textinput_layout_style_black_deep"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"

                        android:layout_weight="1"

                        android:hint="@string/Cargo_receipt_number"
                        app:lock="@{lock}">

                        <com.sotrun.app.ui.MyEditText
                            android:id="@+id/ev_Cargo_receipt_number"
                            style="@style/edit_text_style"
                            android:enabled="false"
                            app:lock="@{lock}"

                            />
                    </com.google.android.material.textfield.TextInputLayout>

                <LinearLayout
                    android:orientation="horizontal"

                    android:gravity="center"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">
                    <com.google.android.material.textfield.TextInputLayout
                        android:id="@+id/text_wrap_supplier_no"

                        style="@style/textinput_layout_style_black_deep"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:hint="@string/supplier_number"
                        app:lock="@{lock}">

                        <com.sotrun.app.ui.MyEditText
                            android:id="@+id/ev_supplier_no"
                            style="@style/edit_text_style"
                            android:enabled="false"
                            android:imeOptions="actionNext|flagNoExtractUi"
                            app:lock="@{lock}" />
                    </com.google.android.material.textfield.TextInputLayout>

                    <Button
                        android:id="@+id/btn_more_vendorno"
                        android:layout_width="40dp"
                        android:layout_height="wrap_content"
                        android:text="\?"
                        android:textColor="@color/white" />
                </LinearLayout>


                    <com.google.android.material.textfield.TextInputLayout
                        android:id="@+id/text_wrap_supplier_name"

                        style="@style/textinput_layout_style_black_deep"

                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:hint="@string/supplier_name"
                        app:lock="@{lock}">

                        <com.sotrun.app.ui.MyEditText
                            android:id="@+id/ev_supplier_name"
                            style="@style/edit_text_style"
                            android:enabled="false"
                            app:lock="@{lock}" />
                    </com.google.android.material.textfield.TextInputLayout>


                    <com.sotrun.app.ui.spinner.EditSpinner
                        android:id="@+id/goods_partno_spinner"
                        style="@style/edit_spinner_style"
                        android:layout_width="match_parent"
                        android:layout_marginLeft="2dp"
                        android:layout_weight="1"
                        app:spinner_hint="@string/goods_partno"
                        app:spinner_mode="dialog"

                        />

                    <com.sotrun.app.ui.spinner.EditSpinner
                        android:id="@+id/goods_category_spinner"
                        style="@style/edit_spinner_style"
                        android:layout_width="match_parent"
                        android:layout_weight="1"
                        app:spinner_hint="@string/goods_category"

                        />


                    <com.google.android.material.textfield.TextInputLayout
                        android:id="@+id/text_wrap_commodity_specification"

                        style="@style/textinput_layout_style_black_deep"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="2dp"

                        android:layout_marginRight="2dp"
                        android:layout_weight="1"
                        android:hint="@string/commodity_specification"
                        app:lock="@{lock}">

                        <com.sotrun.app.ui.MyEditText
                            android:id="@+id/ev_commodity_specificationl"
                            style="@style/edit_text_style"
                            app:lock="@{lock}" />
                    </com.google.android.material.textfield.TextInputLayout>




                    <com.sotrun.app.ui.spinner.EditSpinner
                        android:id="@+id/purchase_ordernumber_spinner"
                        style="@style/edit_spinner_style"
                        android:layout_width="0dp"
                        android:layout_weight="1"
                        app:spinner_hint="@string/purchase_ordernumber"
                        app:spinner_mode="dialog"

                        />


                    <com.sotrun.app.ui.spinner.EditSpinner
                        android:id="@+id/inspect_status_spinner"
                        style="@style/edit_spinner_style"
                        android:layout_width="0dp"
                        android:layout_weight="1"
                        app:spinner_hint="@string/inspect_status" />


                    <com.google.android.material.textfield.TextInputLayout
                        android:id="@+id/text_wrap_incoming_number"

                        style="@style/textinput_layout_style_black_deep"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="2dp"
                        android:layout_marginRight="2dp"
                        android:layout_weight="1"
                        android:hint="@string/incoming_number"
                        app:lock="@{lock}">

                        <com.sotrun.app.ui.MyEditText
                            android:id="@+id/ev_incoming_number"
                            style="@style/edit_text_style"
                            android:inputType="number"
                            app:lock="@{lock}" />
                    </com.google.android.material.textfield.TextInputLayout>


                    <com.sotrun.app.ui.date.TimeView
                        android:id="@+id/timeview_submission_date"
                        style="@style/timeview_style"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_marginRight="8dp"
                        android:layout_weight="1"
                        app:lock="@{lock}"
                        app:timeview_hint="@string/submission_date" />




            </LinearLayout>

            </androidx.core.widget.NestedScrollView>
                </androidx.cardview.widget.CardView>
            <LinearLayout
                android:layout_weight="1"
                android:id="@+id/right"
                android:paddingRight="@dimen/margin_default_dp"
                android:paddingBottom="@dimen/margin_default_dp"
                android:paddingLeft="@dimen/margin_default_dp"
                android:layout_width="0dp"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintLeft_toRightOf="@+id/left"
                android:orientation="vertical"
                android:layout_height="match_parent">
                <androidx.cardview.widget.CardView
                    android:layout_width="match_parent"

                    android:layout_marginBottom="2dp"

                    android:layout_height="wrap_content">
            <LinearLayout
                android:orientation="horizontal"
                android:gravity="center"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
                <com.sotrun.app.module.quality.iqc.MyTabLayout
                    android:id="@+id/tab_layout"
                    app:tabPaddingEnd="5dp"
                    android:layout_width="0dp"
                    android:layout_gravity="center"
                    android:layout_weight="1"
                    app:tabPaddingStart="5dp"
                    app:tabMode="fixed"
                    style="@style/style_tablayoutquality" />
                <ImageView
                    android:id="@+id/iv_expand_view"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"

                    android:layout_alignParentRight="true"
                    android:layout_centerVertical="true"
                    android:paddingRight="@dimen/margin_default_dp"
                    android:paddingLeft="@dimen/margin_default_dp"
                    android:src="@drawable/ic_view_expand" />
            </LinearLayout>

                </androidx.cardview.widget.CardView>
                <androidx.cardview.widget.CardView
                    android:id="@+id/card_view"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent">
                <androidx.viewpager2.widget.ViewPager2
                    android:id="@+id/viewpager2"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent" />

                </androidx.cardview.widget.CardView>
            </LinearLayout>


        </androidx.constraintlayout.widget.ConstraintLayout>

from views-widgets-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.