Top "Layoutparams" questions

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

Dynamically change width of spinner in Android

I tried to dynamically change the width of a spinner with the code below, but I get an error message. …

android dynamic width spinner layoutparams
How to set completionThreshold to AutoCompleteTextView with java code?

I have this AutoCompleteTextView: AutoCompleteTextView a = new AutoCompleteTextView(this); I need to set completionThreshold flag value to 1, and i want …

android android-layout android-view autocompletetextview layoutparams
Dynamically filling a Table Layout with Table Rows

I have a table layout inside a scroll view , I want to fill them dynamically with 5 N Table Rows. Each …

android dynamic tablelayout tablerow layoutparams
How to set the align parent right attribute of TextViews in relative layout programmatically

I have a relative layout which I am creating programmatically: RelativeLayout layout = new RelativeLayout( this ); RelativeLayout.LayoutParams params = new RelativeLayout.…

java android xml android-relativelayout layoutparams
searchview not expanding full width

Basically I want the searachview to expand and collapse when there is a imagebutton behind which should disappear when icon …

android searchview layoutparams
view.getLayoutParams().width not working with nougat

I have written code to set height and width of view dynamically view.getLayoutParams().width = 120; view.getLayoutParams().height = 120; It works …

android layoutparams android-7.0-nougat
How to disable screen capture in Android fragment?

Is it possible to disable screen capture from a fragment? I know the below works for an Activity class onCreate(…

android android-fragments screenshot layoutparams