Android Question A few question with StdActionBar

incendio

Well-Known Member
Licensed User
Longtime User
Hi guys,

I am testing StdActionBar.

Attached is a two screen shoot from Nexus 7 on a portrait mode, one made with StdActionBar, the other with TabHostExtra

I have a few questions for StdActionBar :
1) The title is overlapped with Tab title, is it possible to make StdActionBar title on the first row and Tab title on the second row, just like the display on the phone.
I have set this on Manifest Editor
SetApplicationAttribute(android:uiOptions, "splitActionBarWhenNarrow")

2) The EditText style in StdActionBar is different with EditText style in TabHostExtra. On TabHost, EditText look like a box, while on StdActionBar, it is just a line. Is it possible on StdActionBar to have an EditText like TabHostExtra?

Thanks in advance.
 

Attachments

  • Screenshot_2014-04-18-11-54-33.png
    Screenshot_2014-04-18-11-54-33.png
    384.9 KB · Views: 198
  • Screenshot_2014-04-18-11-54-00.png
    Screenshot_2014-04-18-11-54-00.png
    234.7 KB · Views: 220

Erel

B4X founder
Staff member
Licensed User
Longtime User
1) I don't see the title in any of these images. However this is how the native action bar looks in tabs mode. You cannot change it.

2) This is not related to StdActionBar. Your old program didn't set android:targetSdkVersion="14" in the manifest editor, so the style used was the old style. This is how EditText looks in Android 4+ (holo theme).
 
Upvote 0

incendio

Well-Known Member
Licensed User
Longtime User
1) I don't see the title in any of these images. However this is how the native action bar looks in tabs mode. You cannot change it.

2) This is not related to StdActionBar. Your old program didn't set android:targetSdkVersion="14" in the manifest editor, so the style used was the old style. This is how EditText looks in Android 4+ (holo theme).

Thanks for you replied.

About Title, if cannot change is ok.

But with EditText, I didn't change manifest editor, i use the default, and my Basic4Android ver is 3.5.

However, to make sure, I edited manifest editor so it look like this :
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="14"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
SetApplicationAttribute(android:theme, "@android:style/Theme.Holo.Light")
SetApplicationAttribute(android:theme, "@style/Theme.Pos")
SetApplicationAttribute(android:uiOptions, "splitActionBarWhenNarrow")
AddPermission (android.permission.ACCESS_WIFI_STATE)

Still no change in EditText style.

I use Theme.Pos to change Tab indicator color. Could it be the cause? But I have tried to restore the whole res folder to its default, still no change.

Could you pint me where to look the problem? Thanks.
 
Last edited:
Upvote 0

incendio

Well-Known Member
Licensed User
Longtime User
I think, i found the problem, it it cause by
SetApplicationAttribute(android:theme, "@android:style/Theme.Holo")

I think this Theme set the EditText field, to look like only a line.

Just running the ActionBar sample, add EditText, and no other modifications made.
And EditText style is an old fashion.

Is this true that Theme.Holo doesn't support new EditText style (the one with a outline border) and StdActionBar can only used Holo Theme family?
 
Last edited:
Upvote 0
Top