Skip to content

Commit eca9df3

Browse files
garanjyrezgui
andauthored
Adds watch face snippets (#747)
* Adds watch face snippets * Fixes watch_face_shapes.xml * Fixes watchface.xml * Fixes color tag --------- Co-authored-by: Yacine Rezgui <rezgui.y@gmail.com>
1 parent cf99c0c commit eca9df3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1296
-0
lines changed

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
* @yrezgui @kkuan2011
22
/compose/ @android/devrel-compose
33
/car/ @android/devrel-car
4+
/watchface/ @android/devrel-wear
45
/wear/ @android/devrel-wear
56
/wearcompanion/ @android/devrel-wear
67
/xr/ @android/devrel-xr

settings.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ include(
3434
":kotlin",
3535
":compose:snippets",
3636
":datastore",
37+
":watchface",
3738
":wear",
3839
":wearcompanion",
3940
":views",

watchface/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

watchface/build.gradle.kts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Copyright 2024 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
plugins {
17+
alias(libs.plugins.android.application)
18+
}
19+
20+
android {
21+
namespace = "com.example.simpledigital"
22+
compileSdk = 36
23+
24+
defaultConfig {
25+
applicationId = "com.example.simpledigital"
26+
minSdk = 36
27+
targetSdk = 36
28+
versionCode = 1
29+
versionName = "1.0.0"
30+
}
31+
32+
buildTypes {
33+
debug {
34+
isMinifyEnabled = true
35+
}
36+
release {
37+
// TODO:Add your signingConfig here to build release builds
38+
isMinifyEnabled = true
39+
// Ensure shrink resources is false, to avoid potential for them
40+
// being removed.
41+
isShrinkResources = false
42+
43+
signingConfig = signingConfigs.getByName("debug")
44+
}
45+
}
46+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2023 The Android Open Source Project
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
https://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
18+
xmlns:tools="http://schemas.android.com/tools">
19+
20+
<uses-feature android:name="android.hardware.type.watch" />
21+
22+
<!-- Note: hasCode is required to be false for Watch Face Format -->
23+
<application
24+
android:label="@string/watch_face_name"
25+
android:hasCode="false">
26+
27+
<meta-data
28+
android:name="com.google.android.wearable.standalone"
29+
android:value="true" />
30+
<!-- [START android_watchface_version_manifest] -->
31+
<property
32+
android:name="com.google.wear.watchface.format.version"
33+
android:value="4" />
34+
<!-- [END android_watchface_version_manifest] -->
35+
<!-- [START android_watchface_publisher_manifest] -->
36+
<property
37+
android:name="com.google.wear.watchface.format.publisher"
38+
android:value="{toolName}-{toolVersion}" />
39+
<!-- [END android_watchface_publisher_manifest] -->
40+
</application>
41+
</manifest>
615 KB
Loading
25.9 KB
Loading
812 KB
Loading
29.1 KB
Loading
27.8 KB
Loading

0 commit comments

Comments
 (0)