I am trying to use the rather smart ActionBarSherlock and it is going ok except for 1 rather important thing. The app icon seems to be firmly stuck in the middle of the actionbar.
I am currently deploying on 2.3.4, not using actionbar tabs and using the theme
android:theme="#style/Theme.Sherlock"
Everything works fine except for this. I have also tried it on the emulator.
Any suggestions?
Solved I was stupidly not telling Eclipse that I was designing using android 3.2 or higher.
This messed up the appearance of the actionbar when built.
I also found it essential to build the sherlock library from the downloaded zip file outside my workspace.
Related
I am working on an instant app demo app. I used the default template which I extended with a RecyclerView and a custom adapter. My problem is that my layout is totally broken:
As you see the toolbar is the same, but something does not work correctly regarding the coordinator layout. The floating action button is missing and the navigation drawer is not displayed below the system UI (the notification area) and yep of cause the menu is empty.
The both screens are debug builds so proguard is not messing anything up (I got also release working with proguard, but of cause I still have the same issue). On the left is the result of the gradle task :app:assembleDebug and on the right :instantapp:assembleDebug.
Since I use except of the recycler view the default template for this app I add no code, any idea why my layout is broken in instant apps?
Please follow these steps and you should be good to go!
https://developer.android.com/topic/instant-apps/getting-started/first-instant-app.html
Note : Please select Navigation Drawer Activity in Step 8
From the shared image, it looks like you have modified some code from the default Navigation Drawer Activity for your IA. If yes, please share the code to investigate.
Also, let me know the device/emulator and the Android studio you are using. I was not able to reproduce the issue with Studio version 3.0.1 on Nexus 5x (Android version 8.0.1). Following is the image of the instant app from my nexus 5x with 8.0.1 build. Let me know if I am missing something!
When I open up my android studio, I do not see the image of any device in design view. Rather, an error shows up. I know there should be a device where we can do some drag and drop for GUI. How can this rendering problem be fixed?
You need to change the Theme. There's the AppTheme tab if you can find. Change it to something other. Many other themes are available and will have different design schemes. Choose from them. The issue will be gone
Add the resources in a library project as per http://developer.android.com/tools/support-library/setup.html
>Section > Adding libraries with resources
You then add the android-support-v7-appcompat library in your workspace and then add it as a reference to your app project.
I moved from using Eclipse to use Android Studio, but I foun with a problem, AppCompat is bringing me some problems and I don't want to use it so I tried to deactivated but I didn't find a way. There is an option in Android Studio to deactivate it? Because manually adapting the project (changing inherations, prefixes and themes) after it has been built takes a lot of time.
The problem is that when using the AppCompat, I can't create an Overflow menu. If I write "app:ifRom" the item appears on the ActionBar, that's right. But if I write "app:never" the overflow icon (3 dots) never appear, and if I touch the hardware key for opening the overflow menu, the app suddenly stops. That is why I do't want to use the AppCompat, because without using it (using the android: prefixes instead of app: prefixes) I didn't have any problem.
If you could help me solving one of this questions: How to deactivate AppCompat on Android Studio or why the "app:never" prefix is not working I would be gratefull.
I have made a programm based on SDK 7. Now I want to add an Actionbar to it. I changed the minSDK to 11 in the Manifest. Isn't that supposed to change the design of the layouts I already have?
Problem is, that I get returned "null" by getActionbar(). I read, that I have to activate the title bar in the OnCreate of the mainactivity. But that does'nt change anything, still "null".
I can see the titlebar, but on SDK 7 it's smaller than on SDK 11. Can't really describe my problem. I just want to use Actionbar on my old written App. But the Layout still looks like in the pic below (left).!
LayoutProblems
Hope someone can help me.
Thanks!
You should also replace the old android.jar with the new one from SDK 11 to get the new GUI. If you are using eclipse for development, just check different Project buid target under Project - Properties - Android.
If you want to use ActionBar in older devices you must use actionbar support library which is provided with the sdk.
My friend tried my app with his new galaxy tab and it seems it is a little different than the emulator I tested it on. His options menu for the app was dark instead of the white background and you could not really see any of the options and most of the app did not work properly. I made the app on the 2.1 android update and am very stumped I tried searching for something about this but could not find anything. Is there a way to modify to act accordingly if this happens?
Samsung modified a lot of standard themes and images. The only way to fix it, that I found, was to force my own theme and use my own images everywhere.
Since Android 2.3 the menu background has changed to black. But the general color palette for the icons you make shouldn't be that much different. See more here:
Android Menu Design Guidelines
If you wish to have different icons for android version 2.3 and earlier versions put the icons for Android 2.3 and later in a resource folder with -v9 appended to the folder name. Example:
drawable-hdpi-v9
You should do the same thing with notification icons, as android 2.3 really made a big change to the way notification icons should look.
Btw, if you are looking for an easy way to make icons for your application, Roman Nurik's asset studio is really great: http://android-ui-utils.googlecode.com/hg/asset-studio/dist/index.html