这是我的片段类:
public class PrayerTimes extends Fragment {
EditText Lat;
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
// Inflate the layout for this fragment
InflaterView = inflater.inflate(R.layout.activity_prayer_times, container, false);
Lat = (EditText) InflaterView.findViewById(R.id.LatitudeEdit);
Lat.addTextChangedListener(new TextWatcher()
{
public void onTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) {
// TODO Auto-generated method stub
}
public void beforeTextChanged(CharSequence arg0, int arg1, int arg2,int arg3) {
// TODO Auto-generated method stub
}
public void afterTextChanged(Editable arg0) {
// TODO Auto-generated method stub
}
});
return InflaterView;
}
当 Fragment 加载,并且选择了 EDitText (Lat) (Get Focused) 时,不显示 KeyBoard。如何显示键盘?