I'm trying to implement a MenuBar (i need it always visible so the context menu is not useful !) in the bottom of every activity for my app.
I saw that the easy to use TabActivity is now deprecated...and so i didn't get yet ho should i use the Fragments "technology".
I already found some discussion...but there is any already implemented eclipse project i could download somewhere or any easy to follow tutorial?
The one i followed over here http://developer.android.com/reference/android/app/TabActivity.html was really incomplete.
I get some class cast exception due the fact i didn't get how to use FragmentActivities.
Help! :)
Not sure if you're still looking (hopefully not :) ) but here's a really good one:
how to use fragments
Try running ApiDemos app shipped with SDK Samples.
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/FragmentTabs.html
Related
I know there's some way to do this because i've done it by accident, I just don't know the proper terminology to use in a google/SO search, so my apologies. For instance: the View class, a built in Android class, how can I bring up the file inside Android Studio with all the methods etc to see how the class works? and yes I'm aware I can just go to android.developer.com and see everything, but thats not my question.
I think you're talking about going to the class declaration. On Mac you can hold down Command and click on the class you want to go to, for Windows and Linux you can hold Control and click on the class.
https://developer.android.com/studio/intro/keyboard-shortcuts.html
I need your help. I created an app in Android Studio, then I created a second "page", well I created a second class.
But it says this class needs an default constructor. What shall I do?
I hope you can help.
Cheers
Follow a tutorial if you are new to Android Development.
https://androidcookbook.com/Recipe.seam?recipeId=1670
Could help you understand the flow better. Google is your friend, don't be afraid to search if you need tutorials.
I'm trying to use ChromeView on my Android app in order to run some preload html. I follow this tutorial https://github.com/pwnall/chromeview
I can import it correctly to my project, but i can't see the ChromeView component on the Pallete, as it is mentioned there, so my app crashes because "Class Not Found" exception is raised.
Thanks in advise
I just implemented this and It worked. Hopefully it helps someone.
Here's how I did it:
Instead of looking for ChromeView on the Pallete, I would recommend that you just type it in the XML. Much quicker.
Here's how:
BUT, if you prefer to do it in the design mode, look for Custom View on the Pallete.
And when you click on it, it will show all the custom views available from the linked libraries, etc. Pick ChromeView from the list.
If ChromeView is not on that list and if you manually type it in XML and give you error, the chromeview package isn't linked correctly.
I've got an android project that I started from an old standard Java project, so because of the vast difference in target platform, I have a lot of dead code to cleanup.
I've seen UCDetector recommended for finding unused public methods in java projects in Eclipse. I installed it as directed, and it just doesn't show up on the menu, and I have no idea how to get it to work.
Has anyone got this combo to work, or have another recommendation? Or know how to get it to show up?
(I've tried Find Bugs which found some good stuff, but it doesn't find unused public code.)
Big warning!
It might partially work, but beware, cause it doesn't seem to know about XML-defined callback functions.
If you have installed a callback function on a widget, say a button in an XML Style Sheet, and it is not called in code, UCdetector will think it has 0 references, and suggest it deleted. This obviously is wrong, and will render your code uncompilable.
There might be other similar issues, related to Android specifics.
Viggo
Yes, UCDetector works for android projects. I just installed it and it works.
It's available in context menu of project in Package Explorer.
I've been using XML to create my UI and I know this question may sound silly but it is not.
How do you create a UI using the Android plugin for Eclipse?
(Is there a step by step tutorial somewhere or can someone give me step by step instructions)
Does the class name have to be the same as my view name?
Android plugin comes with handy visual editor where you can drag and drop views and widgets easily. And you don't have to name the xml files similar to your activity class because you will use setContentView() inside the activity to specify its view
This may not quite be what you are looking for but I would check out DroidDraw. Makes doing Android GUIs more friendly. There is a tutorial at http://www.droiddraw.org/tutorial1.html
Here's some (new!) overview documentation for the Eclipse plugin; see the "Canvas and Outline View" section in particular:
http://developer.android.com/guide/developing/tools/adt.html
I would advise you to create a rough sketch of whatever you're going to design first. Once you had a rough sketch/draft in your head,it becomes much easier to design the real thing.
Here are some UI guidelines :
http://developer.android.com/guide/practices/ui_guidelines/index.html
And if you're looking for tutorials :
http://www.youtube.com/watch?v=maYFI5O6P-8&feature=relmfu