2
votes
4answers
103 views
+50

give dynamic font size as per device densities

i want to give different different font size as per device resolution. now which is the best way. to define font size. device resolution in pixel. 320*480, 480*800, 720*1280, 1024*600, etc..
0
votes
1answer
88 views

Better way to use various versions of custom View in XML layout in different API levels?

For example I have two versions of my custom View called MyView (for API 4-10) and MyView_v11 (for API 11+). They both inherit from the View class in Android. MyView_v11 simply extends MyView and ...
1
vote
0answers
208 views

Changing colour of specified days in Android CalendarView

I'm trying to change the text colour of specific days in Android's CalendarView to mark days that have events. I'm currently trying to do this by making a copy of Android's CalendarView.java and ...
2
votes
0answers
228 views

Android- How to implement Horizontal Step Progress Bar

I want to implement horizontal progress bar with steps like shown in following img. As there is no such native component in android.. ? Can anyone guide me on how to do it ? I m fairly new to ...
5
votes
1answer
1k views

Using an array reference as an XML attribute for custom android view

This problem has been solved, see comments for details. I am extending an existing Android View and loading some custom attributes, as described in Declaring a custom android UI element using XML and ...
1
vote
1answer
71 views

Why is a declare-styleable necessary if you can just read from the AttributeSet directly?

I've created a custom View subclass with the following constructor: public MyCustomView(Context context, AttributeSet attrs) { super(context, attrs); // get custom "thingy" attribute ...
0
votes
2answers
115 views

How to allow a custom View's XML attributes to be specified by either resource id or value?

I am implementing my own custom DialogPreference subclass, like so: public class MyCustomPreference extends DialogPreference { private static final String androidns = ...
0
votes
1answer
276 views

Add Prefrences Screen to an Activity with a customized window title

I know its possible to add a button to a prefernces Screeen activtiy. I read this question How to add a button to PreferenceScreen and it works perfect. But if I want to add my custom title my ...
4
votes
1answer
798 views

android: how to add children from an xml layout into a custom view

In my xml layouts I have a custom view in which i will put some children like: <com.proj.layouts.components.ScrollLayout android:id="@+id/slBody" android:layout_width="700dp" ...
0
votes
2answers
2k views

How to insert custom view into XML's LinearLayout

So I have a CustomView which is extended from View. And I have a linear layout from XML. The XML named example: <?xml version="1.0" encoding="utf-8"?> <LinearLayout ...
1
vote
1answer
100 views

Custom View Question

I am new to Android development and I have a question regarding custom views and using xml for view customization. So i my code I am having a view defined using the extended view class i.e. ...