Top "Layoutparams" questions

The LayoutParams is a helper class that stores various layout information related to the Android view for which it is used.

Auto-fit TextView for Android

Background Many times we need to auto-fit the font of the TextView to the boundaries given to it. The problem …

android textview font-size layoutparams
How do you change the size of an ImageView?

I have setup my ImageView like the following: <ImageView android:id="@+id/dl_image" android:layout_width="60dp" android:…

android imageview layoutparams
android: LayoutParams for TextView makes the view disappear, programmatically

I've hit this from various different angles. Basically the gist is this: I've layed out a template in XML for …

android textview layoutparams
Add layout with parameters programmatically Android

Hello I have a main screen. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://…

android android-layout android-activity layoutparams
How do I programmatically remove an existing rule that was defined in XML?

I have a linear layout that is contained inside a relative layout. It is set in the XML file to …

android android-layout android-relativelayout layoutparams
Setting Layout parameters in android

Working with the XML file was easy as I could specify the parameters as <android:layout_width="fill_parent" …

android android-layout layoutparams
how to set padding or margin to linear layout?

I have a linear layout <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/layout_…

android layoutparams
How to find the Text Area(Height/Width) of TextView programmatically in android

I have an EditText, a Button and a TextView. On clicking the button, textview shows the text written in edittext. …

android android-layout textview layoutparams
How to set layout_span through code

Does anyone know how to set/change the android:layout_span="" of an EditText in Android at runtime. I already …

android tablelayout tablerow layoutparams