Cdacians

Cdacians
Cdacians

Tuesday, 7 August 2012

Add icon on the title bar


Add icon on the title bar

Add icon on the title bar

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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);
    }
}

akm
www.cdacians.com

No comments:

Post a Comment