Browse Source

Add widgets to open source release

merge-requests/1/head
Trevor Slocum 7 years ago
parent
commit
01578693a8
  1. 1
      CHANGELOG
  2. 36
      MeditationAssistant/src/opensource/AndroidManifest.xml
  3. 11
      MeditationAssistantWear/src/main/AndroidManifest.xml
  4. 5
      MeditationAssistantWear/src/main/java/sh/ftp/rocketninelabs/meditationassistant/WearEditDurationActivity.java
  5. 2
      MeditationAssistantWear/src/main/java/sh/ftp/rocketninelabs/meditationassistant/WearMeditationAssistant.java
  6. 28
      MeditationAssistantWear/src/main/res/layout/wear_editduration_rect.xml
  7. 27
      MeditationAssistantWear/src/main/res/layout/wear_editduration_round.xml
  8. 16
      MeditationAssistantWear/src/main/res/layout/wear_main_rect.xml
  9. 14
      MeditationAssistantWear/src/main/res/layout/wear_main_round.xml
  10. 3
      MeditationAssistantWear/src/main/res/values/styles.xml

1
CHANGELOG

@ -1,5 +1,6 @@
1.2.8:
- Hide analytics preference when applicable
- Add widgets to open source release
1.2.7: (First release on F-Droid)
- Fix crash on non-English devices

36
MeditationAssistant/src/opensource/AndroidManifest.xml

@ -9,6 +9,42 @@
android:name="com.google.android.backup.api_key"
android:value="AEdPqrEAAAAIAUEb3SC2bBJt6pLanNwm7yB1Qy2WFS_nm7pHuw" />
<!-- Widgets -->
<!--
<receiver
android:name=".MeditationProvider1"
android:label="@string/widget1x1" >
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_1" />
</receiver>-->
<receiver
android:name=".MeditationProvider2"
android:label="@string/widget2x1">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_2" />
</receiver>
<receiver
android:name=".MeditationProvider3"
android:label="@string/widget3x1">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_3" />
</receiver>
</application>
</manifest>

11
MeditationAssistantWear/src/main/AndroidManifest.xml

@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="sh.ftp.rocketninelabs.meditationassistant"
xmlns:android="http://schemas.android.com/apk/res/android">
<manifest
package="sh.ftp.rocketninelabs.meditationassistant"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-feature android:name="android.hardware.type.watch"/>
<uses-feature android:name="android.hardware.type.watch" />
<application
android:name=".WearMeditationAssistant"
@ -16,8 +17,8 @@
android:label="@string/app_name"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity

5
MeditationAssistantWear/src/main/java/sh/ftp/rocketninelabs/meditationassistant/WearEditDurationActivity.java

@ -1,13 +1,8 @@
package sh.ftp.rocketninelabs.meditationassistant;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.wearable.view.DismissOverlayView;
import android.support.wearable.view.WatchViewStub;
import android.util.Log;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
import android.widget.TimePicker;

2
MeditationAssistantWear/src/main/java/sh/ftp/rocketninelabs/meditationassistant/WearMeditationAssistant.java

@ -4,4 +4,4 @@ import android.app.Application;
public class WearMeditationAssistant extends Application {
public String newDuration = "";
}
}

28
MeditationAssistantWear/src/main/res/layout/wear_editduration_rect.xml

@ -1,13 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" android:orientation="vertical"
tools:context=".WearEditDurationActivity" tools:deviceIds="wear_square">
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".WearEditDurationActivity"
tools:deviceIds="wear_square">
<TimePicker android:id="@+id/editWearDuration"
android:layout_gravity="center_horizontal" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_marginBottom="40dp" android:layout_marginTop="-20dp"/>
<TimePicker
android:id="@+id/editWearDuration"
android:layout_gravity="center_horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginBottom="40dp"
android:layout_marginTop="-20dp" />
<Button android:id="@+id/setDuration"
android:layout_alignParentBottom="true" android:layout_width="fill_parent" android:layout_height="60dp" android:text="@string/set" android:onClick="setDuration"></Button>
<Button
android:id="@+id/setDuration"
android:layout_alignParentBottom="true"
android:layout_width="fill_parent"
android:layout_height="60dp"
android:text="@string/set"
android:onClick="setDuration"></Button>
</RelativeLayout>

27
MeditationAssistantWear/src/main/res/layout/wear_editduration_round.xml

@ -1,12 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:id="@+id/wear_editduration_layout" android:layout_width="match_parent"
android:layout_height="match_parent" tools:context=".WearEditDurationActivity" tools:deviceIds="wear_round">
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/wear_editduration_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".WearEditDurationActivity"
tools:deviceIds="wear_round">
<TimePicker android:id="@+id/editWearDuration"
android:layout_gravity="center_horizontal" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_marginBottom="40dp" android:layout_marginTop="-20dp"/>
<TimePicker
android:id="@+id/editWearDuration"
android:layout_gravity="center_horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginBottom="40dp"
android:layout_marginTop="-20dp" />
<Button android:id="@+id/setDuration"
android:layout_alignParentBottom="true" android:layout_width="fill_parent" android:layout_height="60dp" android:text="@string/set" android:onClick="setDuration"></Button>
<Button
android:id="@+id/setDuration"
android:layout_alignParentBottom="true"
android:layout_width="fill_parent"
android:layout_height="60dp"
android:text="@string/set"
android:onClick="setDuration"></Button>
</RelativeLayout>

16
MeditationAssistantWear/src/main/res/layout/wear_main_rect.xml

@ -1,10 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" android:orientation="vertical"
tools:context=".MainActivity" tools:deviceIds="wear_square">
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity"
tools:deviceIds="wear_square">
<TextView android:id="@+id/wearTimer" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:gravity="center_horizontal"
<TextView
android:id="@+id/wearTimer"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout>

14
MeditationAssistantWear/src/main/res/layout/wear_main_round.xml

@ -1,10 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" tools:context=".MainActivity" tools:deviceIds="wear_round">
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
tools:deviceIds="wear_round">
<TextView android:id="@+id/wearTimer" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_centerHorizontal="true"
<TextView
android:id="@+id/wearTimer"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
</RelativeLayout>

3
MeditationAssistantWear/src/main/res/values/styles.xml

@ -11,4 +11,5 @@
<style name="NoSwipe" parent="@android:style/Theme.DeviceDefault">
<item name="android:windowSwipeToDismiss">false</item>
</style></resources>
</style>
</resources>
Loading…
Cancel
Save