Android Getsystemservice Inside Custom Arrayadapter
I was trying to write a custom ArrayAdapter referencing here My code is package com.example.AndTest; import java.util.ArrayList; import android.content.Context; import android.v
Solution 1:
getSystemService
is a method of Context
class, so try to get a Context
object first:
LayoutInflatervi= (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
Solution 2:
You could also use static method from View
class :
public static View inflate (Context context, int resource, ViewGroup root)
Post a Comment for "Android Getsystemservice Inside Custom Arrayadapter"