Tag Archives: getWindow

How to create transparency in your activity or dialog in android – different methods?

By | March 16, 2013

There are different ways for making an acitivity transparent. First method 1. Through XML in AndroidManifest like this. Here we are using Android’s built in theme. Method 2 Through styles create a style like this in your styles.xml and applying like this in the AndroidManifest.xml Check out this post for the complete implementation. http://www.coderzheaven.com/2011/07/20/how-to-create-a-transparent-activity-in-android/ Now… Read More »

How to place layouts one over another in android using addContentView()?

By | February 10, 2012

Hello all… In today’s tutorial I will show you how to add different layouts one over another in android through java code. For this we use the function addContentView() which is a variation on setContentView(View, android.view.ViewGroup.LayoutParams) to add an additional content view to the screen. Here I will create an xml with a textView and… Read More »

How to create a custom layout for your camera in Android?

By | July 10, 2013

Hello everyone, Today’s example shows how to create a custom layout for your camera preview, that is if you want a custom layout while your camera is opening. This example helps you to achieve this. First create a fresh project and name it CameraCustomLayout and copy this code to CameraCustomLayout.java file. After that create an… Read More »

How to show progress bar while loading a webpage in android?

By | November 3, 2011

This is a simple example showing how to load a webpage and show a progressBar while the page is loading in android. For that you have to set a chrome client for the webview which implements “onProgressChanged” Here is the layout file. Here is the java file