Android action bar home button not including activity title - actionbarsherlock

I am using the home button of the main Activity of my IM app to allow the user to change their availability status. My app is using ActionBarSherlock, which falls back to the native implementation where supported.
However, the size of the tappable area is inconsistent between Android releases:
On Android 4.2.0 and before (including the compatibility library), only the icon is tappable:
On Android 4.2.1+, icon and activity name are tappable:
How can I make the tappable area consistently include icon and activity title on all versions of Android?

I am using ActionBarCompat (and you should probably update, if you haven't already), so this may not behave exactly the same. I wanted the full title to be clickable for using the navigation drawer. For some reason, using a custom logo instead of the text makes the whole thing automatically clickable, where only the icon could be clicked before:
final ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayShowTitleEnabled(false);
actionBar.setDisplayUseLogoEnabled(true);
actionBar.setLogo(R.drawable.im_title);
I don't know if it's possible to trigger that change while still using text with the default icon, but the setDisplay... methods and flags may be a good place to start looking.

Related

Find the View and container Fargment information from Click event captures in profiler

I am profiling a new application I am working with. I can see the captured pink circle, I want to find out where the view is ,In which fragment and where the click listener is defined.
Here I can only see the activity information.
It's a big project.
If you are using the latest version of Android Studio, when hovering over the green bar near the top, there should be a tooltip showing the Activity and Fragment.
Regarding how to find out the View, have you tried Android Studio's Layout Inspector? I don't know a single-click way to locate the listener but it may be feasible once you locate the view.

After upgrading to Android Studio 4.1 why doesn't the text in my CheckBox controls display in runtime (but does display in design mode)?

Here's a snapshot of my app where you can see the running app which has missing text and you can see the text that should be displaying (which is properly displaying in design mode).
Why isn't the text displaying at runtime?
This only started happening when I updated to version 4.1 of Android Studio and rebuilt my app.
Additionally, here is how they are defined in the layout xml:
Here's a view of the layout details of the one checkbox that is not displaying the text:
Notice that it is showing text size in PT (points).
I changed it to sp after choosing from droplist and now it displays properly.
Not sure why this has always worked in the past and suddenly stopped working.
If it is a change I would expect an auto-update functionality when Android Studio upgrades the project.
Should Not Work In Design Mode Either
If it is a problem I would also expect it to display improperly in the Design Mode also. Instead it looks correct in design mode even though runtime doesn't display it. In this way I would've understood that I was using an incorrect unit.
TextView Also
I found that this was also happening in many of my TextView controls.

Android Studio 3.5.3 show Design view empty but build is Successful

newbie in Android studio. Using Android Studio 3.5.3 to create app and the Build is Successful
I have the default MainActivity and activity_main.xml
Problem:
when I clicked on the activity_main.xml
- The Design view empty. Thus I can not drag UI like Plain text or others onto the Design activity Layout
Made changes in Style.xml
added the Base in below:
1) style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar"
but this does not work.
Need your help to solve this problem.
Thanks
#MikeBottle, There might be a couple of things going on here. It could be because your activity doesn't have theme assigned.
Please check this:
Note: In the design view, when you click the eye icon, it will give you the options to show / hide the layout decorations. It includes the top and bottom status bars. Please check if that changes anything.
Also, make sure the activity has theme assigned.
For the reference, I also included the layout preview to demonstrate how it look when show layout decorations is not checked.

uiwebview preventing access to buttons on uitoolbar

Am I thick or what? I have a view controller, and within that there is a UIWebView. When I run the app, the WebView covers the UIToolbar at the bottom and the UIButtons there, and so you cannot navigate away from the WebView. I cannot figure out how to change the WebView size or behaviour.
Unfortunately I do not have sufficient rep to post screenshots. The WebView displays an html file with text. The WebView partially covers the status bar at the top and completely covers the taskbar at the bottom. I can touch and drag the view up to see the taskbar and buttons at the bottom, but cannot use them.
I am using storyboard to build the app, and have done similar apps before without issue (in iOS6) but iOS7 appears to have thrown me a curveball.
I cannot see how to change the size in Xcode - or should I be looking at the html code in the file that the WebView is calling?
Oddly enough this is no longer an issue, I have not made any changes to code or config, and the only thing different is I upgraded my version of X-Code

Browser Window Gone in Latest Xcode?

Has the browser window been removed from the latest version of Xcode? I've seen this window in an iOS class I watched online and again in a book I have. I can't find anything in the View menu to turn it on.
I'm running Lion and the latest version of Xcode. I created a new project with Core Data turned on and then built it. I then clicked on .xcdatamodeld file and I get a graphic window with the default table in it.
Do you mean the project browser on the left? You enable that using the 'view' buttons on the right side of the toolbar.
The toolbar might be hidden though, so go to the view menu and select "Show toolbar" if needed.
Then select the fourth button from the right on the toolbar, it is the first button in the set of view buttons. This shows the Navigator View on the left of your screen, which has 7 selectors on the top. The leftmost will give you the project browser (project navigator), the one next to it is the symbol navigator.
I hate to be answering my own question again. I like to keep my answer rate at 100%. Since I didn't get a response here, I tried the Apple developer forums. It turn out the Xcode 4.* changed the interface and this series of windows no longer exist. The same functions can be found in other locations.

Resources