Icon prolem in the settings - android

I have a little problem, my appliction always display my icon in the menu, home screen stc. My app is a wallpaper app, but in the wallpaper setting list always display a gray images without my icon. Where I can configure that?

In AndroidManifest.xml find application tag and add android:icon="#drawable/icon" replacing icon with id of your resource.
Something like this:
<activity
android:name="com.cotv.MainActivity"
android:label="#string/app_name"
android:screenOrientation="landscape"
android:theme="#style/QTheme.PageIndicatorDefaults" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

Related

Is there a way to 'freeze' the app in landscape or portrait mode?

Is there a way to 'freeze' the application in either landscape or portrait mode, so turning the device/phone would not turn the app view but it would stay in either landscape or portrait?
Thanks
Yes.
In you manifest file, just add android:screenOrientation="portrait" for all your activities.
Your activity tag for your launcher activity should look like this:
<activity android:name=".MainActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
You will have to do this for all your activities. There is no option available to specify it in the application tag.

Don't want to show label and settings menu on my main screen

I wanted to show first screen (user's registration) without label and settings menu.
would someone please suggest me how?
Following is the code from manifest.xml
<activity
android:name=".LoginActivity"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
The settings icon is the menu option in Android. To remove that just remove the onCreateOptionsMenu() method. But since you also want to remove the title, all in all what you are asking is to remove the action bar itself. That means you want a full screen activity and for that you can simply set a style in the android manifest.
<activity android:name=".LoginActivity"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"/>

Change Loading Screen

I've created an android app, and everything works fine, but when you first hit the icon to launch the app it flashes white with the title bar for a second or two before loading the full interface.
I have a previous app the just flashes black for a second or two before launching, without the title bar but I can't seem to find what is different in the setup/code that makes it do that.
After the app loads I'm removing the title bar with the following line in onCreate
requestWindowFeature(Window.FEATURE_NO_TITLE);
Try this.
In your Manifest activity include android:theme="#android:style/Theme.Light.NoTitleBar"
<activity
android:name=".MainScreen"
android:theme="#android:style/Theme.Light.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Add the below line in your Manifest file for the splashaActivity,
<activity android:name="splashActivity" android:theme="#android:style/Theme.NoTitleBar.Fullscreen" />
Hope this will solve your problem.

Separate Launcher and Activity icon with Android

I've got a simple application with one single activity. Actually, the launcher icon is the same as the activity's one (the one in the top-left corner). I would like to put another icon in my activity without changing the launchers'one.
Here is my manifest :
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.natinusala.pebkac.MainActivity"
android:label="#string/app_name">
<intent-filter android:logo="#drawable/pebkac">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Actually, I can edit the launcher and activity icon by editing the android:icon="#drawable/ic_launcher" line. I can do it also in adding an android:icon into the <activity> but it modify too the launcher's icon.
How can I do to edit my activity's icon without touching the launcher's one ?
Thanks !
In your manifest, add android:logo="#drawable/ic_yourIcon" to either your Activity or Application tag.

How to not display Android application Name on every screen

I am finding that in my Android application, the name of the application is displaying on the top of every screen, consuming a line of valuable screen real estate.
I am using LinearLayouts
How can I get this not to display?
You can set it in the Activity/Application tags in the manifest XML:
android:theme="#android:style/Theme.NoTitleBar"
See more here (Styles and Themes).
Or write in onCreate yours Activity before setContentView():
requestWindowFeature(Window.FEATURE_NO_TITLE);
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" android:theme="#android:style/Theme.Black.NoTitleBar.Fullscreen">
<activity
android:name=".A"
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>
you can add this line android:theme="#android:style/Theme.Black.NoTitleBar.Fullscreen" to the manifest and make your application fullscreen and without title bar
and if you want to remove only the title bar and don't want to make the application full screen then you can use Theme.NoTitleBar
Change your activities' theme like that
<activity android:name=".Activity"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
android:theme="#style/AppTheme"
Above change in Manifest file didn't work for me.
requestWindowFeature(Window.FEATURE_NO_TITLE)
For this to work in your project you have to make one more change. Make your acivity extends Activity instead of AppCompactActivity which comes by default.
Thank You.

Categories

Resources