Comments (9)
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.
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.
make sure the directory is correct
res/values/styles.xml
check on different device / OS version
from glideslider.
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.
thank you anyway
from glideslider.
I've done it, but it still does not work properly.
from glideslider.
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.
not working for me!
from glideslider.
Can u elaborate it !
from glideslider.
Related Issues (20)
- setScaleType HOT 1
- How to set auto play false? HOT 1
- Indicators HOT 1
- I am getting error with this libery. HOT 2
- Capital package name cause issue for data binding HOT 1
- Rounded Image Slider like in sample project ? HOT 1
- transparent background HOT 1
- Library not implementing on new androidx HOT 1
- How to Set GlideSliderImageStyle to customize curve edge image HOT 1
- RTL support
- Crash after upgrade from v1.4.1 to 1.5.1 HOT 2
- How to round slides ? HOT 1
- Custom indicator issue HOT 2
- Problem with rounded corner on slide
- Application Not Responding (ANR) about 1 minute when use with attach/detach fragment
- Modify the color of an unselected indicator
- Error Use AppGlideModule
- Remove bottom line in Slider Layout
- Could not find com.github.firdausmaulan:GlideSlider:1.5.1 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glideslider.