Sto cercando di dimostrare la mia ricerca si traduce in una ListView
sul Fragment
, ma fallisce su:getLayoutInflater() nel frammento
LayoutInflater inflater = getLayoutInflater();
Il metodo getLayoutInflater (Bundle) nel tipo frammento non è applicabile per gli argomenti()
Questo è il mio codice:
public View getView(int position, View convertView, ViewGroup parent)
{
LayoutInflater inflater = getLayoutInflater();
View row;
row = inflater.inflate(R.layout.list_single, parent, false);
TextView textview = (TextView) row.findViewById(R.id.TextView01);
ImageView imageview = (ImageView) row
.findViewById(R.id.ImageView01);
textview.setText(data_text[position]);
imageview.setImageResource(data_image[position]);
return (row);
}
Come posso risolvere questo problema?
'LayoutInflater gonfiatore = LayoutInflater.from (getActivity());' – Blackbelt