Android :: Multiple Configurations - Styles In App
Sep 7, 2009
I'm supposed to develop an app which behave like that: The User starts the app and can select between different configurations. Depending on the selection there are different colors, drawables and strings (e.g. urls for webservice-calls) to display. All the code-stuff is the same.
My first intention to do so was themes.... - is it possible to include somehow strings in themes? - what shall I do with styles which are referenced in some layout-xml (which are the same for all configs) and should use different colors. can't define colors or styles multiple times and don't want to change that manually (when user selects by code).
View 2 Replies
Oct 7, 2009
I was wondering if its possible to set multiple styles for different pieces of text inside a TextView. For instance, I am setting the text as follows:
CODE:...........................
Now, is it possible to have a different style for each text element? I mean bold for line1, normal for word1 and so on...
I found this http://developer.android.com/guide/appendix/faq/commontasks.html#selectingtext:
Get our EditText object. EditText vw = (EditText)findViewById(R.id.text);
Set the EditText's text. vw.setText("Italic, highlighted, bold.");
If this were just a TextView, we could do: vw.setText("Italic, highlighted, bold.", TextView.BufferType.SPANNABLE); to force it to use Spannable storage so styles can be attached. Or we could specify that in the XML.
Get the EditText's internal text storage. Spannable str = vw.getText();
Create our span sections, and assign a format to each.
CODE:............................
But it uses position numbers inside the text. Is there a cleaner way to do this?
View 3 Replies
View Related
Sep 16, 2010
Is there a database anywhere that has all of the different devices that use the android operating system and what their technical specs are. Mainly screen size, screen density, internal storage, external storage, memory, etc.
View 2 Replies
View Related
Oct 14, 2010
I have a issue about spinner. I have many images in spinner when I select some image it shows the image and if I change the orientation like change to landscape its selected item list starts pointing the top one in the list. How shall I prevent to do that?
View 1 Replies
View Related
Sep 18, 2009
I just wanted to quickly bring up a topic that I had noticed lately. This comes to my attention for two reasons, firstly someone had posted that he had a user that reported a vague error message like "deleted all my pics", and the dev's were not able to reproduce it. Secondly, I myself have seen bug reports that really may not be relevant to my application. I had recommended to that first dev to just ignore the error for now since there was not enough info to reproduce it, and also for a second reason, there is no way to know what the user is truly running. For example, I've had a few bug reports, where a user says of my app "Doesn't work on HTC hero", but then another user will post "Works fine on Hero". I also had found a posting on the internet in a forum where a user had tried to use some of my software on a custom ROM, and he was having problems.
I guess the issue I'm bringing up here is that with the android market being somewhat "limited" in functionality, it makes it very hard on us developers to handle any customer issues such as bugs, etc. Especially since they could be using a custom ROM, or have ROOT access which also may even be affecting the software. My point is that developing for android in a professional manner is really not an easy task, and possibly it's just starting to be worth it (with market 1.6 at least there are some improvements) to develop paid apps. Basically Google needs to work harder though to improve this situation - and if users expect better apps (there are lots of complaints about the market being full of junk) then they need a way to report issues better, etc. And really it's not even up to a dev to try to match up with a custom ROM, technically it's not supported! (It's up to the dev of course if they want to investigate and try to support it).
What seems is going to happen is android is not only going to have multiple configs (which fortunately for us seems that the market will help filter them out if you app does not support them), but also we never can really know what is on a user's system. They may have some custom stuff, and they see a bug, but it could really not be our bug, but rather, in the system itself. This is why I still recommend that bug reports have to be weighed carefully as to whether they may really be a problem or not. It's an investment in time and while makers of free apps no doubt may not mind, those of us who develop paid apps don't want to multiply our costs by going down blank pathways.
I don't think I see any resolution to the situation in the near future, but I just wanted to make it clear that if a user reports a bug in their comments and gives you one star, it's not the end of the world. If you can reproduce it quickly and fix it, then that is great. But if not, move on - there is no way you can know exactly what they are talking about. I think some devs get too anxious about that one bad report. There is no way we are going to avoid that report! Because they may be using an untested ROM or such anyway, and it may not be worth your time to look at it in the long run. I've had few low stars here and there as well, and trust me, just keep improving your app and you will rise back up. As devs we need to encourage one another and I just want to try and help devs not get anxious about things that are really beyond their control.
View 2 Replies
View Related
Feb 1, 2010
I am trying to create a Video recorder but it looks like the video resolution is limited to 320 x 240. I tried changing it through MediaRecorder.setVideoSize() to something higher (e.g. 640 x 480) but gives me the same result. Is there a way to record video at higher quality? Also, when I try using the CAMERA as VideoSource instead of DEFAULT, the app force closes.
MediaRecorder.setVideoSource(MediaRecorder.VideoSource.DEFAULT)
Which is the best configuration (encoding options?) to give the best video quality?
View 11 Replies
View Related
Sep 11, 2010
You know that layout editor in the Android ADT plugin that lets you design the layout for ADP1, ADP2 and Nexus One, has anyone created other device configurations? It requires device information such as the x-dpi and y-dpi, which can be difficult to find out. I'm just wondering if anybody has added more device configurations they're willing to share? Perhaps together we could compile a huge devices.xml containing many of the devices out there. I'm fully aware the layout editor has many faults and cannot be relied upon but it is sometimes useful to rapidly preview how the layout might look on a wide variety of devices without switching between emulators.
View 4 Replies
View Related
Oct 5, 2010
Android should become more like Windows. Android should be able to detect and recognize the different hardware configurations and adjust itself accordingly. This way, you hit two birds with one stone. No more fragmentation. No more differences in the UI, Custom UI will be entirely optional.
All the manufacturer has to do is make the hardware and provide the hardware drivers to Google. Simple as that. Everything will be so much easier. Phone manufacturers will be able pump out devices like crazy without any worries. Software developers won't have to worry about device compatibility. Come on Google, lets do it.
View 27 Replies
View Related
Sep 13, 2010
I'm typically asking for the best speed settings such as kernals. OC widgets. Nightlies. I'd like to hear the best scenarios and apply them to my hero. JIT enabled? overclocked to 768? JIT disabled? Did a lot of reading from the CyanogenMod-6 for Hero V6.0.0 - RC1 thread. I know what is best so far, but flashing collins battery tweak on top of the uncapped kernal is a benefit or a negative? Some say you don't need to flash it but why not when it's making the battery last longer?
View 22 Replies
View Related
Jul 28, 2010
Is there a way, or an App that allows us to save the screen configurations /layouts , etc like on the Incredible?
For those that don't know, the Inc has preset themes and you can save whatever layouts, wallpaper setup you come up with. So you can switch whenever the mood strikes.
View 2 Replies
View Related
Sep 29, 2010
I'm having some trouble with my Uni's WiFi in that it needs to use a manual proxy address to access properly. I've had a wee fiddle with many things and had a look on the marketplace but there doesn't seem to be anything that can help? (I'm still running 2.1 un-rooted btw)
Heres what I'm dealing with - Web Proxy - University of Strathclyde
View 2 Replies
View Related
Jan 24, 2009
For Style and Thems defination, CSS is considered to be a better standard...(as it has seen many revisions and widely used already in the web areas).. Any reason, why Android using XML approach as opposed to CSS.. Are there any plans of support of CSS too in future..
View 5 Replies
View Related
Sep 3, 2010
I want to enable different themes in my app. Some elements need "special" variations, like, for example, a headline TextView. Lets say for the example, in theme A, I want the headline yellow on black, in theme B red on white, while the default TextView uses black on white and vice versa.
Now, I can style the default TextView pretty easy by using <item name="android:textViewStyle"> with a different TextView style in each Theme style.
For example:
CODE:............
But how can I do it with the headline? As far as I know, I can use style="..." in the layout XML. But there, I can only use an item style like "headlineForBlack", which would ignore the current theme, while I'd rather need something like "style 'headline' for the current theme".
View 5 Replies
View Related
Nov 9, 2009
I have defined some attributes in my view and I can assign them like:
CODE:................
This works. But when I want to do the same thing with styles.xml:
CODE:.................
I get "No resource found that matches the given name".
View 5 Replies
View Related
Feb 3, 2009
Given a widget and a int that references a style (defined in my res/ values/style.xml), what is the 'correct' way to programmatically apply the style to the widget?
Up until now I've been hacking this by...
CODE:..................
View 5 Replies
View Related
Sep 19, 2009
Where can I find default styles for my widgets? Let me give you an example. In the Contacts application, when adding a new contact, at the very bottom there are two buttons that have a particular background. I have traced that to here: http://android.git.kernel.org/?p=platform/packages/apps/Contacts.git;... and it would seem that that background is achieved by using style="@android:style/ButtonBar" on a LinearLayout. From what I understand, this is a system-wide theme default for button bars. However, what I am searching for is not a ButtonBar, but similar, so I tried searching for this ButtonBar in the documentation, hoping to find other similar styles I could use. I *thought* I would find it in R.style:[url]
View 4 Replies
View Related
Oct 7, 2009
I would like to load new themes/styles from the web to replace the current ones. Is that possible? As far as I can see those resources are read-only.
View 5 Replies
View Related
Nov 25, 2009
I would like to make some small changes to the style of the built-in TabWidget (i.e. make the height smaller and change some colors).
View 2 Replies
View Related
Jun 30, 2010
Where can I see what typeface, size, color, etc. are used for Android's pre-defined text styles? Like the default text style or textAppearanceMedium, for example?
View 3 Replies
View Related
Apr 22, 2010
Is it possible to display Css style tags in a text view..? The method Html.fromhtml() converts only html tags to a spanned string but not the Css styles
View 3 Replies
View Related
Jan 28, 2010
An important part of creating an android application is making the gui look right. However where do I find documentation for this. An example of what I am looking for is something like this
style="@android:style/ButtonBar"
what other interesting styles does exist. The eclipse layout xml editor knows about some of the @android:style/'s but not this one. Where is all this documented?
View 5 Replies
View Related
Aug 28, 2010
I like Handcent SMS but can't decide on a custom style. can anyone suggest style settings or if you are able to post screens of your Handcent SMS setup. Show me your styles!
View 2 Replies
View Related
Apr 1, 2010
I'm defining a style XML for my android app. I have some TTF files I want to use, how can I set the typeface to use those files as the font as opposed to the generic "sans", "serif" & "monospace".
View 2 Replies
View Related
Sep 7, 2010
I would like to create an xml selector of styles.
Basically i would do something like that:
CODE:.................
View 1 Replies
View Related
Sep 11, 2010
In an Android application I am writing, the styling for my various TextView elements is defined in an xml resource. I would like enable the user to change certain styles such as android:typeface using a PreferenceActivity. Is there a way to modify a style resource programmatically such that all associated widgets will update correctly? If not, must I manually select all widgets by id and change their styling?
View 1 Replies
View Related
Mar 16, 2009
Is there a way to change the Alert Dialog style, like background and font color using something like
<?xml version="1.0" encoding="utf-8"?> <resources> <style name="Theme" parent="android:Theme"> </style> <style name="Theme.Dialog"> <item name="android:colorBackground">#FF0000</item> <item name="android:colorForeground">#00FF00</item> </style> </resources>
View 3 Replies
View Related
Dec 23, 2009
Do you know if it's possible to apply a theme or a style on a OptionMenu ? I don't find tag in R.style or R.styleable to customize it and apply a theme.
View 3 Replies
View Related
Dec 15, 2009
I've got a text style defined in styles.xml. I'm trying to reference it from a layout. When I reference from the layout, it causes an exception upon inflation. If I use the style from java code, it works fine. Setting the individual styles on the TextView works fine too:
CODE:..............
View 3 Replies
View Related
Jan 6, 2010
Im trying to figure out how to use Styles. It seems easy, but its not working.
First, here is my XML for the Button:
<Button style="@style/Btest" android:id="@+id/Button01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Some text"></Button>
And here is the values/styles.xml:
CODE:...........
Its not working at all. If I dont use Style and just add the style directly in the XML for the Button - no problem.
View 2 Replies
View Related
Sep 21, 2009
In the ApiDemos, there is a view example called Gallery1 which declares a custom style in attrs.xml.I want to do the same thing for my widgets, but using a different namespace. However, as soon as I replace the android: namespace with something else,Unable to find attribute? Why does it look for an attribute I am about to declare? Isn't the point of this file to be able to name your own custom attributes?It's interesting to note that it works if you do not supply a custom namespace, but just an attribute name.
View 2 Replies
View Related