I'm filling the Gridview with Textview values which are retrieved from the local SQLite database. Basically what I've implemented is that the movie items are pushed into the database once they are marked as favorite.
But the textviews are overlapping with each other if the content does not fit in one line.
However, what's more strange is, if the long content (which requires 2 or more lines) is there on the right hand side (i.e. these are in even rows of the database table) they work fine!
My Gridview is:
<LinearLayout xmlns:android="http://ift.tt/nIICcg"
xmlns:tools="http://ift.tt/LrGmb4"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.p1.MainActivity$MostPopular">
<GridView
android:id="@+id/griview_toprated"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:numColumns="auto_fit">
</GridView>
</LinearLayout>
And Textview:
<LinearLayout xmlns:android="http://ift.tt/nIICcg"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView xmlns:android="http://ift.tt/nIICcg"
android:id="@+id/checkTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"/>
</LinearLayout>
I've searched a lot, played with the item height, width to match parent, wrap content but couldn't find any solution!
Aucun commentaire:
Enregistrer un commentaire