Giter VIP home page Giter VIP logo

Comments (9)

firdausmaulan avatar firdausmaulan commented on June 11, 2024

add this to your style.xml

<style name="GlideSliderCardStyle" parent="Base.CardView">
        <item name="android:layout_height">match_parent</item>
        <item name="android:layout_width">match_parent</item>
        <item name="cardCornerRadius">8dp</item>
</style>

from glideslider.

vahab-asefi avatar vahab-asefi commented on June 11, 2024

Thank you very much but it does not work for me. Should I add this style in runtime?

Might it be a special issue with CardView in my project?

from glideslider.

firdausmaulan avatar firdausmaulan commented on June 11, 2024

make sure the directory is correct
res/values/styles.xml

check on different device / OS version

from glideslider.

vahab-asefi avatar vahab-asefi commented on June 11, 2024

I've just check it. it is correct.
This my layout and it still does not work:

`
<android.support.constraint.ConstraintLayout 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"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.separak.telemarket.MainActivity"
tools:showIn="@layout/app_bar_main2">

<android.support.constraint.ConstraintLayout
    android:id="@+id/cl_search"
    android:layout_width="match_parent"
    android:layout_height="?android:attr/actionBarSize"
    android:background="@color/colorPrimary"
    android:elevation="@dimen/margin_small"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent">

    <android.support.constraint.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginStart="@dimen/margin_large"
        android:layout_marginTop="@dimen/margin_small"
        android:layout_marginEnd="@dimen/margin_large"
        android:layout_marginBottom="@dimen/margin_large"
        android:background="@drawable/bac_search">

        <ImageView
            android:id="@+id/imageViewSearch"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginRight="@dimen/margin_medium"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:srcCompat="@drawable/magnify" />

        <android.support.v7.widget.AppCompatTextView
            android:id="@+id/tvS_sarch"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/margin_ten"
            android:layout_marginEnd="@dimen/margin_ten"
            android:hint="@string/search_hint"
            android:maxLines="1"
            android:textSize="12sp"
            app:fontFamily="@font/irsans"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toLeftOf="@+id/imageViewSearch"
            app:layout_constraintTop_toTopOf="parent" />


    </android.support.constraint.ConstraintLayout>

</android.support.constraint.ConstraintLayout>

<android.support.v4.widget.NestedScrollView
    android:layout_width="match_parent"
    android:layout_height="0dp"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toBottomOf="@+id/cl_search">

    <android.support.constraint.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <FrameLayout
            android:id="@+id/frm_main"
            android:layout_width="match_parent"
            android:layout_height="160dp"
            android:layout_margin="@dimen/margin_large"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent">

            <com.glide.slider.library.SliderLayout
                android:id="@+id/main_slider"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />

        </FrameLayout>

        <android.support.v7.widget.RecyclerView
            android:id="@+id/rv_nan"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:padding="@dimen/margin_medium"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/frm_main" />

    </android.support.constraint.ConstraintLayout>

</android.support.v4.widget.NestedScrollView>

</android.support.constraint.ConstraintLayout>
`

from glideslider.

vahab-asefi avatar vahab-asefi commented on June 11, 2024

thank you anyway

from glideslider.

vahab-asefi avatar vahab-asefi commented on June 11, 2024

I've done it, but it still does not work properly.

from glideslider.

vahab-asefi avatar vahab-asefi commented on June 11, 2024

The problem has been solved using the code below for RequestOptions defenition:

`RequestOptions requestOptions = new RequestOptions();

    requestOptions = requestOptions.transform(new CenterCrop(), new RoundedCorners(32)); //added
    
     requestOptions
            //.centerCrop()  //commented
            .diskCacheStrategy(DiskCacheStrategy.NONE)
            .placeholder(R.drawable.logo_512)
            .error(R.drawable.alert_circle);`

And by adding two style tags as below:

`<style name="GlideSliderBackgroundStyle">
match_parent
match_parent
@color/transparent
</style>

<style name="GlideSliderImageStyle">
    <item name="android:layout_height">match_parent</item>
    <item name="android:layout_width">match_parent</item>
    <item name="android:background">@color/transparent</item>
</style>`

from glideslider.

SheharyarEjaz avatar SheharyarEjaz commented on June 11, 2024

not working for me!

from glideslider.

SheharyarEjaz avatar SheharyarEjaz commented on June 11, 2024

Can u elaborate it !

from glideslider.

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.