List of usage examples for android.view InflateException printStackTrace
public void printStackTrace()
From source file:edu.nd.darts.cimon.NDroidAdmin.java
@Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); try {/*from w ww .j ava2 s . c o m*/ inflater.inflate(R.menu.options_menu, menu); } catch (InflateException e) { e.printStackTrace(); return false; } MenuItem item = menu.findItem(R.id.startup); if (item != null) { SharedPreferences appPrefs = getSharedPreferences(SHARED_PREFS, Context.MODE_PRIVATE); boolean startup = appPrefs.getBoolean(PREF_STARTUP, true); item.setChecked(startup); } return true; }
From source file:com.dzt.uberclone.HomeFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { if (v != null) { ViewGroup parent = (ViewGroup) v.getParent(); if (parent != null) parent.removeView(v);/*from w w w . j av a 2s. com*/ } try { v = inflater.inflate(R.layout.fragment_home, container, false); } catch (InflateException e) { e.printStackTrace(); } map = ((SupportMapFragment) getChildFragmentManager().findFragmentById(R.id.map)).getMap(); map.setMyLocationEnabled(true); map.setMapType(GoogleMap.MAP_TYPE_NORMAL); map.setOnMapClickListener(this); map.setOnMarkerDragListener(this); requestuber = (Button) v.findViewById(R.id.request_uber); requestuber.setOnClickListener(this); statusText = (TextView) v.findViewById(R.id.status_text); statusText.setVisibility(View.INVISIBLE); SharedPreferences sp = getActivity().getSharedPreferences("Session", Context.MODE_PRIVATE); SharedPreferences.Editor editor; editor = sp.edit(); String location = sp.getString("location", ""); mGoogleApiClient = new GoogleApiClient.Builder(getActivity()).addConnectionCallbacks(this) .addOnConnectionFailedListener(this).addApi(LocationServices.API).build(); selectPickup = (TextView) v.findViewById(R.id.select_location); selectPickup.setOnClickListener(this); if (location.equals("")) { selectPickup.setText("Select pick up location"); } else { String latstr = sp.getString("locationlat", ""); String longstr = sp.getString("locationlong", ""); latitude = Double.parseDouble(latstr); longitude = Double.parseDouble(longstr); selectPickup.setText(location); editor.putString("location", ""); editor.putString("locationlat", ""); editor.putString("locationlong", ""); editor.commit(); centerOnCurrent = false; } mGoogleApiClient.connect(); return v; }
From source file:fr.cobaltians.cobalt.fragments.CobaltFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { super.onCreateView(inflater, container, savedInstanceState); try {// w w w. j a v a 2 s. c om View view = inflater.inflate(getLayoutToInflate(), container, false); setUpViews(view); setUpListeners(); return view; } catch (InflateException e) { if (Cobalt.DEBUG) Log.e(Cobalt.TAG, TAG + " - onCreateView: InflateException"); e.printStackTrace(); } return null; }
From source file:com.alivenet.dmvtaxi.fragment.FragmentArriveDriver.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { if (view != null) { ViewGroup parent = (ViewGroup) view.getParent(); if (parent != null) parent.removeView(view);/*from ww w . j av a 2 s. c o m*/ } try { view = inflater.inflate(R.layout.fragment_time_estemet, container, false); } catch (InflateException e) { } if (android.os.Build.VERSION.SDK_INT > 9) { StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build(); StrictMode.setThreadPolicy(policy); } mPref = getActivity().getSharedPreferences(MYPREF, Context.MODE_PRIVATE); mUserId = mPref.getString("userId", null); gps = new GPSTracker(getActivity()); MyApplication.arrivedrivermarker = true; progressDialog = new ProgressDialog(getActivity()); progressDialog.setMessage("Please wait..."); progressDialog.setCancelable(false); mlinerlayoutbottom = (LinearLayout) view.findViewById(R.id.ll_bottom); mphone = (ImageView) view.findViewById(R.id.iv_phone); mphonenumber = (TextView) view.findViewById(R.id.tv_phonenumber); marrivaltime = (TextView) view.findViewById(R.id.tv_textarrival); mname = (TextView) view.findViewById(R.id.tv_name); mlicence = (TextView) view.findViewById(R.id.tv_licence); mtaximodel = (TextView) view.findViewById(R.id.tv_model); muserImage = (ImageView) view.findViewById(R.id.imageView_close); getLatLong(); btnSplite = (Button) view.findViewById(R.id.btn_splite_rides); btnSplite.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent in = new Intent(getActivity(), SplitAddFrnd.class); startActivity(in); } }); mphone.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String uri = "tel:" + mphonenumber.getText().toString().trim(); Intent intent = new Intent(Intent.ACTION_CALL); intent.setData(Uri.parse(uri)); startActivity(intent); } }); System.out.println("userId>>>>>>>>>>>>>>>>>>>>>" + mUserId); mname.setText(MyApplication.driverName); mlicence.setText(MyApplication.licenseId); mtaximodel.setText(MyApplication.vehicle); mphonenumber.setText(MyApplication.mobileNO); Picasso.with(getActivity()).load(MyApplication.imageUrl).error(R.mipmap.avtar).placeholder(R.mipmap.avtar) .into(muserImage); System.out.println("driverImageurl" + "chceck=" + MyApplication.imageUrl); mphonenumber.setText("Call To" + " " + MyApplication.driverName); final SinchClient sinchClient = Sinch.getSinchClientBuilder().context(getActivity()).userId(mUserId) .applicationKey("3b013f09-db1f-422e-ac7b-c6498e119612") .applicationSecret("LMhelEFYtUqms55VX1C7MQ==").environmentHost("sandbox.sinch.com").build(); sinchClient.setSupportCalling(true); sinchClient.start(); mphone.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if (call == null) { if (MyApplication.mobileNO != null && !MyApplication.mobileNO.equals("")) { call = sinchClient.getCallClient().callPhoneNumber("+" + MyApplication.mobileNO); System.out.println("mobile_number" + MyApplication.mobileNO); //call = sinchClient.getCallClient().callPhoneNumber("+918510834641"); try { call.addCallListener(new SinchCallListener()); } catch (Exception e) { e.printStackTrace(); } mphonenumber.setText("Hang Up"); } } else { call.hangup(); } } }); view.setFocusableInTouchMode(true); view.requestFocus(); view.setOnKeyListener(new View.OnKeyListener() { @Override public boolean onKey(View v, int keyCode, KeyEvent event) { if (event.getAction() == KeyEvent.ACTION_UP && keyCode == KeyEvent.KEYCODE_BACK) { // handle back button's click listener if (keyCode == KeyEvent.KEYCODE_BACK) { Fragment homeFragment = new FragmentMainScreen(); FragmentManager frgManager; frgManager = getFragmentManager(); frgManager.beginTransaction().replace(R.id.fragment_switch, homeFragment).commit(); return true; } return true; } return false; } }); return view; }