Skip to content

Commit

Permalink
Merge pull request #5390 from salachi/TIMOB-16353
Browse files Browse the repository at this point in the history
[TIMOB-16353] Use TiTranslucentActivity if the backgroundcolor is transpar...
  • Loading branch information
vishalduggal committed Mar 7, 2014
2 parents 93adf69 + 84da98b commit e4d4dcd
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import ti.modules.titanium.ui.widget.TiView;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.PixelFormat;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
Expand Down Expand Up @@ -359,6 +360,11 @@ private void fillIntent(Activity activity, Intent intent)
}
if (!modal && hasProperty(TiC.PROPERTY_OPACITY)) {
intent.setClass(activity, TiTranslucentActivity.class);
} else if (hasProperty(TiC.PROPERTY_BACKGROUND_COLOR)) {
int bgColor = TiConvert.toColor(properties, TiC.PROPERTY_BACKGROUND_COLOR);
if (Color.alpha(bgColor) < 0xFF) {
intent.setClass(activity, TiTranslucentActivity.class);
}
}
if (hasProperty(TiC.PROPERTY_WINDOW_PIXEL_FORMAT)) {
intent.putExtra(TiC.PROPERTY_WINDOW_PIXEL_FORMAT, TiConvert.toInt(getProperty(TiC.PROPERTY_WINDOW_PIXEL_FORMAT), PixelFormat.UNKNOWN));
Expand Down

0 comments on commit e4d4dcd

Please sign in to comment.