[TIMOB-13367] Android: View borderRadius not working
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-04-07T19:44:56.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 3.1.0, 2013 Sprint 07 Core, 2013 Sprint 07 |
Components | Android |
Labels | borderRadius, module_views, qe-testadded, triage, view |
Reporter | Carter Lathrop |
Assignee | Allen Yeung |
Created | 2013-01-31T08:39:04.000+0000 |
Updated | 2013-06-26T21:52:20.000+0000 |
Description
*Problem*
borderRadius not working in android versions 2.4 and below.
borderRadius also not working when Force GPU Rendeing is turned on.
I have the below code running using in device using Android 2.2 but the border radius is not showing. i also attached the build log file:
*Steps to Reproduce*
1. copy and past provided code in app.js
2. if testing on android device with OS > 2.4, go to dev options and turn on "Force GPU Rendering"
3. Run the code
4. notice borderRadius is not enforced.
5. if on android OS version 2.4 or below, the option should not be available but should show the bug regardless
*Test Code to Reproduce*
var mainWindow = Ti.UI.createWindow({
title : 'Lab',
backgroundColor : 'white',
fullscreen : false,
navBarHidden : true,
exitOnClose : true,
orientationModes : [Titanium.UI.PORTRAIT]
});
var portletView = Ti.UI.createView({
width : 200,
height : 220,
borderRadius : 20,
borderWidth : 1,
backgroundColor : '#b2b2b2',
zIndex : 1,
left : 100,
top : 100
});
mainWindow.add(portletView);
mainWindow.open();
Attachments
File | Date | Size |
---|---|---|
berderRadius_visible.png | 2013-03-05T20:58:28.000+0000 | 851357 |
build.log | 2013-01-31T08:39:04.000+0000 | 14487 |
Screenshot_2013-01-31-10-28-17.png | 2013-01-31T08:39:04.000+0000 | 11878 |
see discussion thread here http://developer.appcelerator.com/question/144371/borderradius-not-working-on-android-versions--400
Hello, Just to clarify, which Android OS versions are you experiencing this problem on? In the environment section you posted Android 4.0.4 but in the description you said 2.2. Is the problem happening on both platforms or just one? Can you test to see if this problem is happening on any other OS versions? The more information we can gather, the better. BTW, Just tested the code on a Galaxy SIII and the borderRadius is working as expected. Regards, Carter
my device uses Android 4.0.4 and i compiled the code against Android API level 12 (3.1).
in the studio application installer i selected "google APIs Android 3.1 [armeabli]"
Sameeh, Just curious, why use api lvl 12 when the minSdkVersion for 4.0.3, 4.0.4, and 4.0.5 is 15? http://developer.android.com/about/versions/android-4.0.3.html Regards, Carter
because i want to develop,compile, and test in an environment that supports Android 3.1 as minimum version not just 4.0.x so the app is available for different platforms
Hello Sameeh, Just a few more things before I move to Ti-Mobile. I have tested on my device (Galaxy 4.1.1) and even when editing the tiapp.xml to include the lines you posted in a previous comment, I could not reproduce. Could you do me a favor and change the android tag contents in tiapp.xml to its default value of:
and let me know if the bug still persists. Also can you confirm any other platforms that this is breaking on? Have you tested on another device and seen the same problem? Thank you for your patience as I continue to gather information and test cases on other devices. Carter
i retested using the above settings with SDK 3.0.2.GA. the problem still occurs in android but works great on iOS. note that in the "Titanium Android Application Installer" i am selecting "Google APIs Android 3.1 armeabi]" and even if i select "Google APIs Android 2.2 armeabi]" i still dont get my rounded corners. do you think there is kind of a caching problem??
borderRadius is not working in buttons too, i think the problem is with "android:hardwareAccelerated" option, which is enabled by default when using
yes same for buttons
in my tiapp.xml,
AND with "Developer options -> Force gpu rendering" disabled on the device, makes the borderRadius work. The problem is the huge speed drop.
yess same here, i just tested it with Force gpu rendering off and it worked. now should we wait for an SDK release to fix this??
Tested using provided code in description on Android emulator run configurations: Titanium Android Application Installer: Google APIs Android 3.1 [armeabi] Titanium Android Emulator: Android 3.1 [armeabi] on Ti SDK 3.0.2GA With tiapp.xml android tag:
and could not reproduce bug. I still have rounded corners. See picture attached. Please provide any and all information that may be missing here. Are these the steps you are using to reproduce this bug? If not, please provide a clear and detailed list of steps to reproduce (add to description) so that we may see the problem. Thank you.
I tested on galaxy tab 2 android 4.1.1 and it works, however in my Xoom 2 Android 4.0.4 its not working, is not showing rounded corners with "force gpu rendering" enabled. Sameeh Harfoush also related the same problem on Xperia P Android 4.0.4 it works fine in the emulator here, so this problem may be related to hardware acceleration in Android 4.0.4.
Hello, I just faced this problem today. Here are my tests: Context: Device: HTC Sensation OS: Android 4.0.3 Titanium SDK: 3.0.2.GA (Implemented with Alloy) Test #1: --------- Android SDK: 2.3.3 Force GPU : enabled Result: borderRadius does not work Test #2: --------- Android SDK: 2.3.3 Force GPU : disabled Result: borderRadius works Test #3: --------- Android SDK: 4.0.3 Force GPU : enabled Result: borderRadius does not work Test #4: --------- Android SDK: 4.0.3 Force GPU : disabled Result: borderRadius works So it seems to be a problem with the GPU rendering and does not seem to depend on Android SDK version.
any idea if the fix will be available in Release 3.1.0 ?
Just want to clarify a thing, this problem occurs when: 1. the force gpu option of developer tools menu has been turned on. 2. the hardware acceleration was activated in the manifest at application level with:
This might have been fixed by the fix for TIMOB-12500
Confirmed that this has been fixed in 3.1.0. I tested on Droid Razr MAXX HD with Force GPU rendering on/off.
Tested with: SDK:3.1.2.v20130617140100 Appcelerator Studio: 3.1.1.201306131423 OS: OSX 10.7.5 Device:Google nexus(v 4.0.4) Xcode: 4.6 alloy: 1.1.3-cr acs: 1.0.2 npm: 1.2.14 titanium: 3.1.1-cr titanium-code-processor: 1.0.1-cr5 View borderRadius works fine.