There is simple way to add space between controls( buttons, text boxes..etc..) in an linear layout. Add the following attribute in the controls,
<Button
android:layout_width="280dp"
android:layout_height="40dp"
android:layout_marginTop="15dp"
/>
This will allow 15dp space above the button. Likewise you can give space between each controls. You can use the following attributes too,
android:layout_marginBottom="10dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
Showing posts with label How to. Show all posts
Showing posts with label How to. Show all posts
Tuesday, March 11, 2014
Monday, November 25, 2013
How to override 'web site not found' message in webview control
Add the following code inside of 'onCreate(Bundle savedInstanceState)' function,
locationview.setWebViewClient(new WebViewClient()
{
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl)
{
locationview.loadUrl("file:///assets/error.html");
} });
The above URL will be load if the web page not found in the webview control.
Saturday, August 10, 2013
How to remove notification bar
Put this code in your onCreate() method,
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
How to remove title bar..
Put this in your onCreate() method.
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
Subscribe to:
Posts (Atom)