sharish / ShimmerRecyclerView

Other
4.02k stars 550 forks source link

android:orientation="horizontal" is invalid #55

Open TianGuisen opened 3 years ago

TianGuisen commented 3 years ago
<ShimmerRecyclerView 
android:orientation="horizontal" 
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
/>

is invalid

<RecyclerView 
android:orientation="horizontal" 
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
/>

is valid

serdarbuyukkanli-exi commented 2 years ago

Get rid of the lines below.

android:orientation="horizontal" 
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"

and set LayoutManager programmatically like that below:

val llm = LinearLayoutManager(context, RecyclerView.HORIZONTAL, false)
binding.prescriptionRecyclerView.layoutManager = llm