java - Android - ImageView - Black Images on Galaxy Tab 2 -
my application working fine on every single device except on galaxy tab 2.
this how looks on galaxy tab 2:
i have tried every single solution , it's still same ;/.
imageview.setimageresource(songslist.get(position).geticonid());
<--- adding right resource id here , shows black image.
i duplicated graphic hdpi/xhdpi/xxhdpi/xxhdpi
folders , it's same.
anyone have idea on what's wrong here? ;s
my adapter:
@override public view getview(int position, view view, viewgroup parent) { if (view == null) { layoutinflater inflater = (layoutinflater) context .getsystemservice(context.layout_inflater_service); view = inflater.inflate(r.layout.view_row, parent, false); } imageview = (imageview) view.findviewbyid(r.id.list_image); imageview.setimageresource(songslist.get(position).geticonid()); log.i("songbox", "" + songslist.get(position).geticonid()); return view; }
view_row:
<framelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="150dp" android:background="@android:drawable/dialog_holo_light_frame" android:orientation="vertical" android:padding="5dp"> <imageview android:id="@+id/list_image" android:layout_width="match_parent" android:layout_height="match_parent" android:adjustviewbounds="true" android:contentdescription="@string/desc" android:scaletype="centercrop" /> <relativelayout android:id="@+id/rowrl" android:layout_width="match_parent" android:layout_height="match_parent"> <textview android:id="@+id/list_text" style="@style/uitextview" android:layout_width="match_parent" android:layout_height="60dp" android:layout_alignparentbottom="true" android:background="#90faebd7" android:gravity="center" android:textsize="22sp" /> <imageview android:id="@+id/list_lock" android:layout_width="70dp" android:layout_height="wrap_content" android:layout_above="@+id/list_text" android:layout_alignparentend="true" android:layout_alignparentright="true" android:layout_alignparenttop="true" android:layout_margin="5dp" android:src="@drawable/icon_lock_glow" /> </relativelayout> <linearlayout android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/border" /> </framelayout>
songsrepository(this how i'm getting ids):
public class songs { public list<isong> tolist() { return arrays.aslist( new song1(), new song2(), new song3(), new song4(), new song5(), new song6(), new song7(), new song8(), new song9(), new song10(), new song11(), new song12(), new song13(), new song14(), new song15(), new song16(), new song17(), new song18(), new song19(), new song20()); } public isong getsong(int listposition) { return tolist().get(listposition); } }
and example of song class:
public class song4 implements isong { @override public boolean isunlocked() { return true; } @override public int getnameid() { return r.string.song_4; } @override public int getrawid() { return r.raw.song4; } @override public int geticonid() { return r.drawable.box_song4; } @override public int getbackgroundid() { return r.drawable.background_song4; } }
Comments
Post a Comment