Linked Questions
14 questions linked to/from Android - custom UI with custom attributes
0 votes
0 answers
54 views
Android how to use app attribute for custom class options [duplicate]
i have this class its for make rounded ImageView public class RoundedImageView extends ImageView { private static final ScaleType SCALE_TYPE = ScaleType.CENTER_CROP; private static final ...
530 votes
6 answers
322k views
Defining custom attrs
I need to implement my own attributes like in com.android.R.attr Found nothing in official documentation so I need information about how to define these attrs and how to use them from my code.
492 votes
6 answers
205k views
Declaring a custom android UI element using XML
How do I declare an Android UI element using XML?
8 votes
2 answers
9k views
android seek bar customization,
I need to customize a seek bar in such a way that, at pre determined time say , 30sec, I should have a dot on the seek bar. This duration varies for each and every video, so how to I place a dot point ...
1 vote
1 answer
2k views
How to pass additional arguments to a Constructor when extending a LinearLayout in Android?
I have the following question, if I have a class extending a LinearLayout like: public class ExtendedSeekbarLayout extends LinearLayout { ..} and I would like to pass additional Arguments to my ...
0 votes
2 answers
1k views
Android custom drop down view with dynamic list
I have a problem with filling android:entries with String[] from my ViewModel. Code looks like that: attrs.xml <declare-styleable name="AutoCompleteDropDown"> <attr name="android:...
3 votes
1 answer
1k views
Set inner edittext xml properties on custom view
I created a compound view consisting on an EditText and a TextView... I want make any developer using my view able to do the following <MyCustomView android:id="@+id/password" ...
1 vote
0 answers
644 views
How to convert a CardView XML with title and buttons into library on Android?
EDITED The examples in google searches and the android documentation are basic, and my question is more complex. What I do not know, is how to put multiple components together and turn it into a ...
2 votes
1 answer
652 views
How to pass the value of layout width/height to custom view class
I am creating a module having a class (roundbutton) extending linear layout. It contains an image view and a textview. When the roundbutton view is declared in the XML file, a layout_width and ...
0 votes
1 answer
475 views
How can you associate an xml view to a java class?
<android.support.v7.widget.RecyclerView android:id="@+id/menu_list_rv" android:layout_width="match_parent" android:layout_height="match_parent" android:visibility="...
0 votes
0 answers
372 views
Android: reading styled attributes from another class
I have 2 View classes that implement the same functionality (display images). One is used for backwards compatibility and extends ImageView, while the other extends TextureView but is available only ...
0 votes
1 answer
259 views
How to remove the namespace android:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" ...
0 votes
0 answers
82 views
Custom ActionProvider with custom attributes
Creating custom attributes for a custom View is fairly straightforward. As is creating a custom ActionProvider. The difficulty is that the ActionProvider class constructor only has a Context argument ...
-2 votes
1 answer
53 views
android including one layout with different IDs
I have created a layout with an ImageView, I want to include it two times with two different ImageView like a ListView with different positions. this is the ImageView layout <?xml version="1.0" ...