Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16909] Android: Anti-aliasing does not work properly in views

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2015-01-27T16:22:49.000+0000
Affected Version/sRelease 3.2.2
Fix Version/sRelease 4.0.0
ComponentsAndroid
Labelsn/a
ReporterFix Please
AssigneeHieu Pham
Created2014-05-02T14:39:55.000+0000
Updated2015-03-13T00:12:37.000+0000

Description

See the attached image. 1. Seems there is no anti-aliasing at all in case of borderWidth="0" 2. Anti-aliasing is not good (especially on the border inner) in case of borderWidth>"0" 2. Seems the border alpha channel (opacity) is being ignored and the corresponding view opacity is being used instead. The markup:
<Alloy>
	<Window class="container">
		<View id="backgroundView" backgroundColor="white" width="Ti.UI.FILL" height="Ti.UI.FILL">
      <!-- 50x50x50 -->
      <View top="10" left="10" backgroundColor="black" opacity="0.5" width="50" height="50" borderRadius="50" borderWidth="0" borderColor="transparent"></View>
      <View top="70" left="10" backgroundColor="black" opacity="0.5" width="50" height="50" borderRadius="50" borderWidth="0" borderColor="black"></View>
      <View top="130" left="10" backgroundColor="black" opacity="0.5" width="50" height="50" borderRadius="50" borderWidth="0" borderColor="#0000"></View>
      <View top="190" left="10"  backgroundColor="black" opacity="0.5" width="50" height="50" borderRadius="50" borderWidth="0" borderColor="#f000"></View>
      
      <View top="10" left="40" backgroundColor="black" opacity="0.5" width="50" height="50" borderRadius="50" borderWidth="1" borderColor="transparent"></View>
      <View top="70" left="40" backgroundColor="black" opacity="0.5" width="50" height="50" borderRadius="50" borderWidth="1" borderColor="black"></View>
      <View top="130" left="40" backgroundColor="black" opacity="0.5" width="50" height="50" borderRadius="50" borderWidth="1" borderColor="#0000"></View>
      <View top="190" left="40"  backgroundColor="black" opacity="0.5" width="50" height="50" borderRadius="50" borderWidth="1" borderColor="#f000"></View>
      
      <View top="10" left="70" backgroundColor="black" opacity="0.5" width="50" height="50" borderRadius="50" borderWidth="3" borderColor="transparent"></View>
      <View top="70" left="70" backgroundColor="black" opacity="0.5" width="50" height="50" borderRadius="50" borderWidth="3" borderColor="#0f00"></View>
      <View top="130" left="70" backgroundColor="black" opacity="0.5" width="50" height="50" borderRadius="50" borderWidth="3" borderColor="#f0f0"></View>
      <View top="190" left="70" backgroundColor="black" opacity="0.5" width="50" height="50" borderRadius="50" borderWidth="3" borderColor="#f00f"></View>

      <!-- 50x50x25 -->
      <View top="10" left="130" backgroundColor="black" opacity="0.5" width="50" height="50" borderRadius="25" borderWidth="0" borderColor="transparent"></View>
      <View top="70" left="130" backgroundColor="black" opacity="0.5" width="50" height="50" borderRadius="25" borderWidth="0" borderColor="#black"></View>
      <View top="130" left="130" backgroundColor="black" opacity="0.5" width="50" height="50" borderRadius="25" borderWidth="0" borderColor="#0000"></View>
      <View top="190" left="130"  backgroundColor="black" opacity="0.5" width="50" height="50" borderRadius="25" borderWidth="0" borderColor="#f000"></View>
      
      <View top="10" left="160" backgroundColor="black" opacity="0.5" width="50" height="50" borderRadius="25" borderWidth="1" borderColor="transparent"></View>
      <View top="70" left="160" backgroundColor="black" opacity="0.5" width="50" height="50" borderRadius="25" borderWidth="1" borderColor="#black"></View>
      <View top="130" left="160" backgroundColor="black" opacity="0.5" width="50" height="50" borderRadius="25" borderWidth="1" borderColor="#0000"></View>
      <View top="190" left="160"  backgroundColor="black" opacity="0.5" width="50" height="50" borderRadius="25" borderWidth="1" borderColor="#f000"></View>
      
      <View top="10" left="190" backgroundColor="black" opacity="0.5" width="50" height="50" borderRadius="25" borderWidth="3" borderColor="transparent"></View>
      <View top="70" left="190" backgroundColor="black" opacity="0.5" width="50" height="50" borderRadius="25" borderWidth="3" borderColor="#ff00"></View>
      <View top="130" left="190" backgroundColor="black" opacity="0.5" width="50" height="50" borderRadius="25" borderWidth="3" borderColor="#00f0"></View>
      <View top="190" left="190"  backgroundColor="black" opacity="0.5" width="50" height="50" borderRadius="25" borderWidth="3" borderColor="#f00f"></View>
      
      <!-- 80x80x25 -->
      <View top="10" left="250" backgroundColor="black" opacity="0.5" width="80" height="80" borderRadius="25" borderWidth="1" borderColor="transparent"></View>
      <View top="80" left="270" backgroundColor="black" opacity="0.5" width="80" height="80" borderRadius="25" borderWidth="1" borderColor="#black"></View>
      <View top="150" left="290" backgroundColor="black" opacity="0.5" width="80" height="80" borderRadius="25" borderWidth="1" borderColor="#0000"></View>
      <View top="220" left="310"  backgroundColor="black" opacity="0.5" width="80" height="80" borderRadius="25" borderWidth="1" borderColor="#f000"></View>
      
      <View top="10" left="340" backgroundColor="black" opacity="0.5" width="80" height="80" borderRadius="25" borderWidth="3" borderColor="transparent"></View>
      <View top="80" left="360" backgroundColor="black" opacity="0.5" width="80" height="80" borderRadius="25" borderWidth="3" borderColor="#ff00"></View>
      <View top="150" left="380" backgroundColor="black" opacity="0.5" width="80" height="80" borderRadius="25" borderWidth="3" borderColor="#f0f0"></View>
      <View top="220" left="420"  backgroundColor="black" opacity="0.5" width="80" height="80" borderRadius="25" borderWidth="3" borderColor="#000f"></View>
		</View>
	</Window>
</Alloy>

Attachments

FileDateSize
another_app.js2015-01-15T02:50:11.000+000015144
app_timob_16909.js2014-11-26T07:59:26.000+00007631
Screenshot_2014-05-02-17-04-26.png2014-05-02T14:52:42.000+000044882
square.png2015-01-15T02:50:11.000+00001548

Comments

  1. Ritu Agrawal 2014-05-04

    Moving this ticket to engineering as I can reproduce this issue on Android device (Galaxy Nexus) with the provided test case. It looks fine on iOS.
  2. Fix Please 2014-05-20

    Hi. Any update on the issue?
  3. Fix Please 2014-07-01

    Why the priority is set to low? Views looks really nasty because of this bug. Could you suggest a workaround and increase the priority, please.
  4. Ingo Muschenetz 2014-07-06

    The priority is set based in apart on the number of people requesting a fix. We will review this issue, but perhaps you can ask others to join you on this ticket.
  5. ian young 2014-08-29

    Looking forward to the fix for this issue. No anti-aliasing on rounded borders is surely a pretty big deal no? It means we can't create circular views that look any way decent on Android, including circular profile pictures, which is the current fashion after all.
  6. Fix Please 2014-09-01

    Hi ian young. I'm surprised and frustrated with such approach to bug fixing as well. But seems, I'm too tired to fight with them concerning each bug opened. We've already spent too much time with this. So we are seriously thinking about to stop wasting time and return back to native development. Unfortunately (
  7. Eduardo Silva 2014-11-27

    +1 to fix this issue. I really need this...
  8. Vinicius Oliveira 2014-12-26

    Please fix this !!!
  9. Hieu Pham 2015-01-15

    master PR: https://github.com/appcelerator/titanium_mobile/pull/6571
  10. Vishal Duggal 2015-01-27

    While the PR does not fully fix the issue for all use cases, the problem is mitigated.
  11. Lokesh Choudhary 2015-03-13

    Verified the fix. As [~vduggal] said the PR will mitigate the issue, we see minimal anti aliasing. Closing. Environment: Appc Studio : 4.0.0.201503062102 Ti SDK : 4.0.0.v20150312095013 CLI : 3.5.0-dev Alloy : 1.5.1 MAC Yosemite : 10.10.2 Nexus 5 - Android 5.0 Samsung S3 -Android 4.2.2

JSON Source