@Override public View onCreateView( LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { super.onCreate(savedInstanceState); View view = inflater.inflate(R.layout.customer_gotcalling, null); context = view.getContext(); for (String s : getArguments().getStringArray("rideid")) Taxi_System.testLog(s); if (savedInstanceState == null) {} Taxi_System.setContent((LinearLayout) view.findViewById(R.id.header), context, 1, (float) 0.07); Taxi_System.applyFonts(view, Taxi_System.faceType_normal(getActivity())); LinearLayout thirdsection = (LinearLayout) view.findViewById(R.id.thirdsection); Taxi_System.setContent(thirdsection, context, (float) 0.125, (float) 0.07); ImageView thirdimg = (ImageView) view.findViewById(R.id.thirdimg); Taxi_System.setContent(thirdimg, context, (float) 0.06, (float) 0.04); LinearLayout logosection = (LinearLayout) view.findViewById(R.id.logosection); Taxi_System.setContent(logosection, context, (float) 0.25, (float) 0.07); ImageView logo = (ImageView) view.findViewById(R.id.logo); // Taxi_System.setContent(logo, context, Float.parseFloat((String) // getResources().getText(R.string.logosize_w)), Float.parseFloat((String) // getResources().getText(R.string.logosize))); Taxi_System.setContentLogo(logo, context, (float) 0.25, (float) 0.07); ((TextView) view.findViewById(R.id.in)).setTypeface(null, Typeface.BOLD); LinearLayout border = (LinearLayout) view.findViewById(R.id.border); Taxi_System.setContent(border, context, (float) 0.5, (float) 0.05); ((Button) view.findViewById(R.id.icall)).setOnClickListener(this); ((Button) view.findViewById(R.id.icall)).getLayoutParams().width = (int) (Taxi_System.getHeight(context) * 0.1); ((Button) view.findViewById(R.id.icall)).getLayoutParams().height = (int) (Taxi_System.getHeight(context) * 0.1); ((Button) view.findViewById(R.id.in)).setOnClickListener(this); ((TextView) view.findViewById(R.id.drivername)) .setText(getArguments().getStringArray("rideid")[0]); ((TextView) view.findViewById(R.id.company)) .setText(getArguments().getStringArray("rideid")[1]); ((TextView) view.findViewById(R.id.model)).setText(getArguments().getStringArray("rideid")[2]); Taxi_System.testLog(getArguments().getStringArray("rideid")[5]); view.setFocusableInTouchMode(true); view.requestFocus(); view.setOnKeyListener( new View.OnKeyListener() { @Override public boolean onKey(View v, int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { if (((Customer_Fragment_Activity) getActivity()).isMenu) { ((Customer_Fragment_Activity) getActivity()).didHideMenu(); return true; } getCurrentRide(); return true; } else { return false; } } }); return view; }