flip board menu style for android - java

In my app,first activity if we click one button it should open sencond activity with transparence only at the end some part. So when we are in second activity, the content of first activity should visible some part. Its like exactly Flipboard style menu in android, in flip board if we click top red button we will get another screen in that we can visible previous screen at the bottom like this i need. If any one having ideas please share with me how to do flip board style menu.

Use Fragments for this problem that's what they are made for.
If you want to use API 8, I still recomment Fragments but then you need to use ActionBarSherlock it provides you with all features you need.

Related

how to use fragments to create an overlay effect for an add contact function when a button is pressed

I'm trying to create an overlay that is triggered when a button is pressed. This overlay is supposed to allow the user to add their contact and I was wondering how can I use fragments to get this effect like you can see in this mockup.
I am in a dilemna over using fragments is the right choice. My reasoning being that I only need to have it do one task that is adding contacts, and thus I do not need a whole activity.
This is what I have on the main activity right now
I would really appreciate any help on understanding how to make this work.
You can use a DialogFragment.
It behaves like a normal Fragment for the most part. Here is a guide for a basic implementation https://guides.codepath.com/android/using-dialogfragment
They appear automatically in the center of the screen. To get it a bit lower like in your mockup you can change where it is in the window. Here is an answer showing such Position of DialogFragment in Android

How do I create simple two page Android swipe app in Android Studio

I want to create a tabbed activity or empty activity in Android Studio, but I need to be able to swipe to a page 2.
All I would like is for the app to say the standard "Hello World" on the 1st screen, and then you can swipe to the next page that says "Hello World Page 2", Just those 2 screens with no title bar on any of the screens - that's it.
I've tried creating a tabbed activity and was able to create both pages and swipe works, but it creates a button in the lower right corner and a title bar with settings button up top that I couldn't figure out how to delete.
I tried an empty activity but couldn't figure out how to add another page. If anyone could provide me the code or a sample project I could edit that would be amazing as I've lost several days in frustration over this.
You can use ViewPager component. When you will use it you would to use TabLayout, but if you want to hide it you just simply can edit its visibility.
You Can try this Example.
https://www.sitepoint.com/using-viewpager-to-create-a-sliding-screen-ui-in-android/
Simply replace the image with TextView.
To hide the actionbar user getSupportActionBar().hide()

Android: i need to do a menu like the image

i'm developing an application for android that is already done for IOS, is not big problem.
the thing is that my boss want it to be exactly the same, but one of the menus is the problem, is like a slide menu but with zoom and a background image, anyone have any idea how can i do this, i already google it but no results :(, a library would help.
here is a picture with the menu for IOS.
I don't think if it would be an effective solution but you can use a RelativeLayout.
Put the selection part behind in a LinearLayout then put a framelayout front to contain list fragments. This way you shouldn't use an action bar to have absolutely same looking with iOs version.
When someone clicks open button apply an animation to your framelayout. scale it by %75 and move it 25% in y coordinate and move it %50 in x coordinate. When buttons in your LinearLayout apply a reverse animation to your FrameLayout. If swap button clicked change your fragment with new one. You can also aply a transaction animation to your fragments.
I hope you know how to handle this stuff. If no I can do my best to code an example.
EDIT:
Don't forget to set your flame layout unclickable when you move it to right side.
https://github.com/SpecialCyCi/AndroidResideMenu
I think I found your answer. I came across this in a list of libraries it is 3.8 on the list https://github.com/Trinea/android-open-project/tree/master/English%20Version
Cheers!

how to show a "window/subactivity/dialog" on top of an Activity but keeping the focus in the Activity

My activity A is a game and it does some background operations. When I press a button in the contextual menu, I want to pop up a "small window/dialog/subactivity" (lets call it B) that appears on top of activity A and displays some data about those background operations. But I need to keep the focus on the activity A in order to continue interacting with it (playing the game).
In essence, I want to be able to see the data display by B while playing the game.
I'm not really sure how to implement this. After reading the documentation I have the next conclusions:
I know that I can't use Dialogs because the have the focus. Is it possible to avoid this?
Using a subactivity with a Dialog theme it's another option that looks tempting...but I believe that the subactivity has the focus. Ditto.
My last option is to try to add a LinearLayout with my data to the main Layout, "sharing/splitting" the screen. It's not pretty, but at least I know that this is possible. What I don't like about this approach is that I use the width and height of the screen.
Any suggestions? Solutions?
PS: I found some this thread here that are very related to my question:
Android ==> Sub Activity?
Create an Activity with style Theme.Dialog. This is a normal activity which looks like a dialog, while being modeless and accepting events.
Additional catch is in setting WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL and resetting WindowManager.LayoutParams.FLAG_DIM_BEHIND.
See this answer for complete example: timed modeless dialog
Why not use a FrameLayout that is apart of your Activity? Just ensure that this View has a higher z index (make sure you declare it last in your XML layout or create it at runtime). That way you never leave your Activity.

Android activity navigation

I'm developing an app, where there is the main activity, it display some content (texts, images, etc), and a translucent menu on top of it. In this menu, I got link to other "screens" (implemented as Activities), on clicking it, I get correctly to the new activity, but the "activity changing animation" of the device blinks and then get me to the new activity.
I would like to make the navigation experience to be seamless on navigate through the screens, keeping my menu always on top of it. Today, this menu is implemented as a custom view (extending a Linear layout), also this menu will be expandable and collapsible, so the way it is I have to store the menu state through the activities.
PS: The way I've thought was to keep always two running activities, one for the current screen and another one for the menu, keep the menu on top, and just change the activity behind it. But could not find a way to do this...
PPS: Developing for Android 2.1
Anyone got an idea?
You should take a look at Fragments, or try to keep all functionality in one activity, changing only the content view.

Categories

Resources