Skip to content

Commit

Permalink
Backport transparent QsbConnector
Browse files Browse the repository at this point in the history
  • Loading branch information
amirzaidi committed Aug 25, 2017
1 parent 0664e5e commit d199f13
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 22 deletions.
9 changes: 9 additions & 0 deletions res/drawable/bg_pixel_qsb_connector.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:startColor="@android:color/transparent"
android:endColor="@color/qsb_connector_gradient_end_color"
android:angle="0.0"
android:right="@dimen/qsb_connector_gradient_end_padding" />
</shape>
1 change: 1 addition & 0 deletions res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,5 @@

<color name="qsb_connector">#fff2f2f2</color>
<color name="qsb_background">#ffffffff</color>
<color name="qsb_connector_gradient_end_color">#66ffffff</color>
</resources>
1 change: 1 addition & 0 deletions res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -224,4 +224,5 @@
<dimen name="qsb_touch_extension">20.0dip</dimen>
<dimen name="qsb_shadow_blur_radius">1.0dip</dimen>
<dimen name="qsb_key_shadow_offset">1.0dip</dimen>
<dimen name="qsb_connector_gradient_end_padding">20.0dip</dimen>
</resources>
23 changes: 1 addition & 22 deletions src/com/android/launcher3/pixel/QsbConnector.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,28 +56,7 @@ private void stopRevealAnimation() {
}

private void retrieveGoogleQsbBackground() {
Drawable drawable = null;
try {
final Context context = this.getContext();
final Resources resourcesForApplication = context.getPackageManager().getResourcesForApplication("com.google.android.googlequicksearchbox");
final int identifier = resourcesForApplication.getIdentifier("bg_pixel_qsb_connector", "drawable", "com.google.android.googlequicksearchbox");
if (identifier == 0) {
return;
}
final Context context2 = this.getContext();
try {
drawable = resourcesForApplication.getDrawable(identifier, context2.getTheme());
if (drawable == null) {
this.setBackgroundResource(R.color.qsb_connector);
return;
}
}
catch (Exception ex) {
Log.d("QsbConnector", "Error loading connector background", ex);
}
}
catch (Exception ex3) {}
this.setBackground(drawable);
this.setBackground(getResources().getDrawable(R.drawable.bg_pixel_qsb_connector, getContext().getTheme()));
}

private void updateAlpha(final int m) {
Expand Down

4 comments on commit d199f13

@Rizwanmohdd
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

everything is fines... looks cool but can you please guide me how to install this stuff

@Rizwanmohdd
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am talking about overall pixel launcher

@amirzaidi
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amandabe
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who install the source code ? :C

Please sign in to comment.