2014년 5월 20일 화요일

[Android] App Icon 숨기기

[Android] App Icon 숨기기 

오늘 포스팅 하려고하는 부분은 바로 앱 아이콘을 보이지 않게 하는 부분 입니다^^

왜 설치한 앱을 다시 숨기냐고요??

ㅎㅎ 제가 지금 하는 프로젝트의 특성상 두개의 apk를 사용하기 때문입니다 

그래서 하나의 앱에서 또다른 앱을 호출 하는 형식으로 진행 되거든요

그래서 불려지는 앱은 아이콘이 없어야하는 문제가 있었습니다^^


결론.... AndroidManifest.xml 파일에 한줄만 제거해주면... 너무 간단히 앱아이콘을 숨길수 있네요...

소스는 이러합니다.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.testhello"
    android:versionCode="1"
    android:versionName="1.0" >
 
    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17" />
 
    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.example.testhello.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
 
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
 
</manifest>
 


위와같은 일반적인 manifest 파일에서 22 line 을 제거 해주기만 하면 

앱 아이콘은 사라지지만 다른앱을 통해 호출이 가능한 상태가 됩니다^^


일반적으로는 자주 사용되지는 않겠지만

우선 지금은 나에게 필요했던 부분이기에 포스팅으로 남깁니다^^

다들 즐거운 월요일 되세요~

댓글 1개: