I am using Flat Ui in my Android Application using Android Studio but i am unable to find AutoCompleteTextView inside Flat Ui and I have to use AutoCompleteTextview in my application so anyone suggest me the way to use that?
I Just fork a library for AutoCompleteTextView and waiting to be merged.
For now:
Inside library/src/main/java/com/cengalabs/flatui/views create new file name it FlatAutoCompleteTextView.java
Find the FlatEditText.java copy the content and paste it to FlatAutoCompleteTextView.java
Inside FlatAutoCompleteTextView.java replace all text with "FlatEditText" with "FlatAutoCompleteTextView" .
find this part style = a.getInt(R.styleable.fl_FlatAutoCompleteTextView_fl_fieldStyle, 0); and replace with style = a.getInt(R.styleable.fl_FlatAutoCompleteTextView_fl_autoFieldStyle, 0);
Edit library/src/main/res/values/attrs.xml , paste this code inside and save or just replace content with this http://pastebin.com/w4w5UWdd
To use style fl_autoFieldStyle="flat" or fl_autoFieldStyle="box"
If the Flat UI project does not support AutoCompleteTextView, your choices are:
Write it yourself.
Convince the author of the library to write it for you.
Hire some other developer to write it for you.
Go without AutoCompleteTextView.
Go without Flat UI.
Since none of the Flat UI widgets are based on AdapterView, creating an AutoCompleteTextView may be rather complicated.
The merge request from PinoyWebDev (thanks to him) is closed and AutoCompleteTextView is now available in the library. You can see the added class here.
Related
I am designing following layout structure for one of my application. But dont know how to implement it.
This Design is called Stepper. There are lot of open source library is available for this design. Check the following link. May it will help you.
https://android-arsenal.com/details/1/3049
I have to make a new design for an Android App, but I only have to create the visual part (native Android). The app logic would be created by another guy based on what I present to him.
My question is? How would this be managed correctly? Do I have to make the XML's of each layout? How could I show the other person my progress?
What things should I consider when doing this?
Thanks
You need to mock the app first (create a prototype) as suggested by NoChinDeluxe. Then if you guys go ahead and decide to code it, the answer to your problem is separation of responsibilities. As Jeffrey said UI work is not only about layouts, but code as well. What I would suggest is that you and the other guy get together first and define some contracts (interfaces) that will allow you guys to split the work and work in parallel. Therefore, he can create the business logic of the app without worrying about the UI implementation. You, on the other hand, will have to mock that business logic he's implementing at the beginning so it doesn't block your UI work.
you could create layout XML files for all the Activities/screens, using resources (icons, etc as suggested by #NoChinDeluxe). However since you'd want to run the mock app, you might want to also create a "throw-away" Activity that allows you navigate to different screens of the app. Here you can add a number of buttons and when you click on each button, your app shows a specific activity. This way, you will be able to show your colleague all the screens you have created. I hope this helps.
This may not be what you want to hear, but creating Android layouts isn't a design task. They are closely tied to the code, and the design of them is going to depend on how the engineer chooses to implement the app.
Here's an example. You might have a grid with 4 cells. You could use a RelativeLayout, a LinearLayout, or GridLayout, or a GridViewLayout. Which will use choose?
I'd suggest providing your engineer with mockups and graphical assets where required. Let him / her take those and create the layouts. If you want to create layouts as a (visual-only) reference for engineering, great, but it's certainly a non-optimal tool for that task.
Things You will consider when doing visual part:-
You have to work on the resource folder of your application
Layout : All Layout you have to prepare.
Drawable : Images and drawable .xml.
Inside Values folder you will find
dimen.xml : For different devices dimen you can set.
string.xml : You can store string for hint or other purpose.
style.xml : For designing or theme or custom design.
color.xml : Color which are going to used in the application.
I have a fairly simple Android UI element that I created locally inside of a application project. This element is a EditText/Label combination that displays the hint text in the EditText but when the user starts to type in the field it floats the hint text as a label above the field.
I would like to be able to use this component in other projects. I've been unable to find any useful information about how to package separately from application so that I can reuse it in other places.
Thanks.
You need to create a library project. You can add to a library any classes that you want, including User Interface elements.
On your projects, you just add a reference to you library project to reuse it.
Check this link.
I am in a situation like i have to generate UI Controls like Button,Switcher,Progress Bar, Label text etc based on my list Items .
I am looking for a way to generate the controls in a View and add Views with generated controls in a Layout .
Can anyone give me a proper way to do that?
Why not to use Fragments?
Google docs about this here
and little tutorial here
You may want to take a look at the Metawidget source code. The Android version of Metawidget makes extensive use of generating Views and Layouts at runtime (e.g. see org.metawidget.android.widget.widgetbuilder.AndroidWidgetBuilder). You may even find Metawidget itself will suit your needs (it's designed to be embedded into projects for use-cases such as this).
When I am in a Java class file, I can get context info of a certain method/attribute/etc. (in IntelliJ, this shortcut is Ctrl+Q), which is basically a short help file describing what that element does. Look at the image 1.
But when I am in an XML file, I cannot get any contextual info on any element. Look at the image 2.
How should I enable it? Do I have to download some additional Android doc (javadoc?) file?
For Android code support in Eclipse, you might want to checkout http://android-developers.blogspot.com/2011/06/new-editing-features-in-eclipse-plug-in.html.
In particular :
XML editing has been improved with new quick fixes, code completion in more file types and many “go to declaration” enhancements.
basically a short help file describing what that element does
FYI: It's called Javadoc.
For the xml:
Go to Window, Show View, Other, General, Properties.
Then, when you have opened an Android xml, you can switch to the Graphical Layout. Clicking on an element will show you it's properties in the property view. Hovering over the elements there at least will give you contextual information.
As CrazyCoder suggested, there is no way to get such contextual info because of the lack of sources to fetch such info from. Until better times...