Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/upstream' into trunk
Browse files Browse the repository at this point in the history
# Conflicts:
#	build.gradle
  • Loading branch information
Goooler committed Jun 22, 2024
2 parents 071ffac + 9aac523 commit 4dfa881
Show file tree
Hide file tree
Showing 65 changed files with 2,665 additions and 1,597 deletions.
14 changes: 13 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Please make sure to be civil during discussion of your contribution (refer to th
For translation, visit [Lawnchair on Crowdin](https://lawnchair.crowdin.com) and follow these tips:

- When using quotation marks, insert the symbols specific to the target language, as listed in this [this summary table](https://en.wikipedia.org/wiki/Quotation_mark#Summary_table);
- Lawnchair uses title case for some English UI text while other languages do not use title case; opt for sentence case instead;
- Some English terminology may have not have commonly-used equivalents in other languages. In such cases, use short descriptive phrases—for example, the equivalent of _bottom row_ for _dock_;
- Some languages (e.g. French) have variations of words depending if it's masculine or feminine (gender-specific); we recommend opting for gender-neutral words instead.

Expand Down Expand Up @@ -97,3 +96,16 @@ See the table below detailing the release type:
| Beta | 02 |
| Release Candidate | 03 |
| Release | 04 |
#### String naming
Strings `names` in `strings.xml` should follow this format:
| Type | Format | Example usage | Actual string | Other information |
|--------------------------------------------------|-------------------|----------------------------|----------------------|---------------------------------------------------------------------------------------------------------------------|
| Generic word | $1 | `disagree_or_agree` | Disagree or agree | Should only be used if it doesn't fit the below categories |
| Action | $1_action | `apply_action` | Apply | Any generic action verb can fit here |
| Preference or popup label<br/>Preference headers | $1_label | `folders_label` | Folders | |
| Preference or popup description | $1_description | `folders_description` | Row and column count | |
| Preference choice | $1_choice | `off_choice` | Off | |
| Feature string | (feature_name)_$1 | `colorpicker_hsb` | HSB | Feature strings are strings that are confined to a specific feature. Examples include the gesture and color picker. |
| Launcher string | $1_launcher | `device_contacts_launcher` | Contacts from device | Strings that are specific to the Launcher area |
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ allprojects {

plugins.withType(JavaBasePlugin).configureEach {
java {
toolchain.languageVersion = JavaLanguageVersion.of(21)
toolchain.languageVersion = JavaLanguageVersion.of(17)
}
}

Expand Down
1 change: 1 addition & 0 deletions lawnchair/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL"/>
<uses-permission android:name="android.permission.MANAGE_USERS"/>
<uses-permission android:name="android.permission.FORCE_STOP_PACKAGES" />
<uses-permission android:name="android.permission.STATUS_BAR_SERVICE" />

<!--override minSdk declared in it-->
<uses-sdk tools:overrideLibrary="com.kieronquinn.app.smartspacer.sdk" />
Expand Down
8 changes: 4 additions & 4 deletions lawnchair/res/drawable/ic_lens_color.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@id/qsbIconTintPrimary" android:drawable="@drawable/ic_lens_color_1" />
<item android:id="@id/qsbIconTintQuaternary" android:drawable="@drawable/ic_lens_color_2" />
<item android:id="@id/qsbIconTintPrimary" android:drawable="@drawable/ic_lens_color_3" />
<item android:id="@id/qsbIconTintTertiary" android:drawable="@drawable/ic_lens_color_4" />
<item android:id="@id/qsbIconTintSecondary" android:drawable="@drawable/ic_lens_color_5" />
<item android:id="@id/qsbIconTintSecondary" android:drawable="@drawable/ic_lens_color_2" />
<item android:id="@id/qsbIconTintTertiary" android:drawable="@drawable/ic_lens_color_3" />
<item android:id="@id/qsbIconTintPrimary" android:drawable="@drawable/ic_lens_color_4" />
<item android:id="@id/qsbIconTintQuaternary" android:drawable="@drawable/ic_lens_color_5" />
</layer-list>

119 changes: 119 additions & 0 deletions lawnchair/res/layout/widgets_two_pane_sheet_paged_view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2023 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res-auto">

<FrameLayout
android:id="@+id/widgets_two_pane_sheet_paged_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="start"
android:paddingHorizontal="@dimen/widget_list_horizontal_margin_two_pane"
android:layout_gravity="start"
android:layout_alignParentStart="true">
<com.android.launcher3.widget.picker.WidgetPagedView
android:id="@+id/widgets_view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:descendantFocusability="afterDescendants"
launcher:pageIndicator="@+id/tabs" >

<com.android.launcher3.widget.picker.WidgetsRecyclerView
android:id="@+id/primary_widgets_list_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false" />

<com.android.launcher3.widget.picker.WidgetsRecyclerView
android:id="@+id/work_widgets_list_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false" />

</com.android.launcher3.widget.picker.WidgetPagedView>

<!-- SearchAndRecommendationsView without the tab layout as well -->
<com.android.launcher3.views.StickyHeaderLayout
android:id="@+id/search_and_recommendations_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToOutline="true"
android:orientation="vertical">

<FrameLayout
android:id="@+id/search_bar_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/widgetPickerPrimarySurfaceColor"
android:clipToPadding="false"
android:elevation="0.1dp"
android:paddingBottom="8dp"
launcher:layout_sticky="true">

<include layout="@layout/widgets_search_bar" />
</FrameLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/suggestions_header"
android:layout_marginTop="8dp"
android:orientation="horizontal"
android:background="?attr/widgetPickerPrimarySurfaceColor"
launcher:layout_sticky="true">
</LinearLayout>

<com.android.launcher3.workprofile.PersonalWorkSlidingTabStrip
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="64dp"
android:gravity="center_horizontal"
android:orientation="horizontal"
android:paddingVertical="8dp"
android:background="?attr/widgetPickerPrimarySurfaceColor"
style="@style/TextHeadline"
launcher:layout_sticky="true">

<Button
android:id="@+id/tab_personal"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginEnd="@dimen/widget_tabs_button_horizontal_padding"
android:layout_marginVertical="@dimen/widget_apps_tabs_vertical_padding"
android:layout_weight="1"
android:background="@drawable/widget_picker_tabs_background"
android:text="@string/widgets_full_sheet_personal_tab"
android:textColor="@color/widget_picker_tab_text"
android:textSize="14sp"
style="?android:attr/borderlessButtonStyle" />

<Button
android:id="@+id/tab_work"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginEnd="@dimen/widget_tabs_button_horizontal_padding"
android:layout_marginVertical="@dimen/widget_apps_tabs_vertical_padding"
android:layout_weight="1"
android:background="@drawable/widget_picker_tabs_background"
android:text="@string/widgets_full_sheet_work_tab"
android:textColor="@color/widget_picker_tab_text"
android:textSize="14sp"
style="?android:attr/borderlessButtonStyle" />

</com.android.launcher3.workprofile.PersonalWorkSlidingTabStrip>
</com.android.launcher3.views.StickyHeaderLayout>
</FrameLayout>
</merge>
68 changes: 68 additions & 0 deletions lawnchair/res/layout/widgets_two_pane_sheet_recyclerview.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2021 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res-auto">

<FrameLayout
android:id="@+id/widgets_two_pane_sheet_recyclerview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="start"
android:layout_gravity="start"
android:layout_alignParentStart="true">

<com.android.launcher3.widget.picker.WidgetsRecyclerView
android:id="@+id/primary_widgets_list_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin_two_pane"
android:clipToPadding="false" />

<!-- SearchAndRecommendationsView without the tab layout as well -->
<com.android.launcher3.views.StickyHeaderLayout
android:id="@+id/search_and_recommendations_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToOutline="true"
android:orientation="vertical">

<FrameLayout
android:id="@+id/search_bar_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/widgetPickerPrimarySurfaceColor"
android:clipToPadding="false"
android:elevation="0.1dp"
android:paddingBottom="8dp"
android:paddingHorizontal="@dimen/widget_list_horizontal_margin_two_pane"
launcher:layout_sticky="true">

<include layout="@layout/widgets_search_bar" />
</FrameLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/suggestions_header"
android:layout_marginTop="8dp"
android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin_two_pane"
android:paddingBottom="16dp"
android:orientation="horizontal"
android:background="?attr/widgetPickerPrimarySurfaceColor"
launcher:layout_sticky="true">
</LinearLayout>
</com.android.launcher3.views.StickyHeaderLayout>
</FrameLayout>
</merge>
23 changes: 23 additions & 0 deletions lawnchair/res/layout/workspace_screen.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2008 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<com.android.launcher3.CellLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hapticFeedbackEnabled="false"
launcher:containerType="workspace" />
23 changes: 23 additions & 0 deletions lawnchair/res/layout/workspace_screen_foldable.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2022 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<com.android.launcher3.MultipageCellLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hapticFeedbackEnabled="false"
launcher:containerType="workspace" />
4 changes: 2 additions & 2 deletions lawnchair/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@

<color name="background_device_default_dark">@color/system_neutral1_900</color>
<color name="background_device_default_light">@color/system_neutral1_50</color>
<color name="background_floating_device_default_dark">@color/background_device_default_dark</color>
<color name="background_floating_device_default_light">@color/background_device_default_light</color>
<color name="background_floating_device_default_dark">@color/system_neutral2_900</color>
<color name="background_floating_device_default_light">@color/system_neutral2_50</color>

<color name="surface_dark">@color/system_neutral1_800</color>
<color name="surface_header_dark">@color/system_neutral1_700</color>
Expand Down
2 changes: 1 addition & 1 deletion lawnchair/res/values/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
<item name="config_default_home_icon_label_folder_size_factor" type="dimen" format="float">1.0</item>
<item name="config_default_drawer_icon_label_size_factor" type="dimen" format="float">1.0</item>
<item name="config_default_drawer_cell_height_factor" type="dimen" format="float">1.0</item>
<item name="config_default_drawer_left_right_factor" type="dimen" format="float">0.4</item>
<item name="config_default_drawer_left_right_factor" type="dimen" format="float">0.0</item>
<item name="config_default_search_max_result_count" type="dimen" format="integer">5</item>
<item name="config_default_files_max_result_count" type="dimen" format="integer">3</item>
<item name="config_default_people_max_result_count" type="dimen" format="integer">10</item>
Expand Down
Loading

0 comments on commit 4dfa881

Please sign in to comment.