Is there an Android version of the SWRevealViewController? - android

I've been using the SWReveal View Controller as the basis for my app in iOS, and I want to find an analog in Android. I'm hoping to keep the same drawer effect going left and right as appears in John LLuch's SWRevealViewController https://www.cocoacontrols.com/controls/swrevealviewcontroller.
I know you can use a navigation drawers controller to show the left, but that is a pop over. It's not like moving the center screen over to the right. I am also aware of there being the Fixed tabs controller, but those do not allow the center screen to be shown on top either. I am hoping somebody has mimicked a controller in android that allows you to move the three screens as if you were paging between them and still show your center screen at all times.
Please let me know if you guys know of one or know how to make the fixed tabs controller do this.

Google has a navigationDrawer that looks similar to the SWRevealController. However in all our projects we use https://github.com/adamrocker/simple-side-drawer/tree/master/SimpleSideDrawer as it seems easier to get used to it.
It is not exactly the same but you will get same results. We always make a Base Activity that all the menu activities extends in order to get the actions of the menu.
It is as having a FragmentActivity and on the onCreate method add these:
mNav = new SimpleSideDrawer(this);
mNav.setLeftBehindContentView(R.layout.menu_left);
mNav.setRightBehindContentView(R.layout.menu_right);
I hope that helps!

Related

Activities overlapping

I am new to writing Android apps, I have been using the internet and Android Studio to create an app for my club as a bit of fun and learn along the way. I have been watching videos, using tutorials and walkthroughs and I am getting to learn the basics.
However, I have got stuck. I used a drawer template from Android Studio and added the activities I needed and buttons on the main screen to the activities and they all worked fine, no overlapping. When I tried to link the drawer icons to the activities, rather than use the buttons on the main screen, they work, but the app (visually) puts the next activities content on top of the one before.
I cant find anything on the internet except something called backstacking, but that is described when the back arrow is used, my problem is to do with selecting an activity from the drawer menu. I have attached a picture to show what I mean. It gets worse the more menu items that are selected.
If anyone could help, it would be great!
If you are using XML root layout as a constraint layout maybe your constraints are missing. If you are using constraint layout set both top/bottom and left/right constraint.
If your constraints only top for example it is look good on desing but in device that dont know where to positioning left or right and automatically positioning 0 point to top.
When you click one any one menu item put the visibility of other images as gone like
visibility(View.GONE);
and the one selected to be visible

Android - Create a view that includes the entire screen

I am not the best at android programming so please correct any errors I make.
According to this developer.android.com.
Android view is:
This class represents the basic building block for user interface
components. A View occupies a rectangular area on the screen and is
responsible for drawing and event handling. View is the base class for
widgets, which are used to create interactive UI components (buttons,
text fields, etc.).
However, I have not found an article about how to get a full view. I mean as in an entire screen as a view. The image I used below is to show what I want to include in that view. I want to include everything on screen. Everything On that Screen. (I can't repeat enough). It includes the chat heads, background, and menu bar. Everything that is on screen.
I can't figure out how to get a view like that from a service or from an activity. Any help is appreciated. I don't have exact code because I don't know how to do this.
Edit:
I know that I am very bad at explaining, so if you are confused, I am going to explain what I want to do with my view.
So basically, I want to make a screen tapper that taps for you so you can king of "cheat" games like cookie clicker. Therefore I need a view that contains the entire screen so then I can fake "touches" on the screen.
Hope this cleared any confusion
So you have a few things to deal with. Generally, the menu bar (and possibly soft-key buttons on the bottom) will remain visible. However, you can hide the menu bar:
hide the top menu bar in my android device & Tablet
You may want gestures to allow users to see it. Or, since it appears you are building a game, you just leave it hidden until they hit "home" or "back" or "exit" or whatever.
The "chat heads" are a horrible idea, but some developers think they are awesome. You can see more about that here:
Creating a system overlay window (always on top)
You might find something like this will work (but if new notifications pop-up, it may not help):
http://goobbe.com/questions/1390940/how-to-close-cancel-dismiss-a-system-dialog-programmatically-android

Android implement left to right swipe animation

In android, i want to move from current to previous activity by left to right swipe as in iOS. I want to be able to even hold while swiping such as both activities are visible at the same time.
I want to introduce transition/animation effect just like in Telegram app. So please help how can i do it.
Tutorials or example code will work for me.
Thanks in advance!
You better use the Swipe animation with multiple Fragments inside one Activity: Creating Swipe Views with Tabs
take a look at this tutorial : HOW TO IMPLEMENT HORIZONTAL VIEW SWIPING WITH TABS
If you're already using Google's NavComponent library, you should try a library that I wrote:
https://github.com/massivemadness/Fragula
It's fully integrated with NavComponent, which means the navigation API stays the same, you only need to make some changes in NavGraph and NavHost container.
Here's the result:

Ideas for android navigation bar (below action bar)

I have a design for an app that will have a row of buttons below the action bar. Each button will open a different fragment. I am aware of ViewPagers, but I do not want the swipe between fragments functionality. I know that I can disable this functionality, but at that point is it worth using a ViewPager? I know this is a pretty common design paradigm, so how do most apps handle this sort of thing?
It seems like the ViewPager will provide some nice functionality out of the box, like switching between fragments and what not. So, I am leaning towards using one, but was hoping someone could provide some feedback on this approach.
Thanks!
Keep the buttons in the layout of your main activity. Have them call a function lets say loadFragment(Button button) on click.
This function then handles switching of the fragments, and you can change the display of the navigation buttons inside this function itself to highlight the appropriate button or something equivalent.
Google Design is always worth the reading.
Check http://developer.android.com/design/patterns/swipe-views.html for details.
Personally I have used ViewPager with tab layout for swiping purpose and it makes it easy to me to synchronise the transitions ( tabs and pages) where I put a red circle to the tab corresponding to the viewed page. With this approach I got a clean separated code.

Need help figuring out how to implement UI

Essentially I'm asking what techniques to use in Eclipse/Android Studio to make a UI that looks like the FaceBook UI withtabs on the bottom and their typical action bar on the top with content in the middle.
I've been kind of dealing with this issue for quite some time now and as I have a project deadline coming up figured it was finally time to get stackoverflow's opinion. What would be the best way of creating a social media app that models FaceBook's user interface. By this I am referring to something with the four tabs on bottom and search/back and profile buttons at the top, with some sort of fragment changing in the middle.
The solutions I have currently tried are using a split actionbar by forcing the top into a custom layout and the bottom into an options menu; however, this resulted in giving the options menu the drop down option instead of tabs (if there's a quick fix for this like setting a custom layout to it please lmk because this is my current setup).
For the main content view I originally tried using fragments and then switching between fragments by using functions and buttons inside the fragment class to switch views; however, this required childfragment manager, and for some reason that never worked properly, so instead I ended up switching activities instead of fragments which was horribly slow.
If you guys have any suggestions on how to do this properly please please either tell me how I would go about this, or better yet please show me some very good examples on how to do these things.
Thanks :)
u can use any proto typing tools to create UI . Some tools include Proto.io , Fluid ui etc

Categories

Resources