public void showMenu() {
    rbmOutsideView.setVisibility(View.VISIBLE);

    rbmListView.setVisibility(View.VISIBLE);
    rbmListView.startAnimation(
        AnimationUtils.loadAnimation(getContext(), R.anim.rbm_in_from_right));
  }
  public void animate() {

    final AnimationSet animationSet = new AnimationSet(false);

    final AlphaAnimation alphaAnimation = new AlphaAnimation(1, 0.25f);
    alphaAnimation.setDuration(350);
    animationSet.addAnimation(alphaAnimation);

    final Animation moveAnimation = animationType.create();
    moveAnimation.setDuration(500);
    animationSet.addAnimation(moveAnimation);

    animationSet.setRepeatCount(0);

    if (postAction != null) {
      animationSet.setAnimationListener(
          new Animation.AnimationListener() {
            @Override
            public void onAnimationStart(Animation animation) {}

            @Override
            public void onAnimationEnd(Animation animation) {
              postAction.run();
            }

            @Override
            public void onAnimationRepeat(Animation animation) {}
          });
    }

    listView.startAnimation(animationSet);
  }
  public void hideMenu() {

    rbmOutsideView.setVisibility(View.GONE);
    rbmListView.setVisibility(View.GONE);

    rbmListView.startAnimation(AnimationUtils.loadAnimation(getContext(), R.anim.rbm_out_to_right));
  }
 private void showFolderList() {
   Animation animation = AnimationUtils.loadAnimation(this, R.anim.pickphoto_listview_up);
   //        Animation fadeIn = AnimationUtils.loadAnimation(this,
   // R.anim.pickphoto_listview_fade_in);
   photoFolderlistView.startAnimation(animation);
   //        photoFolderParent.startAnimation(fadeIn);
   photoFolderlistView.setVisibility(View.VISIBLE);
 }
示例#5
0
 private void makeAllAlphaDown() {
   // TODO Auto-generated method stub
   lv.startAnimation(alphaDown);
   song_search_button.startAnimation(alphaDown);
   slide_songlist_button.startAnimation(alphaDown);
   songs_button.startAnimation(alphaDown);
   artists_button.startAnimation(alphaDown);
   albums_button.startAnimation(alphaDown);
   playlists_button.startAnimation(alphaDown);
 }
示例#6
0
  private void disableTut() {
    // TODO Auto-generated method stub
    swipe_left.setVisibility(View.GONE);
    swipe_left_textview.setVisibility(View.GONE);
    swipe_right.setVisibility(View.GONE);
    swipe_right_textview.setVisibility(View.GONE);
    tut_button.setVisibility(View.GONE);
    point_tut_imageview.setVisibility(View.GONE);
    point_textview.setVisibility(View.GONE);

    lv.startAnimation(alphaUp);
    song_search_button.startAnimation(alphaUp);
    songs_button.startAnimation(alphaUp);
    slide_songlist_button.startAnimation(alphaUp);
    artists_button.startAnimation(alphaUp);
    albums_button.startAnimation(alphaUp);
    playlists_button.startAnimation(alphaUp);
  }
示例#7
0
  private void switchMode() {

    ListView listView = (ListView) getView().findViewById(R.id.listview_main_list);
    int newLeftMargin =
        (currentMode == Mode.View)
            ? (int) getResources().getDimension(R.dimen.icon_list_delete_width)
            : -(int) getResources().getDimension(R.dimen.icon_list_delete_width);

    Animation anim = new LeftMarginSlideAnimation(listView, newLeftMargin);
    anim.setDuration(200);
    listView.startAnimation(anim);

    Button rightButton = (Button) activity.findViewById(R.id.button_actionbar_right_button);
    rightButton.setText(
        (currentMode == Mode.View) ? R.string.button_label_done : R.string.button_label_edit);

    currentMode = (currentMode == Mode.View) ? Mode.Edit : Mode.View;
  }
  private void hideFolderList() {
    Animation animation =
        AnimationUtils.loadAnimation(PhotoPickActivity.this, R.anim.pickphoto_listview_down);
    //        Animation fadeOut = AnimationUtils.loadAnimation(PhotoPickActivity.this,
    // R.anim.pickphoto_listview_fade_out);
    animation.setAnimationListener(
        new Animation.AnimationListener() {
          @Override
          public void onAnimationStart(Animation animation) {}

          @Override
          public void onAnimationEnd(Animation animation) {
            //                photoFolderParent.setVisibility(View.INVISIBLE);
            photoFolderlistView.setVisibility(View.INVISIBLE);
          }

          @Override
          public void onAnimationRepeat(Animation animation) {}
        });
    photoFolderlistView.startAnimation(animation);
    //        photoFolderParent.startAnimation(fadeOut);
  }
  public PopupWindow showMenu() {
    // Initialize a pop up window type
    LayoutInflater inflater =
        (LayoutInflater)
            SearchLocationActivity.this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    LinearLayout layoutt = new LinearLayout(this);
    PopupWindow popupWindow =
        new PopupWindow(
            layoutt,
            LinearLayout.LayoutParams.MATCH_PARENT,
            LinearLayout.LayoutParams.WRAP_CONTENT,
            true);

    ParseUser currentUser = ParseUser.getCurrentUser();
    Popup_Menu_Item menus[] = new Popup_Menu_Item[5];
    fbUser = ParseFacebookUtils.isLinked(ParseUser.getCurrentUser());
    email_verify = currentUser.getBoolean("emailVerified");
    Log.d("Splash screen ", " " + email_verify);
    if ((currentUser.getUsername() != null && email_verify == true) || fbUser) {
      menus =
          new Popup_Menu_Item[] {
            new Popup_Menu_Item(
                R.drawable.location_icon, getResources().getString(R.string.search_near_me)),
            new Popup_Menu_Item(
                R.drawable.search_icon, getResources().getString(R.string.search_location)),
            new Popup_Menu_Item(
                R.drawable.add_bathroom_icon, getResources().getString(R.string.add_new_location)),
            new Popup_Menu_Item(
                R.drawable.support_icon, getResources().getString(R.string.support)),
            new Popup_Menu_Item(
                R.drawable.login_icon, getResources().getString(R.string.my_account)),
            new Popup_Menu_Item(
                R.drawable.sign_out_button, getResources().getString(R.string.Logout)),
          };
    } else {
      menus =
          new Popup_Menu_Item[] {
            new Popup_Menu_Item(
                R.drawable.location_icon, getResources().getString(R.string.search_near_me)),
            new Popup_Menu_Item(
                R.drawable.search_icon, getResources().getString(R.string.search_location)),
            new Popup_Menu_Item(
                R.drawable.add_bathroom_icon, getResources().getString(R.string.add_new_location)),
            new Popup_Menu_Item(
                R.drawable.support_icon, getResources().getString(R.string.support)),
            new Popup_Menu_Item(
                R.drawable.login_icon, getResources().getString(R.string.Login_menu))
          };
    }

    Log.e("Array size", menus.length + " ");
    adapter = new PopupMenuAdapter(SearchLocationActivity.this, R.layout.popup_menu_item, menus);
    Log.e("After adapter", menus.length + " ");
    // the drop down list in a listview
    ListView lstMenu = new ListView(SearchLocationActivity.this);
    // ListView lstMenu= (ListView)findViewById(R.id.listView1);
    // lstMenu.setVisibility(View.VISIBLE);

    // set our adapter and pass our pop up window content
    lstMenu.setAdapter(adapter);
    // adapter.notifyDataSetChanged();
    lstMenu.setDivider(getResources().getDrawable(R.drawable.menu_line));
    // lstMenu.setCacheColorHint(Color.TRANSPARENT);
    lstMenu.setAlpha(.93f);

    Animation fadeInAnimation =
        AnimationUtils.loadAnimation(getApplicationContext(), android.R.anim.fade_in);
    fadeInAnimation.setDuration(10);
    lstMenu.startAnimation(fadeInAnimation);

    // set the item click listener
    lstMenu.setOnItemClickListener(new DropdownOnItemClickListener());

    // some other visual settings
    popupWindow.setFocusable(true);
    popupWindow.setBackgroundDrawable(new BitmapDrawable());

    // popupWindow.setWidth(width);
    //  popupWindow.setHeight(WindowManager.LayoutParams.WRAP_CONTENT);

    // set the list view as pop up window content
    popupWindow.setContentView(lstMenu);
    return popupWindow;
  }