Immagine a blank activity. If you swipe from left to right another activity (I think) comes in partially covering the parent.
I would like to recreate this effect:
I'm new to android programming and the only thing that i could think to do that is to use fragment in some strange way.
Since i don't know how to call this "function" i didn't manage to find a lot on the web.
So, is there a method to easly accomplish this? Can you give me any info on where to start e what to search for to do that?
Thanks.
This can be done using the DrawerLayout. You can find a lot of help online about using DrawerLayouts, but this link is how I learned and it helped me so much:
https://github.com/codepath/android_guides/wiki/Fragment-Navigation-Drawer
Related
My idea is to create a kind of growing form. Now the question is: What is the best way to do this? I haven't found a library, yet. On the picture below, you can see how I thought it to be. It should go to the next step after each input and an EditText field should appear. Any advice on existing libraries or tips on which UI component should be used to realized would be appreciated. Thanks for the help!
you have plenty approach but the one i prefer to use:
make your list, then for each index assign its next EditText. by default make your all EditTexts (except first one) disabled. then add a listener each index to observe its text. as soon as it was filled tell that listener to enable its next EditText.
maybe its not so efficient but its simple and makes code more readable. and also you can extend that easily if you just implement two first indexes because the rest is just the same.
I know it's not a legitimate question but I'm searching an example to this menu for Android\Java about 2.5 hours and I'm lost. Please just give me a link or write me its name so I can google it, find examples and implement it by myself.
I just saw that many people use sliding menu or dropdown menu but it's different than what I want I guess.
(source: smashingmagazine.com)
Each of those is a spinner, so I thought it might be called an expandable spinner, and got some hits for what you're trying to do : expandable-spinner : How to implement expandable spinner entry in Android
Another term for it might be "multi-level spinner" for which there are more hits similar to what you want. Best practices for implementing a multi-level Option Menu on Android?
I'm not sure this is the best approach for a menu, though. Would you consider something like this instead: https://github.com/pratikbutani/MultiSelectSpinner
Im using this library to create a gallery,and im kinda new to android programing but i want to add a listener to when the user swipe down the image it will be deleted.
thanks for the helpers,and if you didnt understood me tell me to rephrase.
Ok, since you haven't tried anything, and thus you don't have a specific question, all I can do is trying to point you in the right direction (I hope).
I suggest that you do the following:
1) Setup the library: take a look at the examples provided by FancyOverFlow.
2) Make sure that you understand what is going on about the code that you use, don't add code "just because it works". Do this as a rule of thumb for every code that you write. If you are using a 3rd party code library, you don't have to fully understand how every method works internally, but make sure that you understand in/outputs of the methods you are calling. Understanding how things work will make it much easier to modify your own code.
3) Find out which component has the hold of your current image in displayed gallery. This will be the control on which you will set up a swipe listener do detect user swipe moves. I haven't tested this, but I suspect taht in this case the component is called FancyCoverFlow (take a look at README.md file).
4) Take a look at Swipe Views (or any tutorial that does swiping) and adapt your code.
If you are new to Android, it may take a while, but don't give up!
So here's the thing, I want to build a GridView containing few items that are movable/rearrangeable by the user. Pretty much similiar as the one you'd see on the home screen of Android.
I've looked into some places but ended up with zero result. The closest thing I was able to find was the sample of a home screen app found on developers.android.com but It doesn't have the thing I'm looking for (the items are unarrangeable).
Please give me a hint how this could be done. Code examples are also welcome.
Thanks in advance! :)
I think you should implement a drag&drop.
The GridView can handle the OnDragListener, so you could do : myGridView.setOnDragListener and do whatever you want with it.
I also advise you to check the following link
I hope it helped!
I will explain my question clearly.
I need to zoom in/zoom out the world map.
When I click on the particular country in map, control should redirected to new page with respective the country.
I dont have any idea about this in java. Please explain the steps to acheive the above task.
As the question is quite general, here is a general answer: Zooming often means, that you want to display a certain percentage of somethin, and not the whole, where your size of the displayed will not change.
But in your case it seems more like a "find a mouse click in a polygon" thing. So you have to add a selection/click listener to whatever widgets you use (Swt? swing? ....?) where you change what your program renders.
It sounds like you may be trying to reinvent the wheel. Google etc have already solved this problem rather well. It might be better to incorporate an existing solution into your application. Have a look at GoogleEarth inside Java Swing.