I am loading fragment into my activity. where i am using listview in my fragment
public class NewTask : Fragment {
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
//var textToDisplay = new StringBuilder().Insert(0, "The quick brown fox jumps over the lazy dog. ", 450).ToString();
var view = inflater.Inflate(Resource.Layout.NewTask1, container, false);
..........
_adapter =new CustomAdapter(this, tableItems);
}
here is my adapter:
public class CustomAdapter : BaseAdapter { public override View GetView(int position, View convertView, ViewGroup parent) {
var view = convertView ?? _context.LayoutInflater.Inflate(Resource.Layout.CustomTable, null);
var chemical = _items[position];
{
}
I am facing the issue here where am loading fragment into activity and i dont know how to use inflate to get my custom view in the adapter.
as you can see _context is fragment instance.
please give solution.thanks in advance