I am trying to create a YouTube style UI for my app.
I have two Fragment.. lets say A(left) and B(right). On clicking the app icon in the Action bar, B should slides to the right. On clicking again, it should slides back to the left.
I have a Listview on B and A is empty. Also, I am using ActionBarSherlock.
The following behaviour is experienced:
1. When App icon clicked,
B slides to the right normally
When App icon is clicked again
B slides to the left normally
When App icon is clicked again
B doesnt slide unless the fragment is touched manually.
On subsequent clicks, B slides to left normally. But it slides to the right only when touched after clicking the button.
what could be the issue and how can i solve it? Thank you.
Related
When going from Page 2 back to Page 1, I created a custom button with custom slide left/right animation between Page 1 and Page 2. Then obviously the "UP" button uses a default animation to go from Page 2 back to Page 1.
I'm referring to the following "UP" button on bottom of Android phones. That triangle "UP" button.
Do all Android apps have the default animation for the "UP" button when going back to page 1? Or can I customize it to have the same animation as my custom button? Or is it even pointless to have a custom back button when Android provides the "UP" button? Is the "UP" button just always default animation, no point of making a custom one?
I want in my app create sliding menu which scroll from the bottom to the top. I have a button on the bottom of Activity and when user click on the button, then the menu should shown. When user click on the button again, then the menu should disappear. User should also can swipe up and down to show or disappear the menu.
The menu can look like in this app Any.Do
Look at the screenshots below. Do you know how to do this? Do you have some tips?
One way to do it is have a view which animates up and down depending on it's state.
In this view you could house a fragment which would be the menu.
I have an app with home page showing a Google map with current location.
So according to the sketch in my home page i have a image icon or button type in my first screen and when i click on that icon or button a tile type opens up where there will multiple activities you can go.
Example if you click on 1 then it goes to one activity to do some task and if you click on 2 then it goes to another activity and similarly for 3 ,4 ,5 ,6 and whenever i click on any of the tiles it should go to particular activity.
I tried searching lot how to achieve this task over Google and thought some experts would me help me out with this in here.
And another point is home screen should not change if you click on icon or button in first image. As i mention in image both screen will be home page with map showing current location.
You can make it yourself. Set a RelativeLayout (in which there are six buttons) in the lower-right corner, and set it's visibility to View.GONE, then set another view in the lower-right corner as the button to open the expanded menu. When click on it, set the button to View.GONE and the RelativeLayout View.VISIBLE.
Hope it helps.
I have a source code to do (Slider menu)..
But I want to do like it to just open a specific content, meaning that I want the second content to appear over the current content from right to left by pressing a button.
Hint: I'm not want to open activity totally by
overridePendingTransition(R.anim.animation, R.anim.animation2);
I just want the second content opens over the current content like what sliding menu acts.
(sliding menu appears from left to right by moving my finger from left to right, I want my second content opens from right to left and appears partially by pressing a button and back to hide my passing my fingers over it and move from left to right)
example: https://play.google.com/store/apps/details?id=com.wunderkinder.wunderlistandroid
Sorry if I could not explain, and hope anyone got my mean.
I think you got the "Activity" concept wrong.
I understand, you can never show 2 activities at the same time. An activity is not a "screen", "view" or something like that... it is a context itself. It covers a whole state in your application. If you want to do something like a slider, you can play with views, animations or even better, fragments.
I want to achieve an effect:
Page A displays list. A button is on the top of page A.
On click this button, the Page B will be displayed.
The Page A will be push to right side, but not extrusion.
Page A still display 10%, but not hidden.