Android GridView grayed out items missmatch -


i have gridview class used on fragments , activities, in 1 of activities lines appears kind of faded out, on phone, on emulator fine...

so have custom class used make gridview fullscreen width, down in question text, should big deal. custom class use in several dialogfragment , activity. on emulator fine, if move phone gridview on activity looks faded out or weird - alpha of first line invisible , second line similar. dont understand why different between emulator , phone. how can fix this?

screenshots , code details below:

from phone from emulator

the layout code looks this:

<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/activity_add_composed_meal" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#ffffff" android:paddingbottom="@dimen/activity_vertical_margin" android:paddingleft="@dimen/activity_horizontal_margin" android:paddingright="@dimen/activity_horizontal_margin" android:paddingtop="@dimen/activity_vertical_margin" tools:context="com.example.pascal.myapplication.addcomposedmealactivity">  <scrollview     android:layout_width="match_parent"     android:layout_height="match_parent">     <android.support.constraint.constraintlayout         android:layout_width="match_parent"         android:layout_height="match_parent">         <textview             android:text="meal"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:id="@+id/textview2"             app:layout_constraintstart_tostartof="parent"             app:layout_constrainttop_totopof="parent"             app:layout_constraintbaseline_tobaselineof="@+id/edittextcomposedname"/>         <edittext             android:text=""             android:layout_width="0dp"             android:layout_height="wrap_content"             android:inputtype="text"             android:id="@+id/edittextcomposedname"             app:layout_constraintstart_toendof="@+id/textview2"             app:layout_constraintend_tostartof="@+id/buttonaddcomposedmealaddpart"             app:layout_constraintbottom_tobottomof="@+id/buttonaddcomposedmealaddpart" />         <button             android:text="add part"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:id="@+id/buttonaddcomposedmealaddpart"             app:layout_constraintstart_toendof="@+id/edittextcomposedname"             app:layout_constraintend_toendof="parent"             app:layout_constrainttop_totopof="parent" />          <com.example.pascal.myapplication.gridviewfullscreen             android:layout_width="0dp"             android:layout_height="wrap_content"             android:id="@+id/gridviewaddcomposedmeal"             app:layout_constraintstart_tostartof="parent"             app:layout_constraintend_toendof="parent"             app:layout_constrainttop_tobottomof="@+id/buttonaddcomposedmealaddpart" />          <button             android:text="store database"             android:layout_width="0dp"             android:layout_height="wrap_content"             android:id="@+id/buttonaddcomposedmealstoredb"             app:layout_constraintstart_tostartof="parent"             app:layout_constraintend_toendof="parent"             app:layout_constrainttop_tobottomof="@+id/gridviewaddcomposedmeal"             app:layout_constraintbottom_tobottomof="parent" />     </android.support.constraint.constraintlayout> </scrollview> 

btw. custom class make appear "fullscreen":

public class gridviewfullscreen extends gridview { public gridviewfullscreen(context context, attributeset attrs) {     super(context, attrs); }  public gridviewfullscreen(context context) {     super(context); }  public gridviewfullscreen(context context, attributeset attrs, int defstyle) {     super(context, attrs, defstyle); }  @override public void onmeasure(int widthmeasurespec, int heightmeasurespec) {     int expandspec = measurespec.makemeasurespec(integer.max_value >> 2,             measurespec.at_most);     super.onmeasure(widthmeasurespec, expandspec); } 

}


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -