Theme.Sherlock.Light.DarkActionBar shows white actionbar - android

I can't seem to fix it.
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/Theme.Sherlock.Light.DarkActionBar" >
...
And I have imported actionBarSherlock and implemented it seemingly correct.
The Theme.Sherlock and Theme.Sherlock.Light works perfectly.

The problem was actionBar.setBackgroundDrawable(null);
which i used in another app to remove the blue divider. However in this design, it just removed the whole background.
Now the design works as it's suppose to, but I'm stuck with some sort of horizontal divider between the actionbar and the content.

Related

Launcher icon in Android not showing

Are there any special guidelines to put launcher icon in Android 7.1.1 ?
Because I added a logo in manifest file and its showing in all Android versions but not in my phone. Anyone got a clue?
In Manifest.xml, please check have to set icons for both android:icon="#mipmap/ic_app_icon" and android:roundIcon="#mipmap/ic_app_icon":
Here is the full code :
<application
android:allowBackup="true"
android:icon="#mipmap/ic_app_icon"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_app_icon"
android:supportsRtl="true"
android:theme="#style/AppTheme">

Android Studio - Activity's layout shows flipped (RTL instead of LTR)

I have this issue in my App, which is super weird.
I have an app, when i press Run on Android Studio, it starts the app with the correct layout's direction. Now, i press Back button and go back to the app, it shows a RTL layout instead of the current, correct LTR layout.
The app is pretty simple, it has an Activity with a NavigationButton in the Toolbar, when its flipped, the NavigationButton goes from left to the right, with a false pointing direction.
The app is LTR, supports only English, and tested on an English device, the same result is happening on the Emulator. I have the final version of Android Studio.
Layout, with Toolbar, along with navigation attribute, to enable back arrow.
Activity which setContentView and just shows the layout.
Back pressing, or re-opening the App without clearing it from the BackStack, shows the visual bug.
What cause the issue? as the code is pretty simple and doesn't have anything hardcore.
Manifest Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.corF.app">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:supportsRtl="true"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:theme="#style/AppTheme">
<activity
android:name="com.corF.app.activities.ActivityStartup"
android:label="#string/app_name"
android:windowSoftInputMode="adjustResize|stateHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
A library which i use (SliderLayout), has a code which forces the app to show RTL. On the first launch the SliderLayout forces the RTL, but it doesn't take change until i re-open the app without fully removing it from the backstack.
Silly issue, but yeah, this's the solution.

Icon on desktop but not on list

I've made a few Android App with the launcher icon in drawable. Now, with the new Android Studio, it seems better to put it (or them) inside mipmap. So I've done that and get a problem:
The icon of the new App is visible on the desktop with the correct name, but in the Settings/Application List, the App has the default Android icon and the name is the dev path (eg com.ansb.reflexe rather than "Reflexo")
My Manifest is the same than for the older App so seems not to be the "reason why"
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
Any idea?

How to only allow specific layout states be used during gameplay

I'm using eclipse and I'm trying to figure out how to only allow a Portrait state be used during game play. I can't seem to find any options in eclipse to block the Landscape state.
I'd appreciate any assistance. I know it's probably a simple matter, but I can't seem to find it and I've not tried to do this before.
Thanks in advance.
In your AndroidManifest file you can achieve this. You will add the android:screenOrientation tag in your application declaration. Something like this
<application
android:icon="#drawable/logo"
android:label="#string/app_name"
android:theme="#style/AppTheme"
android:screenOrientation="portrait" > //HERE
<activity
android:name="com.test.SomeActivity"
android:label="#string/app_name" >
You can change that to landscape as well. This attribute can also be applied to individual activities instead of the whole application if you need that.
In the activity tags of your manifest file, add this:
android:screenOrientation="portrait"

Android TabHost appearance not as expected

i just followed the tutorial on tabs creation from the android dev documentation
and my tabs didn't turn out the way they probably should. Here is a screen on how it looks for me:
alt text http://bombhot.se/files/923947/messedtabs.png
and here is how it should look like:
(source: android.com)
I found som threads that talks about putting localisation on the tabhost and make every activity follow the same configuration but it hasn't worked for me so far. Wondering if
there's something i'm missing, here is my manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.koollateral.myWallet"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="#drawable/icon"
android:label="#string/app_name">
<activity android:name=".mywallet"
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>
<activity android:name=".homeActivity"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar">
</activity>
<activity android:name=".calendarActivity"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar">
</activity>
</application>
</manifest>
I've done this API example before, and I think all that has happened is you have swapped your images compared to the example. Note how the tab uses the negative space of the image as the contrasting colour, while you matched the negative space to the background colour. So if you go into your drawable folder and change the xml file you created for the tabs by swapping the images, it should look a little closer to the example.
Other than that, what do you think isn't right? It appears that you have done the exercise correctly.
Edit: also as a tip, you can put android:theme="#android:style/Theme.NoTitleBar"in the <application> instead of having to put it into every Activity. Then none of your activities will have the title bar.
There seem to be two problems. You have listed the images reversed. Meaning you have the selected and unselected images backwards. Also it looks like they are not the right size. You need to consider the dpi of the device you are targeting.
Hi guys since Android 2.1 the tabs are more square look, my solution was adding a selector containing images with rounded corners.
tabs.getTabWidget().getChildAt(0).setBackgroundResource(R.drawable.mytab_roundedcorner);

Categories

Resources