Hi.
I'm developing a device only with a touchscreen.
How to make active the bottom panel with buttons (back, home, menu) in Android 4.0.3?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi.
I'm developing a device only with a touchscreen.
How to make active the bottom panel with buttons (back, home, menu) in Android 4.0.3?
To show the soft Navigation bar, you need to enable this in the device-specific overlay.
The following patch was applied to device/ti/omap3evm to enable this feature on AM37x evm. You need to do something similar for your device
http://gitorious.org/rowboat/vendor-ti-omap3evm/commit/65a072363d40c8b56ce855d22d202291697fd748
If so: <bool name="config_showNavigationBar"> true </ bool>
In Android ICS for AM335x it already is, but I do not see Navigation bar on the screen.
What should I change?
Could you give your LCD resolution? Do you see a black strip after Navigation bar is enabled.
Androyd package: TI-Android-ICS-4.0.3-DevKit-EVM-SK-3.0.1.bin
The default settings for the board am335xevm.
Run on the board am335xevm (TMDXEVM3358).
LCD resolution default.
But I do not see Navigation bar.
How do I turn Navigation bar?
Base in previous comments in this same post.
I found 2 references to this in code, I must clarify I am doing reference to OMAP4 instead of AM335 but the part of ICS should be similar, I am trying to download source code but it is taking some time now. #1 could apply or not, it could be different configuration.
1. In device directory it is possible to configure between
./mydroid/device/ti/blaze_tablet/device.mk
(http://git.omapzoom.org/?p=device/ti/blaze_tablet.git;a=blob;f=device.mk;h=a34994494a52d610ac96f1d69fc381500ef53b31;hb=HEAD)
PRODUCT_CHARACTERISTICS := tablet
this is not in Blaze that is not tablet device.
By tracing it back it goes to next file where the variable name is changed in previous product.mk then assigned to a system property.
./mydroid/build/tools/buildinfo.sh
(http://git.omapzoom.org/?p=platform/build.git;a=blob;f=tools/buildinfo.sh;h=e3fe99c1114fb6266fec0371c06fd6449106a2af;hb=HEAD)
echo "ro.build.characteristics=$TARGET_AAPT_CHARACTERISTICS"
like build system is different in rowboat then you could add the property to other file, something like
ro.build.characteristics=tablet
in one of next files in blue,
./mydroid/bionic/libc/include/sys/_system_properties.h
possible locations are next ones, they come from _system_properties.h mentioned earlier
#define PROP_PATH_RAMDISK_DEFAULT "/default.prop"
#define PROP_PATH_SYSTEM_BUILD "/system/build.prop"
#define PROP_PATH_SYSTEM_DEFAULT "/system/default.prop"
#define PROP_PATH_LOCAL_OVERRIDE "/data/local.prop"
similar post for Panda https://groups.google.com/forum/#!msg/android-building/0SwfeEiZHVY/oepl4PzsM3sJ
2. The points where code makes distinction between statusbar and systembar are:
a) loads SystemUIServer in ./mydroid/frameworks/base/services/java/com/android/server/SystemServer.java
(http://git.omapzoom.org/?p=platform/frameworks/base.git;a=blob;f=services/java/com/android/server/SystemServer.java;h=3ae62add369f26615b89a0f781d8f539a3f8d8e8;hb=df331873c8576e0ae34ae1ee3cc258beed373535)
static final void startSystemUi(Context context) {
Intent intent = new Intent();
intent.setComponent(new ComponentName("com.android.systemui",
"com.android.systemui.SystemUIService"));
Slog.d(TAG, "Starting service: " + intent);
context.startService(intent);
}
b) it select between both ./mydroid/frameworks/base/packages/SystemUI/src/com/android/systemui/SystemUIService.java
(http://git.omapzoom.org/?p=platform/frameworks/base.git;a=blob;f=packages/SystemUI/src/com/android/systemui/SystemUIService.java;h=0a5749938aec015a43e1c1409f00da86f872849e;hb=HEAD)
@Override
public void onCreate() {
// Pick status bar or system bar.
IWindowManager wm = IWindowManager.Stub.asInterface(
ServiceManager.getService(Context.WINDOW_SERVICE));
try {
SERVICES[0] = wm.canStatusBarHide()
? R.string.config_statusBarComponent
: R.string.config_systemBarComponent;
} catch (RemoteException e) {
Slog.w(TAG, "Failing checking whether status bar can hide", e);
}
c) one message about this variable ./mydroid/frameworks/base/core/java/android/view/WindowManagerPolicy.java
(http://git.omapzoom.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/view/WindowManagerPolicy.java;h=09948b8e64f2d9e2646a6f6ca467e37c8f361f4f;hb=HEAD)
/**
* Return true if the policy allows the status bar to hide. Otherwise,
* it is a tablet-style system bar.
*/
public boolean canStatusBarHide();
d) another message related to this ./mydroid/frameworks/base/core/java/android/view/ViewConfiguration.java
(http://git.omapzoom.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/view/ViewConfiguration.java;h=823befb22f7b83befabc8530d7b8eb3857c79cb0;hb=HEAD)
if (!sHasPermanentMenuKeySet) {
IWindowManager wm = Display.getWindowManager();
try {
sHasPermanentMenuKey = wm.canStatusBarHide() && !wm.hasNavigationBar();
sHasPermanentMenuKeySet = true;
} catch (RemoteException ex) {
sHasPermanentMenuKey = false;
}
}
e) there is a limitation about the screen size to be 600dp, ./mydroid/frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
(http://git.omapzoom.org/?p=platform/frameworks/base.git;a=blob;f=policy/src/com/android/internal/policy/impl/PhoneWindowManager.java;h=25da6427de556b58f715f5f8aa8e339b2da69686;hb=HEAD)
// Determine whether the status bar can hide based on the size
// of the screen. We assume sizes > 600dp are tablets where we
// will use the system bar.
int shortSizeDp = shortSize
* DisplayMetrics.DENSITY_DEFAULT
/ DisplayMetrics.DENSITY_DEVICE;
mStatusBarCanHide = shortSizeDp < 600;
mStatusBarHeight = mContext.getResources().getDimensionPixelSize(
mStatusBarCanHide
? com.android.internal.R.dimen.status_bar_height
: com.android.internal.R.dimen.system_bar_height);
and in this same file it is selected the option you mentioned about mHasNavigationBar
mHasNavigationBar = mContext.getResources().getBoolean(
com.android.internal.R.bool.config_showNavigationBar);
// Allow a system property to override this. Used by the emulator.
// See also hasNavigationBar().
String navBarOverride = SystemProperties.get("qemu.hw.mainkeys");
if (! "".equals(navBarOverride)) {
if (navBarOverride.equals("1")) mHasNavigationBar = false;
else if (navBarOverride.equals("0")) mHasNavigationBar = true;
}
then things to check are that tablet characteristic is added in build process, it must select correct system bar, and that your screen is big enough to pass the configuration parameters.
Other identical issue is when it is a non-standard screen size and it requires some adjustments to show the systembar because screen is not correctly configured and the systembar is below the bottom.
some reference to this variable use can be found in next location
/27.IS.2/mydroid/bionic/libc/bionic/system_properties.c
/27.IS.2/mydroid/bionic/libc/include/sys/_system_properties.h
/27.IS.2/mydroid/bionic/libc/include/sys/system_properties.h
2. second method can be assigning variable's value at boot time
/default.prop
/system/build.prop
or compilation time in /27.IS.2/mydroid/device/ti/blaze/system.prop
either way is by adding one of next commands to .prop file
touchscreen.wakeup=1
or
touchscreen.wakeup=0
possible locations are next ones, they come from _system_properties.h mentioned earlier
#define PROP_PATH_RAMDISK_DEFAULT "/default.prop"
#define PROP_PATH_SYSTEM_BUILD "/system/build.prop"
#define PROP_PATH_SYSTEM_DEFAULT "/system/default.prop"
#define PROP_PATH_LOCAL_OVERRIDE "/data/local.prop"
Thanks for the answer.
Also, I noticed when in the file: ./mydroid/device/ti/am335xevm/device.mk
comment out line:
# KeyPads
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/gpio-keys.kl:system/usr/keylayout/gpio-keys.kl \
$(LOCAL_PATH)/matrix-keypad.kl:system/usr/keylayout/matrix-keypad.kl
That NavigationBar is presented.