@Override
 public View onCreateView(
     LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
   super.onCreateView(inflater, container, savedInstanceState);
   View thirdView = inflater.inflate(R.layout.layout_fragment_third, container, false);
   return thirdView;
 }
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    super.onCreateView(inflater, container, savedInstanceState);

    tablConent = (View) inflater.inflate(R.layout.tabcontent, null);

    mShadeleft = (ImageView) tablConent.findViewById(R.id.shade_left);
    mShaderight = (ImageView) tablConent.findViewById(R.id.shade_right);

    mColumnHorizontalScrollView =
        (ColumnHorizontalScrollView) tablConent.findViewById(R.id.mColumnHorizontalScrollView);
    mRadioGroup_content = (LinearLayout) tablConent.findViewById(R.id.mRadioGroup_content);
    ll_more_columns = (LinearLayout) tablConent.findViewById(R.id.ll_more_columns);
    rl_column = (RelativeLayout) tablConent.findViewById(R.id.rl_column);
    button_more_columns = (ImageView) tablConent.findViewById(R.id.button_more_columns);

    button_more_columns.setOnClickListener(
        new View.OnClickListener() {

          @Override
          public void onClick(View v) {
            MainActivity mainActivity = (MainActivity) getActivity();
            mainActivity.showMoreColumn();
          }
        });

    mViewPager = (ViewPager) tablConent.findViewById(R.id.mTableContentViewPager);

    return tablConent;
  }
示例#3
0
 public View onCreateView(
     LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
   super.onCreateView(inflater, container, savedInstanceState);
   View v = inflater.inflate(R.layout.fragment4_layout, container, false);
   v.setBackgroundColor(00000000);
   return v;
 }
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    super.onCreateView(inflater, container, savedInstanceState);

    return inflater.inflate(R.layout.news_list_fragment, null);
  }
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    super.onCreateView(inflater, container, savedInstanceState);

    View root = inflater.inflate(R.layout.fragment_map, container, false);
    mMessageView = (TextView) root.findViewById(R.id.message_text);
    button = (Button) root.findViewById(R.id.get_my_location_button);
    button.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View view) {
            showMyLocation(view);
          }
        });

    SupportMapFragment mapFragment =
        (SupportMapFragment) getChildFragmentManager().findFragmentById(R.id.map);
    mapFragment.getMapAsync(this);

    mGoogleApiClient =
        new GoogleApiClient.Builder(this.getActivity())
            .addApi(LocationServices.API)
            .addConnectionCallbacks(this)
            .addOnConnectionFailedListener(this)
            .build();
    return root;
  }
示例#6
0
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

    super.onCreateView(inflater, container, savedInstanceState);
    return inflater.inflate(R.layout.listview_checklists, container, false);
  }
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    super.onCreateView(inflater, container, savedInstanceState);
    final MoPubSampleAdUnit adConfiguration = MoPubSampleAdUnit.fromBundle(getArguments());
    final View view = inflater.inflate(R.layout.banner_detail_fragment, container, false);
    final DetailFragmentViewHolder views = DetailFragmentViewHolder.fromView(view);
    mMoPubView = (MoPubView) view.findViewById(R.id.banner_mopubview);
    hideSoftKeyboard(views.mKeywordsField);

    final String adUnitId = adConfiguration.getAdUnitId();
    views.mDescriptionView.setText(adConfiguration.getDescription());
    views.mAdUnitIdView.setText(adUnitId);
    views.mLoadButton.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View view) {
            final String keywords = views.mKeywordsField.getText().toString();
            loadMoPubView(adUnitId, keywords);
          }
        });
    mMoPubView.setBannerAdListener(this);
    loadMoPubView(adUnitId, null);

    return view;
  }
示例#8
0
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    super.onCreateView(inflater, container, savedInstanceState);

    v = inflater.inflate(R.layout.fragment_yes_no, container, false);
    final MainActivityPhone activityPhone = (MainActivityPhone) getActivity();

    Button btnYes = (Button) v.findViewById(R.id.buttonYes);
    btnYes.setOnClickListener(
        new OnClickListener() {

          @Override
          public void onClick(View v) {
            net.patchingzone.ru4real.fragments.Utils.vibrate(getActivity(), 200);
            // activityPhone.network.sendAnswer(true);
          }
        });

    Button btnNo = (Button) v.findViewById(R.id.buttonNo);
    btnNo.setOnClickListener(
        new OnClickListener() {

          @Override
          public void onClick(View v) {
            net.patchingzone.ru4real.fragments.Utils.vibrate(getActivity(), 200);
            // activityPhone.network.sendAnswer(false);
          }
        });

    return v;
  }
示例#9
0
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    super.onCreateView(inflater, container, savedInstanceState);
    View view = inflater.inflate(R.layout.flag_quiz_frag, container, false);

    fileNameList = new ArrayList<String>();
    flagflagList = new ArrayList<String>();
    random = new SecureRandom();

    // shakeAnimation.setRepeatCount(3);

    questionNumberTV = (TextView) view.findViewById(R.id.flagQuestionNumberTV);
    flagView = (ImageView) view.findViewById(R.id.flagImageView);
    guessLinearLayouts = new LinearLayout[2];
    guessLinearLayouts[0] = (LinearLayout) view.findViewById(R.id.flagRow1);
    guessLinearLayouts[1] = (LinearLayout) view.findViewById(R.id.flagRow2);
    answerTextView = (TextView) view.findViewById(R.id.flagAnswer);
    scoreTextView = (TextView) view.findViewById(R.id.flagScoreTextView);

    for (LinearLayout row : guessLinearLayouts) {
      for (int column = 0; column < row.getChildCount(); column++) {
        Button button = (Button) row.getChildAt(column);
        button.setOnClickListener(guessButtonListener);
      }
    }

    questionNumberTV.setText(
        getResources().getString(R.string.questionNumberTV, 1, NUMBER_OF_QUESTIONS));
    scoreTextView.setText(Integer.toString(questionScore));

    scoreHandler.postDelayed(scoreRunnable, 1000);

    return view;
  }
 /**
  * {@inheritDoc} Sets up the ListView and ListAdapter. Sets up the item onClick listener to
  * replace this fragment with the LoginAttemptFragment. Also sets up the register button listener.
  */
 @Nullable
 @Override
 public View onCreateView(
     LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
   super.onCreateView(inflater, container, savedInstanceState);
   // get a list of all usernames
   UsersDB db = new UsersDB(getActivity());
   final List<String> users = db.getAllUsernames();
   db.closeDB();
   // initialize the View
   View v = inflater.inflate(R.layout.fragment_login_user_list, container, false);
   // set up the ListView adapter
   ListView userList = (ListView) v.findViewById(R.id.login_listView_usersFragment);
   ArrayAdapter<String> adapter =
       new ArrayAdapter<String>(
           v.getContext(), android.R.layout.simple_list_item_1, android.R.id.text1, users);
   userList.setAdapter(adapter);
   // set up the on item click listener
   userList.setOnItemClickListener(
       new AdapterView.OnItemClickListener() {
         /**
          * {@inheritDoc} Goes to the LoginUserAttempt fragment, giving the selected username as an
          * argument.
          */
         @Override
         public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
           // set up fragment
           LoginAttemptFragment frag = new LoginAttemptFragment();
           // give username as argument
           Bundle args = new Bundle();
           args.putString(LoginAttemptFragment.USERNAME_ARG, users.get(i));
           frag.setArguments(args);
           // replace with login attempt fragment
           FragmentTransaction trans =
               getActivity().getSupportFragmentManager().beginTransaction();
           trans.replace(R.id.login_frameLayout_fragmentContainer, frag);
           trans.addToBackStack(null);
           trans.commit();
         }
       });
   // sets up the register button listener
   Button registerButton = (Button) v.findViewById(R.id.login_Button_newUserButton);
   registerButton.setOnClickListener(
       new Button.OnClickListener() {
         /**
          * Replaces the current fragment with the RegisterFragment.
          *
          * @param v the current view
          */
         @Override
         public void onClick(View v) {
           FragmentTransaction trans =
               getActivity().getSupportFragmentManager().beginTransaction();
           trans.replace(R.id.login_frameLayout_fragmentContainer, new RegisterFragment());
           trans.addToBackStack(null);
           trans.commit();
         }
       });
   return v;
 }
示例#11
0
 @Override
 public View onCreateView(
     LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
   // TODO Auto-generated method stub
   super.onCreateView(inflater, container, savedInstanceState);
   return layout(inflater); // 布局;
 }
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

    super.onCreateView(inflater, container, savedInstanceState);
    setRetainInstance(true);
    authServicesLayout =
        (LinearLayout) inflater.inflate(R.layout.singly_auth_services_fragment, container, false);

    this.remoteImageCache = new RemoteImageCache(activity, 2, null, 50);

    // get an instance of the singly client
    singlyClient = SinglyClient.getInstance();

    // get the main list view and put a click listener on it. This will tell
    // us which row was clicked, on the layout xml the checkbox is not focusable
    // or clickable directly, the row handles that
    authListView = (ListView) authServicesLayout.findViewById(R.id.singlyAuthenticatedServicesList);
    authListView.setOnItemClickListener(new ItemClickListener());

    // set the services array adapter into the main list view
    servicesAdapter =
        new AuthenticatedServicesAdapter(activity, services, authServices, remoteImageCache);
    authListView.setAdapter(servicesAdapter);
    return authServicesLayout;
  }
  @Nullable
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    super.onCreateView(inflater, container, savedInstanceState);

    // inject this activity's dependencies
    ((App) getActivity().getApplication()).getDaggerComponent().inject(this);

    mView = inflater.inflate(R.layout.fragment_detailed, container, false);
    ButterKnife.bind(this, mView);

    if (savedInstanceState != null) {
      mMovie = savedInstanceState.getParcelable(PARAMS_MOVIE);
    }

    if (mMovie != null) {
      Log.d(TAG, "movie is not null in detail fragment.");
      Picasso.with(getContext()).load(Utils.getImageUrl(mMovie.getPosterPath())).into(mImageView);

      mTitle.setText(mMovie.getTitle());

      mReleaseDate.setText("Release date: " + mMovie.getReleaseDate());

      mVoteAverage.setText("Average vote: " + Math.round(mMovie.getmVoteAverage()) + "/10");

      mOverview.setText("Plot Synopsis: " + mMovie.getOverview());

      mMarkFavorite.setVisibility(View.VISIBLE);
    } else {
      Log.d(TAG, "movie is null in detail fragment.");
      mTitle.setText("Nothing has been selected yet");
    }
    return mView;
  }
 @Nullable
 @Override
 public View onCreateView(
     LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
   super.onCreateView(inflater, container, savedInstanceState);
   View view = inflater.inflate(R.layout.fragment_home, container, false);
   return view;
 }
示例#15
0
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    super.onCreateView(inflater, container, savedInstanceState);

    v = inflater.inflate(R.layout.emptylayout, container, false);
    return v;
  }
 @Override
 public View onCreateView(
     LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
   super.onCreateView(inflater, container, savedInstanceState);
   chatView = inflater.inflate(R.layout.activity_shopcart, container, false);
   initView(chatView);
   return chatView;
 }
示例#17
0
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    super.onCreateView(inflater, container, savedInstanceState);
    View rootView = inflater.inflate(R.layout.fragment_invite_friends, container, false);

    return rootView;
  }
示例#18
0
 // 重写onCreateView(),返回fragment视图
 @Override
 public View onCreateView(
     LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
   super.onCreateView(inflater, container, savedInstanceState);
   View view = inflater.inflate(R.layout.elistview, container, false);
   elv = (ExpandableListView) view.findViewById(R.id.elistview);
   setExpandableListView();
   return elv;
 }
 @Nullable
 @Override
 public View onCreateView(
     LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
   super.onCreateView(inflater, container, savedInstanceState);
   View v = inflater.inflate(R.layout.capital_fragment, container, false);
   country = (TextView) v.findViewById(R.id.countryView);
   capital = (TextView) v.findViewById(R.id.capitalView);
   return v;
 }
示例#20
0
 @Override
 public View onCreateView(
     LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
   super.onCreateView(inflater, container, savedInstanceState);
   View view = inflater.inflate(R.layout.page01_fragment_layout, container, false);
   mListView = (ListView) view.findViewById(R.id.community_listview);
   mListViewAdapter = new CommunityContentListAdapter(getActivity());
   mListView.setAdapter(mListViewAdapter);
   return view;
 }
 @Override
 public View onCreateView(
     LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
   super.onCreateView(inflater, container, savedInstanceState);
   View v = inflater.inflate(R.layout.about_licence, container, false);
   String revision = Util.readAsset("revision.txt", "Unknown revision");
   WebView t = (WebView) v.findViewById(R.id.webview);
   t.loadData(
       Util.readAsset("licence.htm", "").replace("!COMMITID!", revision), "text/html", "UTF8");
   return v;
 }
示例#22
0
 /**
  * On create view view.
  *
  * @param inflater the inflater
  * @param container the container
  * @param savedInstanceState the saved instance state
  * @return the view
  */
 @Override
 public View onCreateView(
     LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
   super.onCreateView(inflater, container, savedInstanceState);
   View v = inflater.inflate(R.layout.fragment_messages, container, false);
   recyclerView = (RecyclerView) v.findViewById(R.id.messages_list);
   swipeLayout = (SwipeRefreshLayout) v.findViewById(R.id.messages_swiperefresh);
   setupRefreshLayout();
   setupRecyclerView();
   return v;
 }
 @Override
 public View onCreateView(
     LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
   super.onCreateView(inflater, container, savedInstanceState);
   if (container == null) {
     return null;
   }
   view = inflater.inflate(R.layout.architect, container, false);
   setArchitectView(listNum);
   return view;
 }
示例#24
0
 @Override
 public View onCreateView(
     LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
   super.onCreateView(inflater, container, savedInstanceState);
   View mineLayout = inflater.inflate(R.layout.fragment_mine, container, false);
   View settingsView = mineLayout.findViewById(R.id.setting_layout);
   Button exitButton = (Button) mineLayout.findViewById(R.id.exit);
   settingsView.setOnClickListener(this);
   exitButton.setOnClickListener(this);
   return mineLayout;
 }
示例#25
0
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    super.onCreateView(inflater, container, savedInstanceState);

    View root = inflater.inflate(R.layout.fragment_other, container, false);
    this.root = root;

    listview = (ListView) root.findViewById(R.id.peekMediaFeedListView);
    adapter =
        new MediaArrayAdapter(
            this.getActivity(),
            android.R.layout.simple_list_item_1,
            Singleton.getInstance().getPeekMediaFeed(),
            true);
    listview.setAdapter(adapter);
    OnItemClickListener clickListener =
        new AdapterView.OnItemClickListener() {
          @Override
          public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
            Intent intent;
            intent = new Intent(getActivity(), focusedMediaContentPage.class);

            // Load the data that this page will be displaying
            intent.putExtra("Position", position);
            intent.putExtra("Interactable", false);

            getActivity().startActivity(intent);
          }
        };
    listview.setOnItemClickListener(clickListener);
    listview.setEmptyView((LinearLayout) root.findViewById(R.id.emptyNotification));

    final SwipeRefreshLayout swipeView =
        (SwipeRefreshLayout) root.findViewById(R.id.swipePeekMediaFeed);
    swipe = swipeView;
    swipeView.setOnRefreshListener(
        new SwipeRefreshLayout.OnRefreshListener() {
          @Override
          public void onRefresh() {
            Singleton.getInstance().clearAllPeekContent();
            adapter.notifyDataSetChanged();
            new GetTask()
                .execute("http://1-dot-august-clover-86805.appspot.com/Get", address, sortVal);
          }
        });

    promptForLocation();

    // new GetTask().execute("http://1-dot-august-clover-86805.appspot.com/Get", "", sortVal);

    return root;
  }
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

    super.onCreateView(inflater, container, savedInstanceState);

    seminar = inflater.inflate(R.layout.seminar_frag, container, false);

    update();
    setRetainInstance(true);
    return seminar;
  }
示例#27
0
 @Override
 public View onCreateView(
     LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
   super.onCreateView(inflater, container, savedInstanceState);
   View view = inflater.inflate(R.layout.page01_fragment_layout, container, false);
   //        ViewGroup view = (ViewGroup) mView.getParent();
   //        if(view != null) {
   //            view.removeAllViewsInLayout();
   //        }
   Log.e(TAG, "nannan onCreateView ");
   return view;
 }
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    ((ActionBarActivity) getActivity())
        .getSupportActionBar()
        .setTitle(getResources().getString(R.string.equalizer));

    super.onCreateView(inflater, container, savedInstanceState);
    View v = inflater.inflate(R.layout.equalizer, container, false);
    saveViewChildren(v);

    return v;
  }
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    super.onCreateView(inflater, container, savedInstanceState);

    View view = inflater.inflate(R.layout.profile_fragment, container, false);
    mProfilePictureView = (ProfilePictureView) view.findViewById(R.id.profile_Picture);
    mProfilePictureView.setCropped(true);
    mUserInfo = (TextView) view.findViewById(R.id.user_info);

    mAlbumButton = (Button) view.findViewById(R.id.album_button);
    mAlbumButton.setOnClickListener(
        new OnClickListener() {
          @Override
          public void onClick(View v) {
            Context context = ProfileFragment.this.getActivity();
            Intent intent = new Intent(context, AlbumActivity.class);
            context.startActivity(intent);
          }
        });

    mLocationButton = (Button) view.findViewById(R.id.location_button);
    mLocationButton.setOnClickListener(
        new OnClickListener() {
          @Override
          public void onClick(View v) {
            Context context = ProfileFragment.this.getActivity();
            Intent intent = new Intent(context, GMSMapActivity.class);
            context.startActivity(intent);
          }
        });

    mGCMMessageButton = (Button) view.findViewById(R.id.gcm_message_button);
    mGCMMessageButton.setOnClickListener(
        new OnClickListener() {
          @Override
          public void onClick(View v) {
            Context context = ProfileFragment.this.getActivity();
            Intent intent = new Intent(context, NotificationEntryActivity.class);
            context.startActivity(intent);
          }
        });

    mStatusListView = (ListView) view.findViewById(R.id.status_list);
    View header = LayoutInflater.from(getActivity()).inflate(R.layout.status_list_header, null);
    mStatusListView.addHeaderView(header, null, false);
    mStatusListAdapter = new StatusListAdapter(getActivity());
    mStatusListView.setAdapter(mStatusListAdapter);

    return view;
  }
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    Log.i("onCreateView", "onCreate mostrar detalle");

    super.onCreateView(inflater, container, savedInstanceState);

    View view = inflater.inflate(R.layout.mostrar_detalle_evento, container, false);
    View header =
        getActivity().getLayoutInflater().inflate(R.layout.mostrar_detalle_evento_listheader, null);
    View footer =
        getActivity().getLayoutInflater().inflate(R.layout.mostrar_detalle_evento_listfooter, null);

    ///////////////// LIST VIEW and ADAPTADER/////////////////////
    listView = (ListView) view.findViewById(android.R.id.list);
    listView.addHeaderView(header);
    listView.addFooterView(footer);
    listView.setAdapter(commentsadapter);

    registerForContextMenu(listView);

    ///////////////// INITIALIZING VIEWS///////////////////////////
    tvCartel = (TextView) header.findViewById(R.id.tvCartel);
    ivCartel = (ImageView) header.findViewById(R.id.ivCartel);
    loadingAnimation = (ProgressBar) header.findViewById(R.id.loadingAnimation);

    tvFecha = (TextView) header.findViewById(R.id.tvFecha2);
    tvHora = (TextView) header.findViewById(R.id.tvHora2);
    tvTitulo = (TextView) header.findViewById(R.id.tvTitulo2);
    tvDescription = (TextView) header.findViewById(R.id.tvDescription2);
    tvCountComments = (TextView) header.findViewById(R.id.tvCountComments);
    etCommentTxt = (EditText) header.findViewById(R.id.etCommentTxt);
    btnPublish = (Button) header.findViewById(R.id.btnPublish);
    btnShowMore = (Button) footer.findViewById(R.id.btnShowMore);

    ////////////// LISTENER///////////////////////////////
    btnShowMore.setOnClickListener(this);
    btnPublish.setOnClickListener(this); // listener del boton de publicar comment
    // LISTENER DEL LIST VIEW esto nos saca el context menu con un solo click
    listView.setOnItemClickListener(
        new AdapterView.OnItemClickListener() {
          @Override
          public void onItemClick(AdapterView<?> adapterview, View v, int position, long arg3) {
            v.showContextMenu();
          }
        });

    setEventsFields(); // Fill the form using our event (Event event)

    return view;
  }