Ejemplo n.º 1
0
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    if (ZooGate.sp == null)
      ZooGate.sp = PreferenceManager.getDefaultSharedPreferences(getActivity());

    View rootView = inflater.inflate(R.layout.fragment_zoo_gate, container, false);
    TextView textView = (TextView) rootView.findViewById(R.id.current_release);
    textView.setText(ZooGate.releaseName);
    ((TextView) rootView.findViewById(R.id.rom_title)).append(" " + Build.VERSION.RELEASE);
    ((TextView) rootView.findViewById(R.id.OS_release))
        .setText(ZooGate.readShellCommand("getprop ro.modversion"));
    ((TextView) rootView.findViewById(R.id.device_string))
        .setText(
            Build.MANUFACTURER
                + " "
                + Build.DEVICE
                + " ("
                + Build.HARDWARE
                + "/"
                + Build.BOARD
                + ")");
    ((TextView) rootView.findViewById(R.id.OS_display)).setText(Build.DISPLAY + " " + Build.ID);
    ((TextView) rootView.findViewById(R.id.OS_fingerprint)).setText(Build.FINGERPRINT);
    ((TextView) rootView.findViewById(R.id.OS_Kernel)).setText(System.getProperty("os.version"));
    ((TextView) rootView.findViewById(R.id.OS_serial)).setText(Build.SERIAL);
    ((TextView) rootView.findViewById(R.id.OS_radio)).setText(Build.getRadioVersion());
    return rootView;
  }
Ejemplo n.º 2
0
 @Override
 public void onAttach(Activity activity) {
   ZooGate.myActivity = activity;
   super.onAttach(activity);
   ((ZooGate) activity).onSectionAttached(getArguments().getInt(ZooGate.ARG_SECTION_NUMBER));
 }