Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic Sizing Problem #654

Open
xJustCallMeAlex opened this issue Nov 5, 2024 · 0 comments
Open

Dynamic Sizing Problem #654

xJustCallMeAlex opened this issue Nov 5, 2024 · 0 comments

Comments

@xJustCallMeAlex
Copy link

In my Android App the Image Cropper is way too small. The only way I managed to increase its size to what I want is by hardcoding a height value like 500dp, which is something I'd like to avoid.

Here a little excerpt from my xml.

´´´
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swiperefresh"
android:layout_width="match_parent"
android:layout_height="match_parent">

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

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:gravity="center"
                android:visibility="gone"
                android:id="@+id/buttonContainer">

                <Button
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:id="@+id/cancelCrop"
                    android:text=""
                    android:textColor="@android:color/white"
                    android:background="@color/colorGray"
                    android:drawableTop="@drawable/ic_arrow_back"
                    android:layout_marginEnd="5dp"
                    android:layout_marginStart="10dp"
                    android:layout_marginBottom="5dp"
                    android:paddingTop="25dp"/>

                <Button
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:id="@+id/finishCrop"
                    android:text=""
                    android:textColor="@android:color/white"
                    android:background="@color/colorGray"
                    android:drawableTop="@drawable/ic_accept"
                    android:layout_marginEnd="10dp"
                    android:layout_marginStart="5dp"
                    android:layout_marginBottom="5dp"
                    android:paddingTop="25dp"/>

            </LinearLayout>

            <com.canhub.cropper.CropImageView
                android:id="@+id/cropImageView"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:adjustViewBounds="true"
                android:visibility="gone"
                android:padding="0dp"
                />

            <LinearLayout
                android:id="@+id/settingsContainer"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:visibility="visible">



                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginBottom="20dp">

                    <TextView
                        android:id="@+id/tv_lang"
                        style="@style/TextMedium"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentStart="true"
                        android:layout_alignParentLeft="true"
                        android:layout_centerVertical="true"
                        android:text="@string/NAVIGATION___LANGUAGE"
                        android:textColor="@color/colorText" />

´´´

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant