Add icon on the title bar

Add icon on the title bar

package com.AndroidFeatureIcon;

import android.app.Activity;
import android.os.Bundle;
import android.view.Window;

public class AndroidFeatureIconActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

requestWindowFeature(Window.FEATURE_LEFT_ICON);
setContentView(R.layout.main);
getWindow().setFeatureDrawableResource(Window.FEATURE_LEFT_ICON,R.drawable.icon);
}
}


0 Response to "Add icon on the title bar"

Posting Komentar