Top "Android-layout" questions

A layout defines the visual structure for a user interface, such as the UI for an activity, fragment or app widget.

Using custom font in android TextView using xml

I have added a custom font file to my assets/fonts folder. How do I use it from my XML? …

java android xml android-layout fonts
Changing position of the Dialog on screen android

I made a simple AlertDialog in my Activity: View view = layoutInflater.inflate(R.layout.my_dialog, null); AlertDialog infoDialog = new …

android android-layout android-intent android-emulator android-widget
android activity has leaked window com.android.internal.policy.impl.phonewindow$decorview Issue

I am working with Android application to show network error. NetErrorPage.java package exp.app; import android.app.Activity; import …

android android-layout memory-leaks android-alertdialog
ProgressDialog spinning circle

I want to implement ProgressDialog like this one, without additional frame.: But I'm getting this one. How could I change …

android android-layout android-progressbar
How to change shape color dynamically?

I have <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:…

android android-layout xamarin.android shape
How to show one layout on top of the other programmatically in my case?

My main layout main.xml simply contains two LinearLayouts: The 1st LinearLayout hosts a VideoView and a Button, The 2nd …

android android-layout android-emulator android-widget android-manifest
How to remove focus without setting focus to another control?

I like my UIs to be intuitive; each screen should naturally and unobtrusively guide the user on to the next …

android android-layout
Android WebView not loading URL

I want to load the URL in WebView I have used the following Code: webView = (WebView) findViewById(R.id.webview1); …

android android-layout android-intent android-webview
Android RelativeLayout programmatically Set "centerInParent"

I have a RelativeLayout like this: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" …

android android-layout android-relativelayout
Set android shape color programmatically

I am editing to make the question simpler, hoping that helps towards an accurate answer. Say I have the following …

android android-layout shape