Top "Layoutparams" questions

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

Android FrameLayout and TextView - why does LayoutParams work where setGravity() does not?

I'm using a FrameLayout to display (on demand) some text on the screen. I want the text to be in …

android textview layoutparams
EditText in dialog android

i have made a edittext in a dialog but i cant get to change the height. AlertDialog.Builder editalert = new …

android android-edittext android-alertdialog layoutparams
Android - image view inside view pager issues

I have an image view inside view pager to display some images coming from url as shown in the screen …

android android-layout imageview android-viewpager layoutparams
Set programmatically margin in android?

I have bellow xml . In this xml i need that set MarginTop "@+id/imgFooter" programatically toward "@+id/imgCenter" .But i …

android imageview android-imageview android-relativelayout layoutparams
ListView row set Left Margin programmatically in CustomAdapter

I have a ListView with its Custom Adapter. in adapter's getview i want to set margin left of 15 dip to …

android listview android-adapter layoutparams
android setLayoutParams for webview generates ERROR

is it possible to set mWebView = (WebView) findViewById(R.id.webviewHelp); mWebView.setLayoutParams(new ViewGroup.LayoutParams(100, 200)); here mWebView.setLayoutParams(new …

android webview layoutparams
How I can set keep screen on and full screen flag?

fullscreen in my app and I write this code : public void onCreate(Bundle savedInstanceState) { requestWindowFeature(Window.FEATURE_NO_TITLE); setRequestedOrientation(…

android layoutparams android-screen android-windowmanager
Android - add subview with layout params at specific index (in code)

I may be missing something, but I can't find a way to add a subview to a view at a …

android android-view layoutparams
How to get height in pixels of LinearLayout with layout_weight

this is my first post. I am learning to code in java for android apps. I am using a LinearLayout "…

java android android-layout layoutparams android-layout-weight
Android: change LayoutParams of View added by WindowManager

I have overlay View managed by WindowManager, just like in this question. Briefly, it looks like this: WindowManager wm = (WindowManager) …

android view layoutparams