Mam taki kod i on w ogóle nie edytuje widoków dlaczego w onStart nie mogę a w onCreateView mogę kod poniżej
public void onStart(){
super.onStart();
View widok =getView();
if(widok!=null) {
try {
SQLiteOpenHelper skoczekopenhelper = new SkokiDatabasehelper(getActivity().getApplicationContext());
SQLiteDatabase db = skoczekopenhelper.getReadableDatabase();
Cursor cursor = db.query("SKOCZKOWIE", new String[]{"IMIE"}, "_id = ?", new String[]{Integer.toString(idskoczka)}, null, null, null);
if (cursor.moveToFirst()) {
String imie = cursor.getString(0);
TextView imie_skoczka = (TextView) widok.findViewById(R.id.im_s);
imie_skoczka.setText("Tadeuszqwq");
}
cursor.close();
db.close();
} catch (SQLException e) {
Toast.makeText(getActivity().getApplicationContext(), "Baza niedostępnaa", Toast.LENGTH_SHORT);
}
}
{
}
}
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View w =inflater.inflate(R.layout.fragment_skoczek_info, container, false);
TextView imie_skoczka = (TextView) w.findViewById(R.id.im_s);
imie_skoczka.setText("Tadeusz");
return w;
}