@Override
  @SuppressWarnings("unchecked")
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    LogUtils.logd(TAG, "[onActivityCreated]");

    mSession = JRSession.getInstance();

    if (savedInstanceState != null) {
      mManagedDialogs = (HashMap) savedInstanceState.get(KEY_MANAGED_DIALOGS);
      Parcelable[] p = savedInstanceState.getParcelableArray(KEY_MANAGED_DIALOG_OPTIONS);
      if (mManagedDialogs != null && p != null) {
        for (Parcelable p_ : p) {
          Bundle b = (Bundle) p_;
          mManagedDialogs.get(b.getInt(KEY_DIALOG_ID)).mOptions = b;
        }
      } else {
        mManagedDialogs = new HashMap<Integer, ManagedDialog>();
      }
    }

    for (ManagedDialog d : mManagedDialogs.values()) {
      d.mDialog = onCreateDialog(d.mId, d.mOptions);
      if (d.mShowing) d.mDialog.show();
    }
  }
  @Override
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    ((TextView) getView().findViewById(R.id.txtcriterio)).setText(busqueda);
    ((TextView) getView().findViewById(R.id.txtcriterio))
        .setTypeface(Util_Fonts.setPNASemiBold(getActivity()));

    linearLayout = (LinearLayout) getView().findViewById(R.id.container_locales);

    for (int i = 0; i < local_dtos.size(); i++) {
      Local_DTO local_dto = local_dtos.get(i);
      View_Local view_local = new View_Local(getActivity(), local_dto);
      view_local.setTag(local_dto);
      linearLayout.addView(view_local);
    }

    /*
    Button Cerrar
     */
    getView()
        .findViewById(R.id.acb_img_cerrar)
        .setOnClickListener(
            new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                FragmentManager manager = ((Maven) getActivity()).getSupportFragmentManager();
                FragmentTransaction trans = manager.beginTransaction();
                trans.remove(Fragment_Resultado_Busquedas.this);
                trans.commit();
                manager.popBackStack();
              }
            });
    ((TextView) getView().findViewById(R.id.txtbusqueda))
        .setTypeface(Util_Fonts.setPNASemiBold(getActivity()));
  }
  @Override
  public void onActivityCreated(Bundle savedInstanceState) {

    super.onActivityCreated(savedInstanceState);

    if (this.amministrazione.getCecpac() == null || this.amministrazione.getCecpac().size() == 0) {
      System.out.println("CECPAC == 0");
    } else {
      System.out.println("CECPAC == " + this.amministrazione.getCecpac().size());
    }

    if (this.amministrazione.getEmail() == null || this.amministrazione.getEmail().size() == 0) {
      System.out.println("EMAIL == 0");
    } else {
      System.out.println("Email == " + this.amministrazione.getEmail().size());
    }

    if (this.amministrazione.getPec() == null || this.amministrazione.getPec().size() == 0) {
      System.out.println("PEC == 0");
    } else {
      System.out.println("PEC == " + this.amministrazione.getPec().size());
    }

    EmailExpandAdapter emailAdapter = new EmailExpandAdapter(getActivity(), "email");
    emailAdapter.setEmails(this.amministrazione.getEmail());

    if (emailAdapter.getChildrenCount(0) == 0) {
      listEmail.setVisibility(View.GONE);
    } else {
      listEmail.setVisibility(View.VISIBLE);
      listEmail.setAdapter(emailAdapter);
    }

    EmailExpandAdapter cepacAdapter = new EmailExpandAdapter(getActivity(), "CeCPac");
    cepacAdapter.setEmails(this.amministrazione.getCecpac());

    if (emailAdapter.getChildrenCount(0) == 0) {
      listCecpac.setVisibility(View.GONE);
    } else {
      listCecpac.setVisibility(View.VISIBLE);
      listCecpac.setAdapter(cepacAdapter);
    }

    EmailExpandAdapter pecAdapter = new EmailExpandAdapter(getActivity(), "Pec");
    pecAdapter.setEmails(this.amministrazione.getPec());

    if (emailAdapter.getChildrenCount(0) == 0) {
      listPec.setVisibility(View.GONE);
    } else {
      listPec.setVisibility(View.VISIBLE);
      listPec.setAdapter(pecAdapter);
    }

    addContactButton.setOnClickListener(
        new View.OnClickListener() {

          @Override
          public void onClick(View v) {}
        });
  }
 @Override
 public void onActivityCreated(Bundle savedInstanceState) {
   if (BuildConfig.DEBUG) {
     Log.i(TAG, "onActivityCreated");
   }
   super.onActivityCreated(savedInstanceState);
 }
  @Override
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    // получаем плавающую кнопку из активити
    FloatingActionButton fab = ButterKnife.findById(getActivity(), R.id.fab);
    // получаем параметры Layout fab приведенные к родителю
    CoordinatorLayout.LayoutParams params = (CoordinatorLayout.LayoutParams) fab.getLayoutParams();
    // выставляем привязку якоря к appBarLayout
    params.setAnchorId(R.id.appbar_layout);
    // выставляем anchorGravity
    params.anchorGravity = Gravity.BOTTOM | Gravity.RIGHT;
    fab.setLayoutParams(params);
    // меняем иконку плавающей кнопки
    fab.setImageResource(R.drawable.ic_mode_edit_24dp);
    /*        fab.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) { //создаем и вешаем новый обработчик на fab
            //выбираем действие для fab в зависимости от текущего режима
            if (sCurrentFunctionality.equals(FUNCTIONALITY_PROFILE_VIEW)) {
                setupFuncionality(FUNCTIONALITY_PROFILE_EDIT);
            } else {
                setupFuncionality(FUNCTIONALITY_PROFILE_VIEW);
            }
        }
    });*/
  }
Beispiel #6
0
  @SuppressLint("ResourceAsColor")
  @Override
  public void onActivityCreated(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onActivityCreated(savedInstanceState);
    senceBean = new ArrayList<String>();
    senceBean_small = new ArrayList<String>();
    for (int i = 0; i < 10; i++) {
      senceBean.add(i, "分类" + i);
    }
    bigType = (ListView) getView().findViewById(R.id.bigType);
    smallType = (ListView) getView().findViewById(R.id.smallType);
    bigType_zz = (ListView) getView().findViewById(R.id.bigType_zz);
    smallType_zz = (ListView) getView().findViewById(R.id.smallType_zz);
    type_xt = (Button) getView().findViewById(R.id.type_xt);
    type_zz = (Button) getView().findViewById(R.id.type_zz);
    list_isShow = (LinearLayout) getView().findViewById(R.id.list_isShow);
    list_ishow = (LinearLayout) getView().findViewById(R.id.list_ishow);
    end = (TextView) getView().findViewById(R.id.end);
    type_xt.setOnClickListener(listener);
    type_zz.setOnClickListener(listener);

    list_isShow.setVisibility(View.VISIBLE);
    type_xt.setTextColor(R.color.white_blue);
    type_zz.setTextColor(R.color.gray1);

    // 访问网络
    getSense();
  }
Beispiel #7
0
  @Override
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    if (savedInstanceState != null) {
      DataSource ds = new DataSource(getActivity());
      try {
        ds.open();
      } catch (SQLException e) {
        e.printStackTrace();
      }
      // activeRound = savedInstanceState.getInt("activeRound");
      long tournamentId = savedInstanceState.getLong("tournamentId");
      Log.d("ScoresFragment", "onActivityCreated " + tournamentId + "");
      if (tournamentId != TEMP_ID) {

        Loader loader = new Loader(getActivity().getApplicationContext());
        this.tournament = loader.getTournamentAndRounds(tournamentId);

        if (tournament.getRounds().length > 0) {
          createMatchTable(1);
          roundTextView.setText("Round: " + 1);

        } else {
          Log.d("ScoresFragment", "getRounds = 0");
        }
      } else {
        Log.d("ScoresFragment", "temp id");
      }
    }
  }
  @Override
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    viewPager = (ViewPager) getActivity().findViewById(R.id.pager);
    actionBar = getActivity().getActionBar();
    mAdapter = new Course1Adapter(getActivity().getSupportFragmentManager());
    viewPager.setAdapter(mAdapter);
    actionBar.setHomeButtonEnabled(true);
    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);

    // Add the tabs here
    for (String tab_name : tabs) {
      actionBar.addTab(actionBar.newTab().setText(tab_name).setTabListener(this));
    }

    viewPager.setOnPageChangeListener(
        new ViewPager.SimpleOnPageChangeListener() {

          @Override
          public void onPageSelected(int position) {

            // on Page change, that particular page should be selected
            actionBar.setSelectedNavigationItem(position);
          }

          @Override
          public void onPageScrolled(int arg0, float arg1, int arg2) {}

          @Override
          public void onPageScrollStateChanged(int position) {}
        });
  }
  @Override
  public void onActivityCreated(final Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    viewpagerHolder = getActivity().findViewById(R.id.viewpager_holder);
    fragmentHolder = getActivity().findViewById(R.id.frame_for_fragment);

    pager = (ViewPager) viewpagerHolder.findViewById(R.id.pager);

    if (pager.getAdapter() == null) {
      fragmentAdapter = new MovieFragmentAdapter(getSupportFragmentManager(), 0);

      pager.setAdapter(fragmentAdapter);

      indicator = (TitlePageIndicator) viewpagerHolder.findViewById(R.id.indicator);
      indicator.setViewPager(pager);

      decoreIndicator();

      setIndicatorListener();
    }

    fragmentHolder.setVisibility(View.GONE);
    viewpagerHolder.setVisibility(View.VISIBLE);
  }
 @Override
 public void onActivityCreated(Bundle savedInstanceState) {
   super.onActivityCreated(savedInstanceState);
   if (parent instanceof RefreshableHostActivity) {
     ((RefreshableHostActivity) parent).startRefresh(this);
   }
 }
  @Override
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    if (savedInstanceState == null) {
      getFragmentManager()
          .beginTransaction()
          .add(R.id.container_fragment, new PremiosFragment())
          .commit();
    }
    ranking_general = (TextView) getActivity().findViewById(R.id.ranking_general);
    ranking_general_icon = (ImageButton) getActivity().findViewById(R.id.ranking_general_icon);

    ranking_general.setOnClickListener(
        new View.OnClickListener() {
          public void onClick(View v) {
            Intent myIntent = new Intent(getActivity(), RankingGeneralActivity.class);
            ResultadosActivity.this.startActivity(myIntent);
          }
        });
    ranking_general_icon.setOnClickListener(
        new View.OnClickListener() {
          public void onClick(View v) {
            Intent myIntent = new Intent(getActivity(), RankingGeneralActivity.class);
            ResultadosActivity.this.startActivity(myIntent);
          }
        });
  }
 @Override
 public void onActivityCreated(@Nullable Bundle savedInstanceState) {
   super.onActivityCreated(savedInstanceState);
   getActivity().setTitle(getString(R.string.pref_locking_type_knockcode));
   //noinspection ConstantConditions
   ((AppCompatActivity) getActivity()).getSupportActionBar().setDisplayHomeAsUpEnabled(true);
 }
  @Override
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    mRecyclerView.addOnScrollListener(
        new RecyclerView.OnScrollListener() {
          @Override
          public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
            super.onScrolled(recyclerView, dx, dy);

            // if on top - start swipe to refresh pattern
            boolean enable = false;
            if (mRecyclerView != null && mRecyclerView.getChildCount() > 0) {
              int topPosition = mRecyclerView.getChildAt(0).getTop();
              enable = topPosition >= 0;
            }
            mSwipeRefreshLayout.setEnabled(enable);
          }

          @Override
          public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
            super.onScrollStateChanged(recyclerView, newState);
          }
        });

    // update adapter's data
    refreshAdapter();
  }
 @Override
 public void onActivityCreated(Bundle savedInstanceState) {
   super.onActivityCreated(savedInstanceState);
   // 设置该fragment拥有自己的actionbar action item
   setHasOptionsMenu(true);
   dbUtil = new DBUtil();
 }
Beispiel #15
0
  @Override
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    ExpandableListView listView = (ExpandableListView) getView().findViewById(R.id.lstSyncs);
    adapter = new SyncsAdapter(getActivity(), authUser.getSyncs(), authUser);
    changeWeek();
    listView.setAdapter(adapter);

    getView()
        .findViewById(R.id.btnNextWeek)
        .setOnClickListener(
            new OnClickListener() {
              @Override
              public void onClick(View v) {
                week++;
                changeWeek();
              }
            });

    getView()
        .findViewById(R.id.btnPrevWeek)
        .setOnClickListener(
            new OnClickListener() {
              @Override
              public void onClick(View v) {
                week--;
                changeWeek();
              }
            });
  }
  @Override
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    resources = getResources();

    MainActivity parent = (MainActivity) getActivity();
    parent.imageLoader.DisplayImage(
        parent.sp.getFromPreferences("avatar"), R.drawable.profile_avatar, avatar);
    fullName.setText(
        parent.sp.getFromPreferences("name") + " " + parent.sp.getFromPreferences("family"));
    userCode.setText(getString(R.string.your_code) + parent.sp.getFromPreferences("id"));

    mainMenuItem =
        addMenuItem(
            getString(R.string.dashboard),
            R.mipmap.ic_home,
            R.mipmap.ic_home_red,
            R.string.dashboard);
    addMenuItem(
        getString(R.string.profile),
        R.mipmap.ic_medical_file,
        R.mipmap.ic_medical_file_red,
        R.string.profile);
    addMenuItem(getString(R.string.exit), R.mipmap.ic_off, R.mipmap.ic_off_red, R.string.exit);

    selectMainItem();

    checkOrientation();
  }
  @SuppressWarnings("unchecked")
  @Override
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    mainActivity = getActivity().getClass().equals(MainActivity.class);

    userTeam = DBAdapter.getInstance(getActivity()).readUserTeam();

    if (userTeam == null) {
      if (!mainActivity) {
        getActivity().finish();
      }
      return;
    }

    if (savedInstanceState != null) {
      league = (List<LeagueTeam>) savedInstanceState.getSerializable(LEAGUE_STATE);
    }

    if (league == null) {
      reloadFragment(mainActivity);
    } else {
      populateView();
    }
  }
Beispiel #18
0
  @Override
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    initData();
    bindEvent();
  }
 public void onActivityCreated(Bundle bundle) {
   if (bundle != null) {
     bundle.setClassLoader(
         com / google / android / gms / maps / SupportStreetViewPanoramaFragment.getClassLoader());
   }
   super.onActivityCreated(bundle);
 }
 @Override
 public void onActivityCreated(Bundle savedInstanceState) {
   super.onActivityCreated(savedInstanceState);
   if (savedInstanceState != null) {
     mCurCheckPosition = savedInstanceState.getInt("curChoice", 0);
   }
 }
Beispiel #21
0
  @Override
  public void onActivityCreated(@Nullable Bundle savedInstanceState) {
    Log.i("TAG", "onActivityCreated");
    super.onActivityCreated(savedInstanceState);

    btn_steps = new Button[4];
    btn_steps[0] = (Button) getActivity().findViewById(R.id.step0);
    btn_steps[1] = (Button) getActivity().findViewById(R.id.step1);
    btn_steps[2] = (Button) getActivity().findViewById(R.id.step2);
    btn_steps[3] = (Button) getActivity().findViewById(R.id.step3);

    mMapManeger = new MapManager();

    mapLayout = new MapLayout(getActivity());
    mMapView = mapLayout.getMapView();
    mMapView.setDaumMapApiKey("c7e2c768ceb283cba77acced06e1203b");
    mMapView.setMapViewEventListener(this);
    mMapView.setPOIItemEventListener(this);
    mMapView.setMapType(MapView.MapType.Standard);
    ViewGroup mapViewContainer = (ViewGroup) getActivity().findViewById(R.id.map_view);
    mapViewContainer.addView(mapLayout);

    SharedPreferences sharedPreferences =
        getActivity().getSharedPreferences("GnBang", getContext().MODE_PRIVATE);
    CurrentZoomLevel = sharedPreferences.getInt("Zoomlevel", DEFAULT_ZOOM_LEVEL);
    CurrentLat = sharedPreferences.getFloat("Lat", (float) DEFAULT_LAT);
    CurrentLon = sharedPreferences.getFloat("Lon", (float) DEFAULT_LON);
    CurrentSelect = sharedPreferences.getInt("Select", DEFAULT_SELECT);
    mMapView.setMapCenterPointAndZoomLevel(
        MapPoint.mapPointWithGeoCoord(CurrentLat, CurrentLon), CurrentZoomLevel, true);

    mMapView = mMapManeger.CreateMarker(mMapView, CurrentZoomLevel);
    btn_steps = mMapManeger.SelectCity(CurrentSelect, btn_steps);
  }
Beispiel #22
0
 @Override
 public void onActivityCreated(@Nullable Bundle savedInstanceState) {
   setHasOptionsMenu(true);
   lblTexto = (TextView) getActivity().findViewById(R.id.lblTexto);
   lblTexto.setText(getArguments().getString(ARG_TEXTO));
   super.onActivityCreated(savedInstanceState);
 }
 @Override
 public void onActivityCreated(@Nullable Bundle savedInstanceState) {
   super.onActivityCreated(savedInstanceState);
   initViews();
   addListeners();
   initDatas();
 }
Beispiel #24
0
  @Override
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    // Loader初期化
    getLoaderManager().initLoader(DETAIL_LOADER, null, this);
  }
 @Override
 public void onActivityCreated(Bundle savedInstanceState) {
   super.onActivityCreated(savedInstanceState);
   // Indicate that this fragment would like to influence the set of
   // actions in the action bar.
   setHasOptionsMenu(true);
 }
  @Override
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    // set displayed values
    if (getArguments() != null) {
      if (getArguments().containsKey(ARG_QUERY)) {
        String query = getArguments().getString(ARG_QUERY);
        mQueryEditText.setText(query, TextView.BufferType.EDITABLE);

        Log.d(Constants.TAG, "query: " + query);
      }

      if (getArguments().containsKey(ARG_KEYSERVER)) {
        String keyserver = getArguments().getString(ARG_KEYSERVER);
        int keyserverPos = mServerAdapter.getPosition(keyserver);
        mServerSpinner.setSelection(keyserverPos);

        Log.d(Constants.TAG, "keyserver: " + keyserver);
      }

      if (getArguments().getBoolean(ARG_DISABLE_QUERY_EDIT, false)) {
        mQueryEditText.setEnabled(false);
      }
    }
  }
 @Override
 public void onActivityCreated(Bundle savedInstanceState) {
   super.onActivityCreated(savedInstanceState);
   Log.i("WebViewFragment", "onActivityCreated() thread.id= " + Thread.currentThread().getId());
   loadPage(
       getArguments().getString(KEY_URL), getArguments().getByteArray(KEY_POST_DATA), webView);
 }
  @Override
  public void onActivityCreated(@Nullable Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    mManager = new LinearLayoutManager(getActivity());
    mRecyclerView.setLayoutManager(mManager);

    Query siteQuery = mDatabase.child(Firebase.NODE_SITES).child(mUserId);

    mAdapter =
        new FirebaseRecyclerAdapter<Site, SiteViewHolder>(
            Site.class, R.layout.site_item, SiteViewHolder.class, siteQuery) {
          @Override
          protected void populateViewHolder(
              SiteViewHolder viewHolder, final Site model, int position) {
            final DatabaseReference ref = getRef(position);

            viewHolder.bindToPost(model);

            // Item click listener
            final String siteKey = ref.getKey();
            viewHolder.itemView.setOnClickListener(
                new View.OnClickListener() {
                  @Override
                  public void onClick(View view) {
                    mListener.onSiteSelected(siteKey);
                  }
                });
          }
        };

    mRecyclerView.setAdapter(mAdapter);
  }
Beispiel #29
0
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    Intent intentr = getActivity().getIntent();
    userid = intentr.getIntExtra("cwp.id", 100000001);

    initView();
    initData();

    switch (value) {
      case 0:
        clickFriendfeedBtn();
        break;
      case 1:
        clickFriendfeedBtn();
        break;
      case 2:
        clickMyfeedBtn();
        break;
      case 3:
        clickHomeBtn();
        break;
      case 4:
        clickMoreBtn();
        break;
    }
  }
  @Override
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    if (this.assetClass == null) {
      this.assetClass = AssetClass.create("");
    }

    View view = getView();
    initializeParentEdit(view);
    initializeNameEdit(view);
    initializeAllocationPicker(view);
    // todo: show sort order value

    //        initializeFloatingActionButton(view);

    //        mAdapter = createAdapter();
    //        ListView listView = initializeListView(mAdapter);

    //        registerForContextMenu(listView);

    // setListShown(false);
    //        Integer id = this.assetClass.getId();
    //        if (id != null) {
    //            loadData();
    //        }
  }