This file contains hidden or 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
<uses-feature android:name="android.hardware.sensor.stepcounter" /> | |
<uses-feature android:name="android.hardware.sensor.stepdetector" /> |
This file contains hidden or 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
using Android.OS; | |
namespace StepCounter.Services | |
{ | |
public class StepServiceBinder : Binder | |
{ | |
StepService stepService; | |
public StepServiceBinder (StepService service) | |
{ | |
this.stepService = service; |
This file contains hidden or 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
using System; | |
using Android.App; | |
using Android.Hardware; | |
using Android.Content; | |
using System.ComponentModel; | |
using StepCounter.Helpers; | |
using StepCounter.Database; | |
using StepCounter.Activities; | |
namespace StepCounter.Services |
This file contains hidden or 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
using Android.App; | |
using Android.Content; | |
using Android.OS; | |
using Android.Widget; | |
using Android.Content.PM; | |
using System; | |
using StepCounter.Helpers; | |
using StepCounter.Controls; | |
using Android.Views.Animations; | |
using StepCounter.Services; |
This file contains hidden or 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
[BroadcastReceiver] | |
[IntentFilter(new []{"android.intent.action.BOOT_COMPLETED"})] | |
public class BootReceiver : BroadcastReceiver | |
{ | |
public override void OnReceive (Context context, Intent intent) | |
{ | |
var stepServiceIntent = new Intent(context, typeof(StepService)); | |
context.StartService(stepServiceIntent); | |
} | |
} |
This file contains hidden or 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
<!-- Application theme. --> | |
<style name="MyTheme" parent="@android:style/Theme.Holo"> | |
<item name="android:windowActionBarOverlay">true</item> | |
<item name="android:actionBarStyle">@style/MyTheme.ActionBar</item> | |
<item name="android:windowContentOverlay">@null</item> | |
<item name="android:windowBackground">@color/red_background</item> | |
</style> | |
<style name="MyTheme.ActionBar" parent="android:Widget.Holo.ActionBar"> | |
<item name="android:background">@android:color/transparent</item> | |
<item name="android:backgroundStacked">@android:color/transparent</item> |
This file contains hidden or 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
using System; | |
#if __ANDROID__ | |
using Android.Graphics; | |
#elif __IOS__ | |
using MonoTouch.UIKit; | |
using Color = MonoTouch.UIKit.UIColor; | |
#endif | |
#if __ANDROID__ |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<stepcounter.controls.ProgressView xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent" | |
android:id="@+id/progressView"> | |
<FrameLayout | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent" | |
android:background="@color/blue_background" | |
android:id="@+id/top_layer" |
This file contains hidden or 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
<style name="MyTheme" parent="@android:style/Theme.Holo"> | |
<item name="android:windowActionBarOverlay">true</item> | |
<item name="android:actionBarStyle">@style/MyTheme.ActionBar</item> | |
<item name="android:windowContentOverlay">@null</item> | |
<item name="android:windowBackground">@color/red_background</item> | |
<item name="android:windowTranslucentNavigation">true</item> | |
<item name="android:windowTranslucentStatus">true</item> | |
</style> |
This file contains hidden or 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
<FrameLayout | |
android:fitsSystemWindows="true" | |
android:layout_width="fill_parent" | |
android:layout_height="wrap_content" | |
android:layout_gravity="bottom"> | |
<TextView | |
android:text="@string/calories" | |
android:textAppearance="?android:attr/textAppearanceMedium" | |
android:layout_width="wrap_content" |