last day (15 days later) » 

8:03 PM
0
A: Android set image on ListView in Fragment

Akhil JainYou need a custom layout and a custom adapter Below is the code Custom layout-> item_layout <ImageView android:id="@+id/icon" android:layout_width="22px" android:layout_height="22px" android:layout_marginLeft="4px" android:layout_marginRight="10px" ...

 
whats android:id="@+id/text1" and android:id="@android:id/text1" ? witch is required?
 
use android:id="@+id/text1", since in code also holder.textView = (TextView)convertView.findViewById(R.id.text1); while infalting doing the same , use first one
 
after commenting mDrawerListView in onCreateView function i'm using this action to use CustomAdapter thats does not working. please help me to use that. My code : SetCustomListViewItems customListView = new SetCustomListViewItems(context,values,imgid);
 
please paste the code in pastebin pastebin.com and share link
 
pastebin.com/Gj4USanw
 
8:03 PM
what is the error???
 
... has stopped
 
what has stopped??
 
hi
 
hello
 
thanks to invite tp chat
 
8:04 PM
what is the issue?? tell quickly
ya sure
 
i get this error ... has stopped
 
logcat please??
otherwise how will i understand what the error is
 
what ever you shared earlier is not entire code

there is something in line 312
need to see that
share entire file on pastebin
complete code
 
8:08 PM
its quite simple, see
just do this
SetCustomListViewItems customListView = new SetCustomListViewItems(getActivity(),values,imgid);
the context value was null that is why it was giving NPE(nullpinter exception)
understood??
 
yes
not resolve problem
i get error has stopped
 
why, what now??
error , please paste error logs here only
 
1402-1402/ir.tsms E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{ir.tsms/ir.tsms.MainActivity}: android.view.InflateException: Binary XML file line #17: Error inflating class fragment
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
at android.app.ActivityThread.access$600(ActivityThread.java:123)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
 
complete error log, please
this is half guessing so
 
8:13 PM
ir.tsms.MainActivity.onCreate(MainActivity.java:36)
what is happening at this line
mainactivity line 36
?/
 
setContentView(R.layout.activity_main);
 
error in that layout
at line no 17
see in your eclipse or editor...
 
Main Activity: pastebin.com/5GbimzS6
not any line in no 17
thats empty or comment
<fragment
android:id="@+id/navigation_drawer"
android:name="ir.tsms.NavigationDrawerFragment"
android:layout_width="@dimen/navigation_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="start"
tools:layout="@layout/fragment_navigation_drawer" />
 
i looked for your issue and this what i came across
4
A: Error inflating DrawerLayout

Jade ByfieldMake sure you're using the latest revision of the support library(13) which is what contains the DrawerLayout and other relevant classes. Copy the .jar for the support library to the /libs folder of your project. Finally, Update ADT to the latest version. Logcat is complaining Caused by: a...

search this on google
"Error inflating class fragment in navigation drawer"
 
ok
 
8:21 PM
sorry i have to go, i am late,
hope i helped
please accept answer if it helped
bye
 
thanks
bye
 
try other solution and update if possible
 
ok. i can not resolve this problem now
must be ask
 

last day (15 days later) »