This repository has been archived by the owner on Sep 6, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f3210f4
Showing
76 changed files
with
4,880 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# GOOGLE SAMPLE PACKAGING DATA | ||
# | ||
# This file is used by Google as part of our samples packaging process. | ||
# End users may safely ignore this file. It has no relevance to other systems. | ||
--- | ||
status: PUBLISHED | ||
technologies: [Android] | ||
categories: [Wearable] | ||
languages: [Java] | ||
solutions: [Mobile] | ||
github: android-WatchFace | ||
license: apache2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
buildscript { | ||
repositories { | ||
mavenCentral() | ||
} | ||
This comment has been minimized.
Sorry, something went wrong. |
||
|
||
dependencies { | ||
classpath 'com.android.tools.build:gradle:1.0.0' | ||
} | ||
} | ||
|
||
apply plugin: 'com.android.application' | ||
|
||
|
||
dependencies { | ||
|
||
compile "com.google.android.support:wearable:1.1.+" | ||
|
||
compile 'com.google.android.gms:play-services-wearable:6.5.+' | ||
compile 'com.android.support:support-v13:21.0.+' | ||
wearApp project(':Wearable') | ||
} | ||
|
||
// The sample build uses multiple directories to | ||
// keep boilerplate and common code separate from | ||
// the main sample code. | ||
List<String> dirs = [ | ||
'main', // main sample code; look here for the interesting stuff. | ||
'common', // components that are reused by multiple samples | ||
'template'] // boilerplate code that is generated by the sample template process | ||
|
||
android { | ||
compileSdkVersion 21 | ||
|
||
buildToolsVersion "21.1.1" | ||
|
||
defaultConfig { | ||
minSdkVersion 18 | ||
targetSdkVersion 21 | ||
versionCode 1 | ||
versionName "1.0" | ||
} | ||
|
||
sourceSets { | ||
main { | ||
dirs.each { dir -> | ||
java.srcDirs "src/${dir}/java" | ||
res.srcDirs "src/${dir}/res" | ||
} | ||
} | ||
androidTest.setRoot('tests') | ||
androidTest.java.srcDirs = ['tests/src'] | ||
|
||
} | ||
|
||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Copyright (C) 2014 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. | ||
--> | ||
|
||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.example.android.wearable.watchface" > | ||
|
||
<uses-sdk android:minSdkVersion="18" | ||
android:targetSdkVersion="21" /> | ||
|
||
<!-- Permissions required by the wearable app --> | ||
<uses-permission android:name="com.google.android.permission.PROVIDE_BACKGROUND" /> | ||
<uses-permission android:name="android.permission.WAKE_LOCK" /> | ||
<uses-permission android:name="android.permission.READ_CALENDAR" /> | ||
|
||
<!-- All intent-filters for config actions must include the categories | ||
com.google.android.wearable.watchface.category.COMPANION_CONFIGURATION and | ||
android.intent.category.DEFAULT. --> | ||
<application | ||
android:allowBackup="true" | ||
android:icon="@drawable/ic_launcher" | ||
android:label="@string/app_name" | ||
android:theme="@style/AppTheme" > | ||
|
||
<activity | ||
android:name=".AnalogAndCardBoundsWatchFaceConfigActivity" | ||
android:label="@string/app_name"> | ||
<intent-filter> | ||
<action android:name="com.example.android.wearable.watchface.CONFIG_ANALOG" /> | ||
<action android:name="com.example.android.wearable.watchface.CONFIG_CARD_BOUNDS" /> | ||
<category android:name="com.google.android.wearable.watchface.category.COMPANION_CONFIGURATION" /> | ||
<category android:name="android.intent.category.DEFAULT" /> | ||
</intent-filter> | ||
</activity> | ||
|
||
<activity | ||
android:name=".DigitalWatchFaceCompanionConfigActivity" | ||
android:label="@string/app_name"> | ||
<intent-filter> | ||
<action android:name="com.example.android.wearable.watchface.CONFIG_DIGITAL" /> | ||
<category android:name="com.google.android.wearable.watchface.category.COMPANION_CONFIGURATION" /> | ||
<category android:name="android.intent.category.DEFAULT" /> | ||
</intent-filter> | ||
</activity> | ||
|
||
<activity | ||
android:name=".TiltWatchFaceConfigActivity" | ||
android:label="@string/app_name"> | ||
<intent-filter> | ||
<action android:name="com.example.android.wearable.watchface.CONFIG_TILT" /> | ||
<category android:name="com.google.android.wearable.watchface.category.COMPANION_CONFIGURATION" /> | ||
<category android:name="android.intent.category.DEFAULT" /> | ||
</intent-filter> | ||
</activity> | ||
|
||
<meta-data | ||
android:name="com.google.android.gms.version" | ||
android:value="@integer/google_play_services_version" /> | ||
|
||
</application> | ||
|
||
</manifest> |
37 changes: 37 additions & 0 deletions
37
...va/com/example/android/wearable/watchface/AnalogAndCardBoundsWatchFaceConfigActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright (C) 2014 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. | ||
*/ | ||
|
||
package com.example.android.wearable.watchface; | ||
|
||
import android.app.Activity; | ||
import android.content.ComponentName; | ||
import android.os.Bundle; | ||
import android.support.wearable.companion.WatchFaceCompanion; | ||
import android.widget.TextView; | ||
|
||
public class AnalogAndCardBoundsWatchFaceConfigActivity extends Activity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_analog_watch_face_config); | ||
|
||
ComponentName name = | ||
getIntent().getParcelableExtra(WatchFaceCompanion.EXTRA_WATCH_FACE_COMPONENT); | ||
TextView label = (TextView) findViewById(R.id.label); | ||
label.setText(label.getText() + " (" + name.getClassName() + ")"); | ||
} | ||
} |
Oops, something went wrong.
@Onecityuni[ghost](url)