mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 02:38:20 +00:00
Merge "Refactor taskbar divider view to IconButtonView" into udc-qpr-dev
This commit is contained in:
@@ -13,8 +13,18 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle" >
|
||||
<solid android:color="@color/taskbar_divider_background"/>
|
||||
<corners android:radius="1dp" />
|
||||
</shape>
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="52dp"
|
||||
android:height="52dp"
|
||||
android:viewportHeight="52"
|
||||
android:viewportWidth="52">
|
||||
<group>
|
||||
<path
|
||||
android:fillColor="@color/taskbar_divider_background"
|
||||
android:pathData="M26,11L26,41"
|
||||
android:strokeColor="@color/taskbar_divider_background"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeWidth="2" />
|
||||
</group>
|
||||
</vector>
|
||||
@@ -13,16 +13,9 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<FrameLayout
|
||||
<com.android.launcher3.views.IconButtonView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="@dimen/taskbar_icon_min_touch_size"
|
||||
android:layout_height="@dimen/taskbar_icon_min_touch_size"
|
||||
android:contentDescription="@string/taskbar_divider_a11y_title"
|
||||
android:backgroundTint="@android:color/transparent">
|
||||
|
||||
<View
|
||||
android:layout_height="32dp"
|
||||
android:layout_width="2dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/taskbar_divider_bg" />
|
||||
</FrameLayout>
|
||||
android:backgroundTint="@android:color/transparent" />
|
||||
@@ -88,7 +88,7 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
|
||||
private @Nullable IconButtonView mAllAppsButton;
|
||||
|
||||
// Only non-null when device supports having an All Apps button.
|
||||
private @Nullable View mTaskbarDivider;
|
||||
private @Nullable IconButtonView mTaskbarDivider;
|
||||
|
||||
private View mQsb;
|
||||
|
||||
@@ -158,8 +158,12 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
|
||||
mActivityContext.getColor(R.color.all_apps_button_color));
|
||||
|
||||
if (FeatureFlags.ENABLE_TASKBAR_PINNING.get()) {
|
||||
mTaskbarDivider = LayoutInflater.from(context).inflate(R.layout.taskbar_divider,
|
||||
mTaskbarDivider = (IconButtonView) LayoutInflater.from(context).inflate(
|
||||
R.layout.taskbar_divider,
|
||||
this, false);
|
||||
mTaskbarDivider.setIconDrawable(
|
||||
resources.getDrawable(R.drawable.taskbar_divider_button));
|
||||
mTaskbarDivider.setPadding(mItemPadding, mItemPadding, mItemPadding, mItemPadding);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user