How do I get rid of the action bar? - android

Alright so I've tried practically every method possible. I've developed a Image Button to open a new activity but it had the title of something I didn't want.
The usual method:
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/Theme.NoTitleBar">" >
But it comes up with an Error.
What do I do???
Whole Manifest File:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="saintbedeslytham.saintbedes" >
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".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>
<activity
android:name=".event"
android:label="#string/title_activity_event" >
<intent-filter>
<action android:name="saintbedeslytham.saintbedes.event" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>

Congratulations Zsolt Boldizsar,
The method works!
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/Theme.AppCompat.Light.NoActionBar" >
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Copying the the AppTheme Declaration and replacing the .DarkActionBar with .NoActionBar worked!

Related

The activity must be exported or contain an intent-filter - even though there's an intent filter

IDK why it's happening, there's an intent filter in there.
I think I'm missing a tiny problem, that another point of view can detect faster/
thanks!
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.caloriecalculator">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".Login"></activity>
<activity android:name=".MainActivity" />
<activity
android:name=".Register"
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>

How can I organize my layouts in my Android manifest file

Hi guys I'm new in Android Studio, I'm actually on an project and I was wondering how I can organize my layouts let me explain, I have three layouts and I don't know how to display the first then the second and the third in that order:
-Splash Screen
-principal
-mainActivity
Here is my Android Manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.recipe">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".principal" />
<activity android:name=".RecipeActivity" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".SplashScreen"
android:theme="#style/Theme.AppCompat.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
I hope I was clear and I know it's easy to do but as I said I'm new.
Thanks for your help guys.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.recipe">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".principal" />
<activity android:name=".RecipeActivity" />
<activity android:name=".MainActivity">
</activity>
<activity
android:name=".SplashScreen"
android:theme="#style/Theme.AppCompat.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Change your manifest to this. Your app will start from splash screen. After that it depends that you want to go to which activity. By using intent you can go from one activity to another one.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.recipe">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".principal" />
<activity android:name=".RecipeActivity" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".SplashScreen"
android:theme="#style/Theme.AppCompat.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
The rest of the intent and app navigation is your doing , good luck .

Android Studio - Can't find app icon on TV homescreen

When I install my app using a file explorer on my tv, I can run it and everything but I do not know how to create an icon that will sit on the home screen of the tv
Here is my AndroidManifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sony.omgandroid" >
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme" >
<activity
android:name=".FullscreenActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="#string/app_name"
android:theme="#style/FullscreenTheme" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
It utilizes the android:banner in the AndroidManifest on the application tag.
<application
android:name=".ExampleApp"
android:banner="#drawable/app_banner"
android:theme="#style/AppTheme"
You need add in AndroidManifest.xml file
android:banner android:icon android:logo and android.intent.category.LEANBACK_LAUNCHER
example:
<activity
...
android:banner="#mipmap/ic_launcher"
android:icon="#mipmap/ic_launcher"
android:logo="#mipmap/ic_launcher">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
</activity>

Android: on Pause(), onStop() or onDestroy() not called on screen orientation change

on Pause(), onStop() or onDestroy() is not called on changing screen orientation from Portrait to Landscape. Am I missing something?
Here is the manifest:
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MyActivity"
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>
Try this in your activity
android:configChanges="orientation|keyboardHidden|screenSize"
Manifest should look like:
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MyActivity"
android:label="#string/app_name"
android:configChanges="orientation|keyboardHidden|screenSize"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

Android: No Launcher activity found, no problems in Manifest

Here's my AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.fionaheiss.shovelshovel"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="13"
android:targetSdkVersion="15" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity android:label="DisplayMap"
android:name="com.seanheiss.shovelshovel.DisplayMap"
android:theme="#android:style/Theme.Black.NoTitleBar"
android:configChanges="keyboard|keyboardHidden|orientation" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
I've tried the "name" field as above and just as ".DisplayMap". It is definitely spelled correctly. Could it be because I'm using Slick2D? The file DisplayMap.java extends BasicGame from the Slick2D engine, and has a main method. Maybe it's not an actual activity or something, but I'm not sure.
Any ideas? Thank you very much!
You forgot to close the Activity tag:
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity android:label="DisplayMap"
android:name="com.seanheiss.shovelshovel.DisplayMap"
android:theme="#android:style/Theme.Black.NoTitleBar"
android:configChanges="keyboard|keyboardHidden|orientation" > // Also fix this here
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity> // <-- here
</application>
Good Morning,
You have to close the <activity> tag after the <intent-filter>
<activity >
<intent-filter>
-------------------
------------------
</intent-filter>
</activity>

Categories

Resources