package de.erich.railcontrol; import android.app.Fragment; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.EditText; public class EditLok extends Fragment { public static Button btn_editLok_save; public static Button btn_editLok_delete; public static EditText et_editLok_name; public static EditText et_editLok_adresse; public static EditText et_editLok_maxspeed; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { System.out.println("onCreateView"); View frag = inflater.inflate(R.layout.fragment_edit_lok, container, false); btn_editLok_save = (Button) frag.findViewById(R.id.btn_editLok_save); btn_editLok_delete = (Button) frag.findViewById(R.id.btn_editLok_delete); et_editLok_adresse = (EditText) frag.findViewById(R.id.et_editLok_adresse); et_editLok_name = (EditText) frag.findViewById(R.id.et_editLok_name); et_editLok_maxspeed = (EditText) frag.findViewById(R.id.et_editLok_maxspeed); btn_editLok_save.setOnClickListener(new MyActivity()); btn_editLok_delete.setOnClickListener(new MyActivity()); return frag; } @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); } }