Change ActionBar tabs color - android-actionbar

I am using the appcompat support library and I want to change the color of the action bar tabs. I found these instructions in which the customize tab indicator section suggests creating a file res/drawable/actionbar_tab_indicator.xml declaring a specific background image for several different states of an action bar tab.
actionbar_tab_indicator.xml looks like :
<!-- STATES WHEN BUTTON IS NOT PRESSED -->
<!-- Non focused states -->
<item android:state_focused="false" android:state_selected="false"
android:state_pressed="false"
android:drawable="#drawable/tab_unselected" />
...
The #drawable/* images are nine patches.
However, i do not want to get involved in creating nine-patches images. Is there another way to change the actionbar tab's color?

I wrote an answer to that question 1 year ago.
You can find in here:
Change Color TabSelector on v4 ViewPager

Related

How to make a transparent modal with React Navigation 6 and expo

I have just upgraded from React navigation 5 to 6 and looked at the doc for transparent modals. Unfortunately, I cannot get the previous screen to show under the modal. Instead, I get a gray background.
I have made a snack with my code to showcase my result: https://snack.expo.dev/#divone/transparent-modal-not-working
What am I doing wrong? I seem to have all the elements listed in the doc for it to work.
I am on the managed workflow of expo SDK 43.
This works for me. I had a lot of trouble specifying the background colour without it ignoring transparency and completely covering the background in a solid colour. It seems like you need to specify this information for a group, rather than for the specific screen.
You were also assigning properties which the typescript compiler did not think were valid for React Navigation 6. Check that your text editor is showing the compiler errors as you type.
<Stack.Group
screenOptions={{
presentation: "transparentModal",
contentStyle: { backgroundColor: "#40404040" },
}}
>
<Stack.Screen key="ModalScreen" name="ModalScreen" component={ModalScreen} />
</Stack.Group>

Prevent menu text from ellipsizing

I have a fairly straightforward menu that I am showing in an Activity, but some of the menu items have text that is too long to fit on screen. The default behavior for menus appears to be ellipsizing the text, as shown below.
Menu XML that I'm inflating in onCreateOptionsMenu():
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="#+id/menu_too_long"
android:title="This text is a tad too long"
android:icon="#drawable/ic_glass_logo"/>
</menu>
Is it possible to get the menu item text to adjust its size or wrap to a second line when it is too long? In other words, I would like menus inflated from XML to behave more like CardBuilder.Layout TEXT.
I would like to avoid creating my own menu and continue using Glass's built-in menu APIs.
Changing the formatting of the menu labels is not possible through public APIs. From a UX point of view, menu labels longer than two or three words seems undesirable. Consider that if you enable voice menus in your application, those commands should be brief that the user can speak them conveniently.
If the length of your menu text is because there is supplemental information that you can separate from the "action" that the menu performs, consider using MenuUtils.setDescription to move the supplemental information into the footer of the menu item, which can hold more content. You can call this method from within onCreateOptionsMenu or onPrepareOptionsMenu.

Android action bar 'overlay'

Im working on an android application that uses an action bar - which all works well.
One thing I would like to do is to display the 'underscore' of the icon that has been selected - I believe a kind of a graphic overlay so that the user knows what section they are in. This has been done in many apps but I'm not sure if its possible with the action bar .
This image shows a bar under the home icon in use on the twitter app, can it be done?
Overlaying action bar provide great effect on layouts,
Use android:windowActionBarOverlay for name keyword in item tag
<resources>
<!-- the theme applied to the application or activity -->
<style name="CustomActionBarTheme"
parent="#android:style/Theme.Holo">
<item name="android:windowActionBarOverlay">true</item>
</style>

Android: How to write text under the icon in the actionbar

I would like to write under the text in the action bar so i use this xml:
<item
android:id="#+id/Home"
android:icon="#drawable/ic_action_home"
android:showAsAction="always|withText"
android:title="home"/>
<item
android:id="#+id/Refresh"
android:icon="#drawable/ic_action_refresh"
android:orderInCategory="100"
android:showAsAction="always|withText"
android:title="refresh"/>
although i write:
android:showAsAction="always|withText"
this what i get :
How could I write text under the icons ?
'always|withText' only works if there is sufficient room. Else, it will only place icon. In your case, you've got several icons there which does not leave any spare room for text.
You've got two options:
Reduce the icons by moving them either to an overflow menu or somewhere else in your UI.
Design images which consist both icon and text and use them as your icons.
Edit: Well, here's a lot better answer: https://stackoverflow.com/a/12225863/2511884

Horizontal scrollbar in APEX 4.2.1 Classic report

To enable horizontal scrollbars in a table I need to style the containing DIV with "overflow: auto", highlighted in blue.
I tried it with FireBug and got the desired result. Just can't figure out out how to put the setting into APEX.
Using the theme "Blue Responsive".
I've played with this a bit in Apex 4.2.2, it should work the same in 4.2.1 I think. That particular div doesn't come from any template but you can target it with some CSS.
In the page properties, for CSS Inline, I entered the following and it seemed to work:
#report_2583625959157728_catch {overflow:auto}
(I think I've transcribed the correct id from your screenshot - you may need to check)
Unfortunately this means you'd have to do this for each report in your application individually where you want the scrollbar to appear.
Note: I haven't tested this in IE, however - last time I was mucking around with scrolling areas I found it incredibly frustrating to get it working in IE without breaking other functionality in the region - especially for Interactive reports.
You can add to Region Header:
<div style="overflow:auto;">
and to Region Footer
</div>
You can also add your css line to a report region template, if you want the scrollbar to be added to each report.
Other wise you're better of putting the overflow on a class and add it to your application's stylesheet, eg:
.myClass {overflow:auto}
you get more flexibilty to style your region this way. You can add the class to your report by setting the region attributes to class="myClass".
Note that instead of "auto", you can also try to use the element option "scroll", check the w3schools docs: http://www.w3schools.com/cssref/pr_pos_overflow.asp