[
  {
    "path": ".gitignore",
    "content": "*.iml\n.gradle\n/local.properties\n/.idea/caches\n/.idea/libraries\n/.idea/modules.xml\n/.idea/workspace.xml\n/.idea/navEditor.xml\n/.idea/assetWizardSettings.xml\n.DS_Store\n/build\n/captures\n.externalNativeBuild\n"
  },
  {
    "path": ".idea/codeStyles/Project.xml",
    "content": "<component name=\"ProjectCodeStyleConfiguration\">\n  <code_scheme name=\"Project\" version=\"173\">\n    <JetCodeStyleSettings>\n      <option name=\"CODE_STYLE_DEFAULTS\" value=\"KOTLIN_OFFICIAL\" />\n    </JetCodeStyleSettings>\n    <Objective-C-extensions>\n      <file>\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"Import\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"Macro\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"Typedef\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"Enum\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"Constant\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"Global\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"Struct\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"FunctionPredecl\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"Function\" />\n      </file>\n      <class>\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"Property\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"Synthesize\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"InitMethod\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"StaticMethod\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"InstanceMethod\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"DeallocMethod\" />\n      </class>\n      <extensions>\n        <pair source=\"cpp\" header=\"h\" fileNamingConvention=\"NONE\" />\n        <pair source=\"c\" header=\"h\" fileNamingConvention=\"NONE\" />\n      </extensions>\n    </Objective-C-extensions>\n    <codeStyleSettings language=\"kotlin\">\n      <option name=\"CODE_STYLE_DEFAULTS\" value=\"KOTLIN_OFFICIAL\" />\n    </codeStyleSettings>\n  </code_scheme>\n</component>"
  },
  {
    "path": ".idea/codeStyles/codeStyleConfig.xml",
    "content": "<component name=\"ProjectCodeStyleConfiguration\">\n  <state>\n    <option name=\"USE_PER_PROJECT_SETTINGS\" value=\"true\" />\n  </state>\n</component>"
  },
  {
    "path": ".idea/gradle.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"GradleSettings\">\n    <option name=\"linkedExternalProjectsSettings\">\n      <GradleProjectSettings>\n        <option name=\"distributionType\" value=\"DEFAULT_WRAPPED\" />\n        <option name=\"externalProjectPath\" value=\"$PROJECT_DIR$\" />\n        <option name=\"modules\">\n          <set>\n            <option value=\"$PROJECT_DIR$\" />\n            <option value=\"$PROJECT_DIR$/pedometer\" />\n          </set>\n        </option>\n        <option name=\"resolveModulePerSourceSet\" value=\"false\" />\n      </GradleProjectSettings>\n    </option>\n  </component>\n</project>"
  },
  {
    "path": ".idea/misc.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"ASMPluginConfiguration\">\n    <asm skipDebug=\"false\" skipFrames=\"false\" skipCode=\"false\" expandFrames=\"false\" />\n    <groovy codeStyle=\"LEGACY\" />\n  </component>\n  <component name=\"ProjectRootManager\" version=\"2\" languageLevel=\"JDK_1_7\" project-jdk-name=\"1.8\" project-jdk-type=\"JavaSDK\">\n    <output url=\"file://$PROJECT_DIR$/build/classes\" />\n  </component>\n  <component name=\"ProjectType\">\n    <option name=\"id\" value=\"Android\" />\n  </component>\n</project>"
  },
  {
    "path": ".idea/runConfigurations.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"RunConfigurationProducerService\">\n    <option name=\"ignoredProducers\">\n      <set>\n        <option value=\"org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer\" />\n        <option value=\"org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer\" />\n        <option value=\"org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer\" />\n      </set>\n    </option>\n  </component>\n</project>"
  },
  {
    "path": ".idea/vcs.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"VcsDirectoryMappings\">\n    <mapping directory=\"\" vcs=\"Git\" />\n    <mapping directory=\"$PROJECT_DIR$/pedometer\" vcs=\"Git\" />\n  </component>\n</project>"
  },
  {
    "path": "README.md",
    "content": "这是2015年的写的项目，已经不再维护，功能可能已经失效，后期有时间会用kotlin重写一遍，无参考价值\n# pedometer\n\nthis is a pedometer demo,I will rewrite with kotlin\n"
  },
  {
    "path": "app/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "app/build.gradle",
    "content": "apply plugin: 'com.android.application'\n\napply plugin: 'kotlin-android'\n\napply plugin: 'kotlin-android-extensions'\n\nandroid {\n    compileSdkVersion 28\n    defaultConfig {\n        applicationId \"com.knight.pedometer\"\n        minSdkVersion 21\n        targetSdkVersion 28\n        versionCode 1\n        versionName \"1.0\"\n        testInstrumentationRunner \"android.support.test.runner.AndroidJUnitRunner\"\n    }\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'\n        }\n    }\n}\n\ndependencies {\n    implementation fileTree(dir: 'libs', include: ['*.jar'])\n    implementation\"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version\"\n    implementation 'com.android.support:appcompat-v7:28.0.0'\n    testImplementation 'junit:junit:4.12'\n    androidTestImplementation 'com.android.support.test:runner:1.0.2'\n    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'\n}\n"
  },
  {
    "path": "app/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguardFiles setting in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n\n# Uncomment this to preserve the line number information for\n# debugging stack traces.\n#-keepattributes SourceFile,LineNumberTable\n\n# If you keep the line number information, uncomment this to\n# hide the original source file name.\n#-renamesourcefileattribute SourceFile\n"
  },
  {
    "path": "app/src/androidTest/java/com/knight/pedometer/ExampleInstrumentedTest.kt",
    "content": "package com.knight.pedometer\n\nimport android.support.test.InstrumentationRegistry\nimport android.support.test.runner.AndroidJUnit4\n\nimport org.junit.Test\nimport org.junit.runner.RunWith\n\nimport org.junit.Assert.*\n\n/**\n * Instrumented test, which will execute on an Android device.\n *\n * See [testing documentation](http://d.android.com/tools/testing).\n */\n@RunWith(AndroidJUnit4::class)\nclass ExampleInstrumentedTest {\n    @Test\n    fun useAppContext() {\n        // Context of the app under test.\n        val appContext = InstrumentationRegistry.getTargetContext()\n        assertEquals(\"com.knight.pedometer\", appContext.packageName)\n    }\n}\n"
  },
  {
    "path": "app/src/main/AndroidManifest.xml",
    "content": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n          package=\"com.knight.pedometer\">\n\n    <application android:allowBackup=\"true\"\n                 android:label=\"@string/app_name\"\n                 android:icon=\"@mipmap/ic_launcher\"\n                 android:roundIcon=\"@mipmap/ic_launcher_round\"\n                 android:supportsRtl=\"true\"\n                 android:theme=\"@style/AppTheme\"/>\n</manifest>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_launcher_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector\n        xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:height=\"108dp\"\n        android:width=\"108dp\"\n        android:viewportHeight=\"108\"\n        android:viewportWidth=\"108\">\n    <path android:fillColor=\"#008577\"\n          android:pathData=\"M0,0h108v108h-108z\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M9,0L9,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M19,0L19,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M29,0L29,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M39,0L39,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M49,0L49,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M59,0L59,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M69,0L69,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M79,0L79,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M89,0L89,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M99,0L99,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,9L108,9\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,19L108,19\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,29L108,29\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,39L108,39\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,49L108,49\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,59L108,59\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,69L108,69\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,79L108,79\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,89L108,89\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,99L108,99\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M19,29L89,29\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M19,39L89,39\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M19,49L89,49\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M19,59L89,59\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M19,69L89,69\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M19,79L89,79\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M29,19L29,89\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M39,19L39,89\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M49,19L49,89\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M59,19L59,89\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M69,19L69,89\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M79,19L79,89\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable-v24/ic_launcher_foreground.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        xmlns:aapt=\"http://schemas.android.com/aapt\"\n        android:width=\"108dp\"\n        android:height=\"108dp\"\n        android:viewportHeight=\"108\"\n        android:viewportWidth=\"108\">\n    <path\n            android:fillType=\"evenOdd\"\n            android:pathData=\"M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z\"\n            android:strokeColor=\"#00000000\"\n            android:strokeWidth=\"1\">\n        <aapt:attr name=\"android:fillColor\">\n            <gradient\n                    android:endX=\"78.5885\"\n                    android:endY=\"90.9159\"\n                    android:startX=\"48.7653\"\n                    android:startY=\"61.0927\"\n                    android:type=\"linear\">\n                <item\n                        android:color=\"#44000000\"\n                        android:offset=\"0.0\"/>\n                <item\n                        android:color=\"#00000000\"\n                        android:offset=\"1.0\"/>\n            </gradient>\n        </aapt:attr>\n    </path>\n    <path\n            android:fillColor=\"#FFFFFF\"\n            android:fillType=\"nonZero\"\n            android:pathData=\"M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z\"\n            android:strokeColor=\"#00000000\"\n            android:strokeWidth=\"1\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@drawable/ic_launcher_background\"/>\n    <foreground android:drawable=\"@drawable/ic_launcher_foreground\"/>\n</adaptive-icon>"
  },
  {
    "path": "app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@drawable/ic_launcher_background\"/>\n    <foreground android:drawable=\"@drawable/ic_launcher_foreground\"/>\n</adaptive-icon>"
  },
  {
    "path": "app/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"colorPrimary\">#008577</color>\n    <color name=\"colorPrimaryDark\">#00574B</color>\n    <color name=\"colorAccent\">#D81B60</color>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">Pedometer</string>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/styles.xml",
    "content": "<resources>\n\n    <!-- Base application theme. -->\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.DarkActionBar\">\n        <!-- Customize your theme here. -->\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/colorAccent</item>\n    </style>\n\n</resources>\n"
  },
  {
    "path": "app/src/test/java/com/knight/pedometer/ExampleUnitTest.kt",
    "content": "package com.knight.pedometer\n\nimport org.junit.Test\n\nimport org.junit.Assert.*\n\n/**\n * Example local unit test, which will execute on the development machine (host).\n *\n * See [testing documentation](http://d.android.com/tools/testing).\n */\nclass ExampleUnitTest {\n    @Test\n    fun addition_isCorrect() {\n        assertEquals(4, 2 + 2)\n    }\n}\n"
  },
  {
    "path": "build.gradle",
    "content": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n    ext.kotlin_version = '1.3.11'\n    repositories {\n        google()\n        jcenter()\n        \n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:3.3.0-rc03'\n        classpath \"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version\"\n        // NOTE: Do not place your application dependencies here; they belong\n        // in the individual module build.gradle files\n    }\n}\n\nallprojects {\n    repositories {\n        google()\n        jcenter()\n        \n    }\n}\n\ntask clean(type: Delete) {\n    delete rootProject.buildDir\n}\n"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "#Mon Dec 31 12:40:30 CST 2018\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-4.10.1-all.zip\n"
  },
  {
    "path": "gradle.properties",
    "content": "# Project-wide Gradle settings.\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will override*\n# any settings specified in this file.\n# For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/build_environment.html\n# Specifies the JVM arguments used for the daemon process.\n# The setting is particularly useful for tweaking memory settings.\norg.gradle.jvmargs=-Xmx1536m\n# When configured, Gradle will run in incubating parallel mode.\n# This option should only be used with decoupled projects. More details, visit\n# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects\n# org.gradle.parallel=true\n# Kotlin code style for this project: \"official\" or \"obsolete\":\nkotlin.code.style=official\n"
  },
  {
    "path": "gradlew",
    "content": "#!/usr/bin/env sh\n\n##############################################################################\n##\n##  Gradle start up script for UN*X\n##\n##############################################################################\n\n# Attempt to set APP_HOME\n# Resolve links: $0 may be a link\nPRG=\"$0\"\n# Need this for relative symlinks.\nwhile [ -h \"$PRG\" ] ; do\n    ls=`ls -ld \"$PRG\"`\n    link=`expr \"$ls\" : '.*-> \\(.*\\)$'`\n    if expr \"$link\" : '/.*' > /dev/null; then\n        PRG=\"$link\"\n    else\n        PRG=`dirname \"$PRG\"`\"/$link\"\n    fi\ndone\nSAVED=\"`pwd`\"\ncd \"`dirname \\\"$PRG\\\"`/\" >/dev/null\nAPP_HOME=\"`pwd -P`\"\ncd \"$SAVED\" >/dev/null\n\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=`basename \"$0\"`\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS=\"\"\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=\"maximum\"\n\nwarn () {\n    echo \"$*\"\n}\n\ndie () {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n}\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\nnonstop=false\ncase \"`uname`\" in\n  CYGWIN* )\n    cygwin=true\n    ;;\n  Darwin* )\n    darwin=true\n    ;;\n  MINGW* )\n    msys=true\n    ;;\n  NONSTOP* )\n    nonstop=true\n    ;;\nesac\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=\"$JAVA_HOME/jre/sh/java\"\n    else\n        JAVACMD=\"$JAVA_HOME/bin/java\"\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=\"java\"\n    which java >/dev/null 2>&1 || die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\nfi\n\n# Increase the maximum file descriptors if we can.\nif [ \"$cygwin\" = \"false\" -a \"$darwin\" = \"false\" -a \"$nonstop\" = \"false\" ] ; then\n    MAX_FD_LIMIT=`ulimit -H -n`\n    if [ $? -eq 0 ] ; then\n        if [ \"$MAX_FD\" = \"maximum\" -o \"$MAX_FD\" = \"max\" ] ; then\n            MAX_FD=\"$MAX_FD_LIMIT\"\n        fi\n        ulimit -n $MAX_FD\n        if [ $? -ne 0 ] ; then\n            warn \"Could not set maximum file descriptor limit: $MAX_FD\"\n        fi\n    else\n        warn \"Could not query maximum file descriptor limit: $MAX_FD_LIMIT\"\n    fi\nfi\n\n# For Darwin, add options to specify how the application appears in the dock\nif $darwin; then\n    GRADLE_OPTS=\"$GRADLE_OPTS \\\"-Xdock:name=$APP_NAME\\\" \\\"-Xdock:icon=$APP_HOME/media/gradle.icns\\\"\"\nfi\n\n# For Cygwin, switch paths to Windows format before running java\nif $cygwin ; then\n    APP_HOME=`cygpath --path --mixed \"$APP_HOME\"`\n    CLASSPATH=`cygpath --path --mixed \"$CLASSPATH\"`\n    JAVACMD=`cygpath --unix \"$JAVACMD\"`\n\n    # We build the pattern for arguments to be converted via cygpath\n    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`\n    SEP=\"\"\n    for dir in $ROOTDIRSRAW ; do\n        ROOTDIRS=\"$ROOTDIRS$SEP$dir\"\n        SEP=\"|\"\n    done\n    OURCYGPATTERN=\"(^($ROOTDIRS))\"\n    # Add a user-defined pattern to the cygpath arguments\n    if [ \"$GRADLE_CYGPATTERN\" != \"\" ] ; then\n        OURCYGPATTERN=\"$OURCYGPATTERN|($GRADLE_CYGPATTERN)\"\n    fi\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    i=0\n    for arg in \"$@\" ; do\n        CHECK=`echo \"$arg\"|egrep -c \"$OURCYGPATTERN\" -`\n        CHECK2=`echo \"$arg\"|egrep -c \"^-\"`                                 ### Determine if an option\n\n        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition\n            eval `echo args$i`=`cygpath --path --ignore --mixed \"$arg\"`\n        else\n            eval `echo args$i`=\"\\\"$arg\\\"\"\n        fi\n        i=$((i+1))\n    done\n    case $i in\n        (0) set -- ;;\n        (1) set -- \"$args0\" ;;\n        (2) set -- \"$args0\" \"$args1\" ;;\n        (3) set -- \"$args0\" \"$args1\" \"$args2\" ;;\n        (4) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" ;;\n        (5) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" ;;\n        (6) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" ;;\n        (7) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" ;;\n        (8) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" ;;\n        (9) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" \"$args8\" ;;\n    esac\nfi\n\n# Escape application args\nsave () {\n    for i do printf %s\\\\n \"$i\" | sed \"s/'/'\\\\\\\\''/g;1s/^/'/;\\$s/\\$/' \\\\\\\\/\" ; done\n    echo \" \"\n}\nAPP_ARGS=$(save \"$@\")\n\n# Collect all arguments for the java command, following the shell quoting and substitution rules\neval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS \"\\\"-Dorg.gradle.appname=$APP_BASE_NAME\\\"\" -classpath \"\\\"$CLASSPATH\\\"\" org.gradle.wrapper.GradleWrapperMain \"$APP_ARGS\"\n\n# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong\nif [ \"$(uname)\" = \"Darwin\" ] && [ \"$HOME\" = \"$PWD\" ]; then\n  cd \"$(dirname \"$0\")\"\nfi\n\nexec \"$JAVACMD\" \"$@\"\n"
  },
  {
    "path": "gradlew.bat",
    "content": "@if \"%DEBUG%\" == \"\" @echo off\r\n@rem ##########################################################################\r\n@rem\r\n@rem  Gradle startup script for Windows\r\n@rem\r\n@rem ##########################################################################\r\n\r\n@rem Set local scope for the variables with windows NT shell\r\nif \"%OS%\"==\"Windows_NT\" setlocal\r\n\r\nset DIRNAME=%~dp0\r\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\r\nset APP_BASE_NAME=%~n0\r\nset APP_HOME=%DIRNAME%\r\n\r\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\r\nset DEFAULT_JVM_OPTS=\r\n\r\n@rem Find java.exe\r\nif defined JAVA_HOME goto findJavaFromJavaHome\r\n\r\nset JAVA_EXE=java.exe\r\n%JAVA_EXE% -version >NUL 2>&1\r\nif \"%ERRORLEVEL%\" == \"0\" goto init\r\n\r\necho.\r\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\r\necho.\r\necho Please set the JAVA_HOME variable in your environment to match the\r\necho location of your Java installation.\r\n\r\ngoto fail\r\n\r\n:findJavaFromJavaHome\r\nset JAVA_HOME=%JAVA_HOME:\"=%\r\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\r\n\r\nif exist \"%JAVA_EXE%\" goto init\r\n\r\necho.\r\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\r\necho.\r\necho Please set the JAVA_HOME variable in your environment to match the\r\necho location of your Java installation.\r\n\r\ngoto fail\r\n\r\n:init\r\n@rem Get command-line arguments, handling Windows variants\r\n\r\nif not \"%OS%\" == \"Windows_NT\" goto win9xME_args\r\n\r\n:win9xME_args\r\n@rem Slurp the command line arguments.\r\nset CMD_LINE_ARGS=\r\nset _SKIP=2\r\n\r\n:win9xME_args_slurp\r\nif \"x%~1\" == \"x\" goto execute\r\n\r\nset CMD_LINE_ARGS=%*\r\n\r\n:execute\r\n@rem Setup the command line\r\n\r\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\r\n\r\n@rem Execute Gradle\r\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\r\n\r\n:end\r\n@rem End local scope for the variables with windows NT shell\r\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\r\n\r\n:fail\r\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\r\nrem the _cmd.exe /c_ return code!\r\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\r\nexit /b 1\r\n\r\n:mainEnd\r\nif \"%OS%\"==\"Windows_NT\" endlocal\r\n\r\n:omega\r\n"
  },
  {
    "path": "pedometer/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest\n        xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        package=\"com.bit.pedometer\">\n\n    <uses-permission android:name=\"android.permission.WAKE_LOCK\"/>\n    <uses-permission android:name=\"android.permission.GET_TASKS\"/>\n    <uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>\n    <uses-permission android:name=\"android.permission.MANAGE_ACCOUNTS\"/>\n    <uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>\n    <uses-permission android:name=\"android.permission.INTERNET\"/>\n    <uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>\n    <uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>\n    <uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>\n    <uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>\n    <uses-permission android:name=\"android.permission.READ_LOGS\"/>\n\n\n    <application\n            android:allowBackup=\"true\"\n            android:icon=\"@drawable/pedometer\"\n            android:label=\"@string/app_name\"\n            android:theme=\"@android:style/Theme.Holo.Light.NoActionBar\">\n        <activity\n                android:name=\".ui.activity.WelcomeActivity\"\n                android:label=\"@string/app_name\"\n                android:screenOrientation=\"portrait\"\n                android:theme=\"@android:style/Theme.NoTitleBar.Fullscreen\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\"/>\n\n                <category android:name=\"android.intent.category.LAUNCHER\"/>\n            </intent-filter>\n        </activity>\n        <activity\n                android:name=\".ui.fragment.PK.FragmentPK_memberset\"\n                android:screenOrientation=\"portrait\"/>\n        <activity\n                android:name=\".ui.activity.MainActivity\"\n                android:screenOrientation=\"portrait\"/>\n        <activity\n                android:name=\".ui.fragment.PK.FragmentPK_addmember\"\n                android:screenOrientation=\"portrait\"/>\n        <activity\n                android:name=\".ui.activity.SetToTakePicActivity\"\n                android:theme=\"@android:style/Theme.Translucent.NoTitleBar\"/>\n\n        <!-- 这是进行授权页面的注册 -->\n        <activity\n                android:name=\"cn.sharesdk.framework.ShareSDKUIShell\"\n                android:configChanges=\"keyboardHidden|orientation\"\n                android:screenOrientation=\"portrait\"\n                android:theme=\"@android:style/Theme.Translucent.NoTitleBar\"\n                android:windowSoftInputMode=\"stateHidden|adjustResize\"/>\n\n        <service android:name=\"com.bit.pedometer.service.StepService\"></service>\n        <service android:name=\"com.bit.pedometer.service.AutoSaveService\"></service>\n\n        <receiver android:name=\"com.bit.pedometer.receiver.AutoSaveReceiver\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.DATE_CHANGED\"/>\n                <!-- android.intent.action.DATE_CHANGED -->\n            </intent-filter>\n        </receiver>\n    </application>\n\n</manifest>"
  },
  {
    "path": "pedometer/README.md",
    "content": "# 前言\n之前一直没有写简介，比较简陋，现在简单介绍一些这个项目，这个计步器的主要实现是基于手机的加速度感应器实现的，不是根据GPS实现的。\n\n# 记步\n经过两个月的努力，终于把计步器APP初步完成，已经可以正常使用，话不多说，首先上几张APP正常运行的图片：\n首先这是计步器(Pedometer)主页面——记步页面\n\n![这里写图片描述](http://img.blog.csdn.net/20170430225441009?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYTI5Njc3NzUxMw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)\n\n点击中间部分，可以更换显示的数据，分别有步数，消耗的卡路里以及当前的天气情况。下面是分别几个界面：\n\n![这里写图片描述](http://img.blog.csdn.net/20170430225454364?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYTI5Njc3NzUxMw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)\n\n![这里写图片描述](http://img.blog.csdn.net/20170430225504411?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYTI5Njc3NzUxMw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)\n\n还可以分享到相应设社交平台上\n\n![这里写图片描述](http://img.blog.csdn.net/20170430225516020?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYTI5Njc3NzUxMw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)\n\n\n大家可以清晰的看到，图中的圆圈是一个ProgressBar（进度条）,随着圈内的数值的增加，ProgressBar也在动态的增加。\n首先进入页面的是显示步数，点击圆圈会显示消耗的卡路里，再次点击圆圈会显示当天的天气情况（现在仅仅是北京的天气），最后点击左上方的图标，是一个分享的按钮。\n这个重新定义的ProgressBar当初画了好几天，才做成的。\n\n# 历史\n\n点击左侧的历史页面，会进入近期步数的记录页面，这里对数据进行本地化存储。\n\n![这里写图片描述](http://img.blog.csdn.net/20170430225608848?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYTI5Njc3NzUxMw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)\n\n![这里写图片描述](http://img.blog.csdn.net/20170430225618364?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYTI5Njc3NzUxMw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)\n\n大家可以看到这个是历史页面，也就是记录每一天的所走的步数，点击左上角的日历的图标，会出现一个Dialog来显示日期，选择日期。\n这个页面的步数，使用了动画，数字动态的从0到当天的步数，在2秒内完成。\n\n# 分析\n\n正如大家所见，这个页面是一个条形统计的页面，记录最近一周，每天的步数，更加直观的看到7天内的步数。此页面底部的星期，是可以动态变化的，开头总是当天的星期。这个柱状图可以动态的，当打开这个页面后，柱状图从底部上升到它所对应的数值（在1秒内完成），而且点击各个柱状图都能显示这个柱状图所代表的步数。\n\n![这里写图片描述](http://img.blog.csdn.net/20170430225815162?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYTI5Njc3NzUxMw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)\n\n![这里写图片描述](http://img.blog.csdn.net/20170430225827451?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYTI5Njc3NzUxMw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)\n\n\n\n# 个人信息设置\n\n这个页面主要是设置一些个人信息，例如头像，姓名，年龄等基本情况，也可以对计步器的灵敏度进行调节。\n\n![这里写图片描述](http://img.blog.csdn.net/20170430225911226?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYTI5Njc3NzUxMw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)\n\n如图所示，大家应该都很清楚了，但是还是容小弟介绍一下，这里我把图片进行处理，设置成圆形的（更加美观）。点击头像可以选择：拍照或者相册。\n\n# pk\n\n这是最后一个页面——PK页面，这个页面由于考虑到有服务器和数据的交互，也是特别难实现。由于这个项目是我一个人独自完成，其他两个人不太会，所以后台的服务器我就使用了第三方的API（Bmob）。\n第一张图是多人的PK，依次排名显示，单击每个人头像就会显示此人的详细信息（可以删除此人，图2所示）。向左滑动页面，进入分组PK页面，这里所有的人都分好组，然后点击小组下的人，可以进入图4的页面，此页面主要就是对这个成员进行分组调整。回到PK页面，点击右上角的小人标志，就可以连接服务器，添加好友。\n\n\n![这里写图片描述](http://img.blog.csdn.net/20170430230054008?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYTI5Njc3NzUxMw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)\n\n![这里写图片描述](http://img.blog.csdn.net/20170430230104564?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYTI5Njc3NzUxMw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)\n\n![这里写图片描述](http://img.blog.csdn.net/20170430230115767?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYTI5Njc3NzUxMw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)\n\n![这里写图片描述](http://img.blog.csdn.net/20170430230125892?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYTI5Njc3NzUxMw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)\n\n![这里写图片描述](http://img.blog.csdn.net/20170430230137430?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYTI5Njc3NzUxMw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)\n\n# 总结\n\n这个项目，可以作为入门的新手练手。因为很久之前的写的，本地的操作都可以正常运行，但是网络会出现一些问题，使用的第三方的后台。\n"
  },
  {
    "path": "pedometer/assets/ShareSDK.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<DevInfor>\n\n    <!--\n    \t说明：\n    \t\n    \t1、表格中的第一项\n    \t\t<ShareSDK \n        \t\tAppKey=\"api20\" />\n    \t是必须的，其中的AppKey是您在ShareSDK上注册的开发者帐号的AppKey\n    \t\n    \t2、所有集成到您项目的平台都应该为其在表格中填写相对应的开发者信息，以新浪微博为例：\n    \t    <SinaWeibo\n                Id=\"1\"\n                SortId=\"1\"\n                AppKey=\"568898243\"\n                AppSecret=\"38a4f8204cc784f81f9f0daaf31e02e3\"\n                RedirectUrl=\"http://www.sharesdk.cn\"\n                Enable=\"true\" />\n    \t其中的SortId是此平台在分享列表中的位置，由开发者自行定义，可以是任何整型数字，数值越大\n    \t越靠后AppKey、AppSecret和RedirectUrl是您在新浪微博上注册开发者信息和应用后得到的信息\n    \tId是一个保留的识别符，整型，ShareSDK不使用此字段，供您在自己的项目中当作平台的识别符。\n    \tEnable字段表示此平台是否有效，布尔值，默认为true，如果Enable为false，即便平台的jar包\n    \t已经添加到应用中，平台实例依然不可获取。\n    \t\n    \t各个平台注册应用信息的地址如下：\n\t\t\t新浪微博                 http://open.weibo.com\n\t\t\t腾讯微博                 http://dev.t.qq.com\n\t\t\t<a href=\"http://www.it165.net/qq/qqkj/\" target=\"_blank\" class=\"keylink\">QQ空间</a>                      http://connect.<a href=\"http://www.it165.net/qq/\" target=\"_blank\" class=\"keylink\">qq</a>.com/intro/login/\n\t\t\t微信好友                 http://open.weixin.<a href=\"http://www.it165.net/qq/\" target=\"_blank\" class=\"keylink\">qq</a>.com\n\t\t\tFacebook      https://developers.facebook.com\n\t\t\tTwitter       https://dev.twitter.com\n\t\t\t人人网                      http://dev.renren.com\n\t\t\t开心网                      http://open.kaixin001.com\n\t\t\t搜狐微博                 http://open.t.sohu.com\n\t\t\t网易微博                 http://open.t.163.com\n\t\t\t豆瓣                           http://developers.douban.com\n\t\t\t有道云笔记            http://note.youdao.com/open/developguide.html#app\n\t\t\t印象笔记                 https://dev.evernote.com/\n\t\t\tLinkedin      https://www.linkedin.com/secure/developer?newapp=\n\t\t\tFourSquare    https://developer.foursquare.com/\n\t\t\t搜狐随身看            https://open.sohu.com/\n\t\t\tFlickr        http://www.flickr.com/services/\n\t\t\tPinterest     http://developers.pinterest.com/\n\t\t\tTumblr        http://www.tumblr.com/developers\n\t\t\tDropbox       https://www.dropbox.com/developers\n\t\t\tInstagram     http://instagram.com/developer#\n\t\t\tVKontakte     http://vk.com/dev\n    -->\n\n    <ShareSDK AppKey=\"45439ffb6ebd\" /> <!-- 修改成你在sharesdk后台注册的应用的appkey\" -->\n\n<!--  \n    <SinaWeibo\n        AppKey=\"4065259259\"\n        AppSecret=\"7709375de14e53328badc16ca5f95e98\"\n        Enable=\"true\"\n        Id=\"1\"\n        RedirectUrl=\"http://open.weibo.com/apps/568898243/privilege/oauth\"\n        SortId=\"1\" />-->\n    <SinaWeibo\n        Id=\"1\"\n        SortId=\"1\"\n        AppKey=\"568898243\"\n        AppSecret=\"38a4f8204cc784f81f9f0daaf31e02e3\"\n        RedirectUrl=\"http://www.sharesdk.cn\"\n        Enable=\"true\" />\n      <TencentWeibo\n        Id=\"2\" \n        SortId=\"2\"\n        AppKey=\"801307650\"\n        AppSecret=\"ae36f4ee3946e1cbb98d6965b0b2ff5c\"\n        RedirectUri=\"http://sharesdk.cn\"\n        Enable=\"true\" />\n\n    <QZone\n        Id=\"3\"\n        SortId=\"3\"\n        AppId=\"100371282\"\n        AppKey=\"aed9b0303e3ed1e27bae87c33761161d\"\n        Enable=\"true\" />\n    <Wechat\n        Id=\"4\"\n        SortId=\"4\"\n        AppId=\"wx4868b35061f87885\"\n        Enable=\"true\" />\n    \n    <WechatMoments\n        Id=\"5\"\n        SortId=\"5\"\n        AppId=\"wx4868b35061f87885\"\n        Enable=\"true\" />\n        \n\t<WechatFavorite\n        Id=\"6\"\n        SortId=\"6\"\n        AppId=\"wx4868b35061f87885\"\n        Enable=\"true\" />\n\n</DevInfor>"
  },
  {
    "path": "pedometer/build.gradle",
    "content": "apply plugin: 'com.android.application'\nandroid {\n    compileSdkVersion 28\n    buildToolsVersion '28.0.3'\n\n    defaultConfig {\n        minSdkVersion 21\n        targetSdkVersion 28\n        versionCode 1\n        versionName \"1.0\"\n        multiDexEnabled true\n    }\n    sourceSets {\n\n        main {\n            manifest.srcFile 'AndroidManifest.xml'\n            java.srcDirs = ['src']\n            resources.srcDirs = ['src']\n            aidl.srcDirs = ['src']\n            renderscript.srcDirs = ['src']\n            res.srcDirs = ['res']\n            assets.srcDirs = ['assets']\n        }\n\n    }\n\n\n    dependencies {\n        compile fileTree(dir: 'libs', include: '*.jar')\n    }\n}\n"
  },
  {
    "path": "pedometer/gradle/wrapper/gradle-wrapper.properties",
    "content": "#Wed Apr 10 15:27:10 PDT 2013\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=http\\://services.gradle.org/distributions/gradle-1.6-bin.zip\n"
  },
  {
    "path": "pedometer/local.properties",
    "content": "## This file must *NOT* be checked into Version Control Systems,\n# as it contains information specific to your local configuration.\n#\n# Location of the SDK. This is only used by Gradle.\n# For customization when using a Version Control System, please read the\n# header note.\n#Mon Dec 31 12:38:02 CST 2018\nsdk.dir=/Users/knight/Library/Android/sdk\n"
  },
  {
    "path": "pedometer/proguard-project.txt",
    "content": "# To enable ProGuard in your project, edit project.properties\n# to define the proguard.config property as described in that file.\n#\n# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in ${sdk.dir}/tools/proguard/proguard-android.txt\n# You can edit the include path and order by changing the ProGuard\n# include property in project.properties.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# Add any project specific keep options here:\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n"
  },
  {
    "path": "pedometer/res/anim/animation_main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n    <alpha\n        android:duration=\"5000\"\n        android:fromAlpha=\"0\"\n        android:toAlpha=\"1.0\" />\n\n    <scale\n        android:duration=\"2000\"\n        android:fromXScale=\"0.5\"\n        android:fromYScale=\"0.5\"\n        android:pivotX=\"50%\"\n        android:pivotY=\"50%\"\n        android:toXScale=\"1\"\n        android:toYScale=\"1\" />\n\n</set>\n"
  },
  {
    "path": "pedometer/res/anim/slide_bottom_in.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n\n    <translate\n        android:duration=\"500\"\n        android:fromYDelta=\"100%p\"\n        android:toYDelta=\"0\" />\n\n</set>"
  },
  {
    "path": "pedometer/res/anim/slide_left_in.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n\n    <translate\n        android:duration=\"300\"\n        android:fromXDelta=\"100%p\"\n        android:toXDelta=\"0\" />\n\n</set>"
  },
  {
    "path": "pedometer/res/anim/slide_left_out.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n\n    <translate\n        android:duration=\"300\"\n        android:fromXDelta=\"0\"\n        android:toXDelta=\"-100%p\" />\n\n</set>"
  },
  {
    "path": "pedometer/res/anim/slide_right_in.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n\n    <translate\n        android:duration=\"300\"\n        android:fromXDelta=\"-100%p\"\n        android:toXDelta=\"0\" />\n\n</set>"
  },
  {
    "path": "pedometer/res/anim/slide_right_out.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n\n    <translate\n        android:duration=\"300\"\n        android:fromXDelta=\"0\"\n        android:toXDelta=\"100%p\" />\n\n</set>"
  },
  {
    "path": "pedometer/res/anim/slide_top_out.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n\n  <!--   <translate\n        android:duration=\"1000\"\n        android:fromYDelta=\"-100%p\"\n        android:toYDelta=\"-100%p\" /> -->\n     <alpha\n        android:fromAlpha=\"1.0\" \n        android:duration=\"5000\" \n        android:toAlpha=\"1.0\"  />\n\n</set>"
  },
  {
    "path": "pedometer/res/drawable-hdpi/barcolor.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>            \n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">            \n<!--  设置背景色  -->               \n<item  android:id=\"@android:id/background\" >              \n<shape>\n\t<corners android:radius=\"3dip\" />               \n\t\t<gradient android:startColor=\"#d3d7d4\"              \n\t\t\t  android:endColor=\"#d3d7d4\" />              \n</shape>             \n</item>                                \n\n<!--  设置进度条颜色  -->               \n<item  android:id=\"@android:id/progress\" >              \n<clip>               \n\t<shape>                \n\t\t<corners android:radius=\"3dip\" />                \n\t<gradient  android:startColor=\"#6DCAEC\"               \n\t\t   android:endColor=\"#6DCAEC\" />               \n\t</shape>              \n</clip>             \n</item>            \n\n</layer-list>"
  },
  {
    "path": "pedometer/res/drawable-hdpi/dlbtn_selector.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <item android:drawable=\"@drawable/button_bg_green2_pressed\" android:state_focused=\"true\"/>\n    <item android:drawable=\"@drawable/button_bg_green2_pressed\" android:state_selected=\"true\"/>\n    <item android:drawable=\"@drawable/button_bg_green2_pressed\" android:state_pressed=\"true\"/>\n    <item android:drawable=\"@drawable/button_bg_green2_normal\"/>\n\n</selector>"
  },
  {
    "path": "pedometer/res/drawable-hdpi/selector_analysis.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <item android:drawable=\"@drawable/main_analysis\" android:state_checked=\"false\"></item>\n    <item android:drawable=\"@drawable/main_analysis_selected\" android:state_checked=\"true\"></item>\n\n</selector>"
  },
  {
    "path": "pedometer/res/drawable-hdpi/selector_back.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <item android:drawable=\"@drawable/back\" android:state_pressed=\"false\"></item>\n    <item android:drawable=\"@drawable/back_pressed\" android:state_pressed=\"true\"></item>\n\n</selector>"
  },
  {
    "path": "pedometer/res/drawable-hdpi/selector_button.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <item android:drawable=\"@drawable/button_pressed\" android:state_selected=\"true\"/>\n    <item android:drawable=\"@drawable/button_pressed\" android:state_pressed=\"true\"/>\n    <item android:drawable=\"@drawable/button\"/>\n\n</selector>"
  },
  {
    "path": "pedometer/res/drawable-hdpi/selector_calendar.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <item android:drawable=\"@drawable/title_history\" android:state_pressed=\"false\"></item>\n    <item android:drawable=\"@drawable/title_history_pressed\" android:state_pressed=\"true\"></item>\n\n</selector>"
  },
  {
    "path": "pedometer/res/drawable-hdpi/selector_color.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n       <!-- 默认时的图片 -->\n    <item android:color =\"#000000\" android:state_checked=\"false\" />\n    <!-- 选择时的图片 -->\n    <item android:color=\"#6DCAEC\" android:state_checked=\"true\"/>\n</selector>\n"
  },
  {
    "path": "pedometer/res/drawable-hdpi/selector_color_set.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n       <!-- 默认时的图片 -->\n    <item android:color =\"#6DCAEC\" android:state_checked=\"false\"/>\n    <!-- 选择时的图片 -->\n    <item android:color=\"#fffffb\" android:state_checked=\"true\"/>\n\n</selector>\n"
  },
  {
    "path": "pedometer/res/drawable-hdpi/selector_female.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n    <item android:drawable=\"@drawable/female\" android:state_checked=\"false\"></item>\n    <item android:drawable=\"@drawable/female1\" android:state_checked=\"true\"></item>\n\n</selector>\n"
  },
  {
    "path": "pedometer/res/drawable-hdpi/selector_friend.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <item android:drawable=\"@drawable/friend\" android:state_pressed=\"false\"></item>\n    <item android:drawable=\"@drawable/friends\" android:state_pressed=\"true\"></item>\n\n</selector>"
  },
  {
    "path": "pedometer/res/drawable-hdpi/selector_history.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <item android:drawable=\"@drawable/main_history\" android:state_checked=\"false\"></item>\n    <item android:drawable=\"@drawable/main_history_selected\" android:state_checked=\"true\"></item>\n\n</selector>"
  },
  {
    "path": "pedometer/res/drawable-hdpi/selector_image.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n     <!-- 默认时的图片 -->\n    <item android:drawable=\"@drawable/title_pedometer\" android:state_pressed=\"false\"/>\n    <!-- 选择时的图片 -->\n    <item android:drawable=\"@drawable/title_pedometer_pressed\" android:state_pressed=\"true\"/>\n\n</selector>\n"
  },
  {
    "path": "pedometer/res/drawable-hdpi/selector_male.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n    <item android:drawable=\"@drawable/male\" android:state_checked=\"false\"></item>\n    <item android:drawable=\"@drawable/male1\" android:state_checked=\"true\"></item>\n\n</selector>\n"
  },
  {
    "path": "pedometer/res/drawable-hdpi/selector_pedometer.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <item android:drawable=\"@drawable/main_pedometer\" android:state_checked=\"false\"></item>\n    <item android:drawable=\"@drawable/main_pedometer_selected\" android:state_checked=\"true\"></item>\n\n</selector>"
  },
  {
    "path": "pedometer/res/drawable-hdpi/selector_pk.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n        <item android:drawable=\"@drawable/main_pk\" android:state_checked=\"false\"></item>\n    <item android:drawable=\"@drawable/main_pk_selected\" android:state_checked=\"true\"></item>\n\n</selector>\n"
  },
  {
    "path": "pedometer/res/drawable-hdpi/selector_set.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <item android:drawable=\"@drawable/main_set\" android:state_checked=\"false\"></item>\n    <item android:drawable=\"@drawable/main_set_selected\" android:state_checked=\"true\"></item>\n\n</selector>"
  },
  {
    "path": "pedometer/res/drawable-hdpi/selector_tab.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <!-- 默认时的图片 -->\n    <item android:drawable=\"@android:color/transparent\" android:state_checked=\"false\"/>\n    <!-- 选择时的图片 -->\n    <item android:drawable=\"@color/tab_selected_bg\" android:state_checked=\"true\"/>\n\n</selector>"
  },
  {
    "path": "pedometer/res/drawable-ldpi/headpic_bg_frame.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><!-- 半透明圆角背景 -->\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\">\n\n    <solid android:color=\"#4033b5e5\" />\n\n    <stroke\n        android:width=\"1dp\"\n        android:color=\"#33b5e5\" />\n\n    <corners android:radius=\"5.0dip\" />\n\n</shape>"
  },
  {
    "path": "pedometer/res/drawable-xhdpi/common_title_text_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:color=\"@color/white\" android:state_checked=\"true\"></item>\n    <item android:color=\"@color/color_c5c5c5\" android:state_checked=\"false\"></item>\n</selector>"
  },
  {
    "path": "pedometer/res/drawable-xhdpi/dialog_backgroud.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n       android:shape=\"rectangle\">\n\n    <solid android:color=\"@color/white\"/>\n\n\n    <corners android:radius=\"5.0dip\"/>\n\n</shape>"
  },
  {
    "path": "pedometer/res/drawable-xhdpi/dialog_left_btn_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:state_pressed=\"false\">\n        <shape android:shape=\"rectangle\">\n            <solid android:color=\"@color/white\"/>\n            <corners android:bottomLeftRadius=\"5.0dip\"/>\n        </shape>\n    </item>\n    <item android:state_pressed=\"true\">\n        <shape android:shape=\"rectangle\">\n            <solid android:color=\"@color/color_e7e7e7\"/>\n            <corners android:bottomLeftRadius=\"5.0dip\"/>\n        </shape>\n    </item>\n</selector>"
  },
  {
    "path": "pedometer/res/drawable-xhdpi/dialog_right_btn_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:state_pressed=\"false\">\n        <shape android:shape=\"rectangle\">\n            <solid android:color=\"@color/white\"/>\n            <corners android:bottomRightRadius=\"5.0dip\"/>\n        </shape>\n    </item>\n    <item android:state_pressed=\"true\">\n        <shape android:shape=\"rectangle\">\n            <solid android:color=\"@color/color_e7e7e7\"/>\n            <corners android:bottomRightRadius=\"5.0dip\"/>\n        </shape>\n    </item>\n</selector>"
  },
  {
    "path": "pedometer/res/drawable-xhdpi/ssdk_oks_shake_to_share_back.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\" \n    android:shape=\"rectangle\" >\n    \n    <padding \n        android:left=\"10dp\"\n        android:top=\"10dp\"\n        android:right=\"10dp\"\n        android:bottom=\"10dp\" />\n    \n    <gradient\n        android:angle=\"90\"  \n        android:endColor=\"#7f000000\"  \n        android:startColor=\"#7f000000\" />  \n\n    <corners\n        android:bottomLeftRadius=\"12dp\"  \n        android:bottomRightRadius=\"12dp\"  \n        android:topLeftRadius=\"12dp\"  \n        android:topRightRadius=\"12dp\" />  \n\n    <stroke\n        android:width=\"4dip\"  \n        android:color=\"#ff7f7f7f\" />\n    \n</shape>\n"
  },
  {
    "path": "pedometer/res/layout/activity_set_headpic.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:orientation=\"vertical\"\n    android:layout_width=\"fill_parent\"\n    android:layout_height=\"fill_parent\"\n    android:background=\"#00ffffff\">\n\n    <RelativeLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"250dp\"\n        android:layout_alignParentBottom=\"true\"\n        android:background=\"#ffffff\"\n        android:orientation=\"vertical\">\n\n        <Button\n            android:id=\"@+id/btn_take_pictures\"\n            android:text=\"拍照\"\n            android:textSize=\"25sp\"\n            android:textColor=\"#000000\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"95dp\"\n            android:background=\"#ffffff\"\n            android:layout_marginLeft=\"40dp\"\n            android:layout_marginRight=\"40dp\" />\n\n        <TextView\n            android:id=\"@+id/layout_1\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"1dp\"\n            android:background=\"#33b5e5\"\n            android:layout_below=\"@+id/btn_take_pictures\" />\n\n        <Button\n            android:id=\"@+id/btn_from_album\"\n            android:text=\"从手机相册选择\"\n            android:textSize=\"25sp\"\n            android:textColor=\"#000000\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"95dp\"\n            android:layout_marginLeft=\"40dp\"\n            android:background=\"#ffffff\"\n            android:layout_marginRight=\"40dp\"\n            android:layout_below=\"@+id/layout_1\" />\n\n        <TextView\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"1dp\"\n            android:background=\"#33b5e5\"\n            android:layout_below=\"@+id/btn_from_album\" />\n\n        <Button\n            android:id=\"@+id/btn_cancel\"\n            android:text=\"退出\"\n            android:textSize=\"25sp\"\n            android:textColor=\"#ffffff\"\n            android:background=\"#33b5e5\"\n            android:layout_alignParentBottom=\"true\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"60dp\" />\n\n    </RelativeLayout>\n\n</RelativeLayout>"
  },
  {
    "path": "pedometer/res/layout/analyze.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\" >\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"50dp\"\n        android:orientation=\"horizontal\" >\n\n        <ImageView\n            android:layout_width=\"50dp\"\n            android:layout_height=\"50dp\"\n            android:layout_gravity=\"left\"\n            android:layout_marginLeft=\"10dp\"\n            android:contentDescription=\"@string/app_name\" />\n\n        <TextView\n            android:id=\"@+id/analysis\"\n            android:layout_width=\"0dp\"\n            android:layout_height=\"50dp\"\n            android:layout_gravity=\"center\"\n            android:layout_weight=\"1\"\n            android:gravity=\"center\"\n            android:text=\"@string/analysis\"\n            android:textColor=\"#6DCAEC\"\n            android:textSize=\"20sp\" />\n\n        <ImageView\n            android:layout_width=\"50dp\"\n            android:layout_height=\"50dp\"\n            android:layout_gravity=\"left\"\n            android:layout_marginLeft=\"10dp\"\n            android:contentDescription=\"@string/app_name\" />\n    </LinearLayout>\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:background=\"@android:color/darker_gray\" />\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"30dp\"\n        android:orientation=\"horizontal\" >\n\n        <TextView\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\"\n            android:gravity=\"center\"\n            android:text=\"@string/sumstep\"\n            android:textSize=\"20sp\" />\n\n        <TextView\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\"\n            android:gravity=\"center\"\n            android:text=\"@string/averagestep\"\n            android:textSize=\"20sp\" />\n    </LinearLayout>\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:orientation=\"horizontal\" >\n\n        <TextView\n            android:id=\"@+id/sum_step\"\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\"\n            android:gravity=\"center\"\n            android:text=\"@string/_0\"\n            android:textColor=\"#6DCAEC\"\n            android:textSize=\"30sp\"\n            android:typeface=\"normal\" />\n\n        <TextView\n            android:id=\"@+id/average_step\"\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\"\n            android:gravity=\"center\"\n            android:text=\"@string/_0\"\n            android:textColor=\"#6DCAEC\"\n            android:textSize=\"30sp\" />\n    </LinearLayout>\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"0dp\"\n        android:layout_weight=\"10\"\n        android:orientation=\"horizontal\" >\n\n        <com.bit.pedometer.ui.view.HistogramView\n            android:id=\"@+id/histograms\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"/>\n    </LinearLayout>\n\n</LinearLayout>"
  },
  {
    "path": "pedometer/res/layout/common_title.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"horizontal\">\n\n    <RelativeLayout\n        android:id=\"@+id/title_layout\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"@dimen/common_title_height\"\n        android:background=\"@color/color_5d6265\">\n\n        <LinearLayout\n            android:id=\"@+id/left_title_layout\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"match_parent\"\n            android:layout_alignParentLeft=\"true\"\n            android:layout_centerVertical=\"true\"\n            android:gravity=\"center\"\n            android:orientation=\"horizontal\"\n            android:paddingLeft=\"15dp\"\n            android:paddingRight=\"15dp\">\n\n            <ImageView\n                android:id=\"@+id/left_title_image\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:src=\"@drawable/btn_back\"\n                android:textColor=\"#ffffff\"\n                android:visibility=\"gone\" />\n\n            <TextView\n                android:id=\"@+id/left_title_text\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginLeft=\"@dimen/item_distance\"\n                android:text=\"退出\"\n                android:textColor=\"#ffffff\"\n                android:textSize=\"@dimen/font_size_middle\"\n                android:visibility=\"gone\" />\n\n        </LinearLayout>\n\n        <TextView\n            android:id=\"@+id/center_title\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"match_parent\"\n            android:layout_centerInParent=\"true\"\n            android:layout_centerVertical=\"true\"\n            android:ellipsize=\"end\"\n            android:gravity=\"center\"\n            android:maxEms=\"8\"\n            android:text=\"TITLE\"\n            android:textColor=\"#ffffff\"\n            android:textSize=\"@dimen/font_size_large\" />\n\n        <RelativeLayout\n            android:id=\"@+id/title_two_button\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:orientation=\"vertical\"\n            android:visibility=\"gone\">\n\n            <RadioGroup\n                android:id=\"@+id/title_radiogroup\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"match_parent\"\n                android:layout_centerInParent=\"true\"\n                android:orientation=\"horizontal\">\n\n                <RadioButton\n                    android:id=\"@+id/title_first_button\"\n                    android:layout_width=\"0dp\"\n                    android:layout_height=\"match_parent\"\n                    android:layout_marginRight=\"@dimen/dimen_5dp\"\n                    android:layout_weight=\"1\"\n                    android:button=\"@null\"\n                    android:checked=\"true\"\n                    android:gravity=\"center\"\n                    android:paddingLeft=\"@dimen/dimen_10dp\"\n                    android:paddingRight=\"@dimen/dimen_10dp\"\n                    android:singleLine=\"true\"\n                    android:text=\"我发布的\"\n                    android:textColor=\"@drawable/common_title_text_background\"\n                    android:textSize=\"@dimen/font_size_small\"\n                    android:visibility=\"gone\" />\n\n                <RadioButton\n                    android:id=\"@+id/title_left_button\"\n                    android:layout_width=\"0dp\"\n                    android:layout_height=\"match_parent\"\n                    android:layout_marginLeft=\"@dimen/dimen_5dp\"\n                    android:layout_marginRight=\"@dimen/dimen_5dp\"\n                    android:layout_weight=\"1\"\n                    android:button=\"@null\"\n                    android:checked=\"true\"\n                    android:gravity=\"center\"\n                    android:paddingLeft=\"@dimen/dimen_10dp\"\n                    android:paddingRight=\"@dimen/dimen_10dp\"\n                    android:singleLine=\"true\"\n                    android:text=\"寻找孩子\"\n                    android:textColor=\"@drawable/common_title_text_background\"\n                    android:textSize=\"@dimen/font_size_small\" />\n\n                <RadioButton\n                    android:id=\"@+id/title_right_button\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"match_parent\"\n                    android:layout_marginLeft=\"@dimen/dimen_5dp\"\n                    android:button=\"@null\"\n                    android:gravity=\"center\"\n                    android:paddingLeft=\"@dimen/dimen_10dp\"\n                    android:paddingRight=\"@dimen/dimen_10dp\"\n                    android:singleLine=\"true\"\n                    android:text=\"孩子找家\"\n                    android:textColor=\"@drawable/common_title_text_background\"\n                    android:textSize=\"@dimen/font_size_small\" />\n\n            </RadioGroup>\n\n            <LinearLayout\n                android:id=\"@+id/line_layout\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"@dimen/dimen_3dp\"\n                android:layout_alignLeft=\"@+id/title_radiogroup\"\n                android:layout_alignParentBottom=\"true\"\n                android:layout_alignRight=\"@+id/title_radiogroup\"\n                android:orientation=\"horizontal\">\n\n                <View\n                    android:id=\"@+id/title_first_line\"\n                    android:layout_width=\"@dimen/dimen_0dp\"\n                    android:layout_height=\"match_parent\"\n                    android:layout_marginRight=\"@dimen/dimen_5dp\"\n                    android:layout_weight=\"1\"\n                    android:background=\"#f98425\"\n                    android:visibility=\"gone\"/>\n\n                <View\n                    android:id=\"@+id/title_left_line\"\n                    android:layout_width=\"@dimen/dimen_0dp\"\n                    android:layout_height=\"match_parent\"\n                    android:layout_marginLeft=\"@dimen/dimen_5dp\"\n                    android:layout_marginRight=\"@dimen/dimen_5dp\"\n                    android:layout_weight=\"1\"\n                    android:background=\"#f98425\" />\n\n                <View\n                    android:id=\"@+id/title_right_line\"\n                    android:layout_width=\"@dimen/dimen_0dp\"\n                    android:layout_height=\"match_parent\"\n                    android:layout_marginLeft=\"@dimen/dimen_5dp\"\n                    android:layout_weight=\"1\"\n                    android:background=\"#f98425\"\n                    android:visibility=\"invisible\"/>\n            </LinearLayout>\n\n        </RelativeLayout>\n\n        <LinearLayout\n            android:id=\"@+id/right_title_layout\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"match_parent\"\n            android:layout_alignParentRight=\"true\"\n            android:gravity=\"center\"\n            android:orientation=\"horizontal\"\n            android:paddingLeft=\"15dp\"\n            android:paddingRight=\"15dp\">\n\n            <TextView\n                android:id=\"@+id/right_title_text\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:textColor=\"#ffffff\"\n                android:textSize=\"@dimen/font_size_middle\"\n                android:visibility=\"gone\" />\n\n            <ImageView\n                android:id=\"@+id/right_title_image\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginLeft=\"@dimen/item_distance\"\n                android:visibility=\"gone\" />\n        </LinearLayout>\n\n        <LinearLayout\n            android:id=\"@+id/right_second_title_layout\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"match_parent\"\n            android:layout_toLeftOf=\"@id/right_title_layout\"\n            android:gravity=\"center\"\n            android:orientation=\"horizontal\"\n            android:paddingLeft=\"15dp\"\n            android:paddingRight=\"5dp\">\n\n            <ImageView\n                android:id=\"@+id/right_second_title_image\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginLeft=\"@dimen/item_distance\"\n                android:visibility=\"gone\" />\n        </LinearLayout>\n    </RelativeLayout>\n</LinearLayout>"
  },
  {
    "path": "pedometer/res/layout/dialog_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n                android:layout_width=\"287dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_centerHorizontal=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:background=\"@drawable/dialog_backgroud\">\n\n\n    <TextView\n        android:id=\"@+id/dialog_title\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_centerHorizontal=\"true\"\n        android:layout_marginTop=\"@dimen/dimen_17dp\"\n        android:text=\"提示\"\n        android:textColor=\"@color/text_color\"\n        android:textSize=\"@dimen/font_size_small\"/>\n\n    <TextView\n        android:id=\"@+id/dialog_content\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_below=\"@id/dialog_title\"\n        android:layout_centerHorizontal=\"true\"\n        android:layout_marginTop=\"@dimen/dimen_14dp\"\n        android:gravity=\"center\"\n        android:text=\"提示\"\n        android:textColor=\"@color/text_color\"\n        android:textSize=\"@dimen/font_size_small\"/>\n\n    <TextView\n        android:id=\"@+id/dialog_divorce_horizon_line\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1px\"\n        android:layout_below=\"@+id/dialog_content\"\n        android:layout_marginLeft=\"@dimen/dimen_5dp\"\n        android:layout_marginRight=\"@dimen/dimen_5dp\"\n        android:layout_marginTop=\"@dimen/dimen_17dp\"\n        android:background=\"@color/color_858e99\"/>\n\n    <TextView\n        android:id=\"@+id/dialog_cancel\"\n        android:layout_width=\"143dp\"\n        android:layout_height=\"44dp\"\n        android:layout_below=\"@id/dialog_divorce_horizon_line\"\n        android:background=\"@drawable/dialog_left_btn_background\"\n        android:gravity=\"center\"\n        android:text=\"取消\"\n        android:textColor=\"@color/blue\"\n        android:textSize=\"@dimen/font_size_middle\"/>\n\n    <TextView\n        android:id=\"@+id/dialog_divorce_vertical_line\"\n        android:layout_width=\"1px\"\n        android:layout_height=\"38dp\"\n        android:layout_below=\"@id/dialog_divorce_horizon_line\"\n        android:layout_marginBottom=\"@dimen/dimen_3dp\"\n        android:layout_marginTop=\"@dimen/dimen_3dp\"\n        android:layout_toRightOf=\"@+id/dialog_cancel\"\n        android:background=\"@color/color_858e99\"\n        android:gravity=\"center\"\n        />\n\n    <TextView\n        android:id=\"@+id/dialog_sure\"\n        android:layout_width=\"143dp\"\n        android:layout_height=\"44dp\"\n        android:layout_below=\"@id/dialog_divorce_horizon_line\"\n        android:layout_toRightOf=\"@+id/dialog_divorce_vertical_line\"\n        android:background=\"@drawable/dialog_right_btn_background\"\n        android:gravity=\"center\"\n        android:text=\"确定\"\n        android:textColor=\"@color/blue\"\n        android:textSize=\"@dimen/font_size_middle\"/>\n</RelativeLayout>"
  },
  {
    "path": "pedometer/res/layout/group_list.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"horizontal\" >\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"60dp\"\n        android:layout_weight=\"1\"\n        android:gravity=\"center\"\n        android:orientation=\"horizontal\"\n        android:paddingLeft=\"20dp\" \n        android:paddingRight=\"10dp\">\n\n        <TextView\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\"\n            android:gravity=\"center\"\n            android:text=\"@string/_00\"\n            android:textColor=\"#000000\"\n            android:textSize=\"15sp\" />\n\n        <TextView\n            android:id=\"@+id/group_number\"\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"4\"\n            android:singleLine=\"true\"\n            android:gravity=\"center\"\n            android:text=\"demo\"\n            android:textColor=\"@android:color/holo_blue_light\"\n            android:textSize=\"30sp\"\n            android:textStyle=\"bold\" />\n\n        <TextView\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\"\n            android:gravity=\"center\"\n            android:text=\"@string/_01\"\n            android:textColor=\"#000000\"\n            android:textSize=\"15sp\" />\n    </LinearLayout>\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"60dp\"\n        android:layout_weight=\"1\"\n        android:gravity=\"right|center\"\n        android:orientation=\"horizontal\" >\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\"\n            android:text=\"@string/average_steps\"\n            android:textColor=\"#000000\"\n            android:textSize=\"15sp\" />\n\n        <TextView\n            android:id=\"@+id/average_number\"\n            android:layout_weight=\"2\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"demo\"\n            android:textColor=\"@android:color/holo_blue_light\"\n            android:textSize=\"30sp\"\n            android:textStyle=\"bold\" \n            android:singleLine=\"true\"/>\n    </LinearLayout>\n\n</LinearLayout>"
  },
  {
    "path": "pedometer/res/layout/group_member_list.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"horizontal\" \n    android:background=\"#E0EEEE\">\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"60dp\"\n        android:layout_weight=\"1\"\n        android:gravity=\"center\"\n        android:orientation=\"horizontal\" \n        android:paddingLeft=\"20dp\">\n\n        <ImageView\n            android:id=\"@+id/group_member_pic\"\n            android:layout_width=\"50dp\"\n            android:layout_height=\"50dp\"\n            android:layout_weight=\"2\"\n            android:contentDescription=\"@string/_0\"/>\n\n        <LinearLayout\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"60dp\"\n            android:layout_weight=\"3\"\n            android:orientation=\"horizontal\"\n             >\n\n            \n\n            <TextView\n                android:id=\"@+id/group_member_name\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:text=\"demo\"\n                android:gravity=\"left|center\"\n                android:layout_gravity=\"center\"\n                android:textColor=\"@android:color/holo_blue_light\"\n                android:textSize=\"20sp\"\n                android:textStyle=\"bold\"\n                android:singleLine=\"true\" />\n        </LinearLayout>\n    </LinearLayout>\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"60dp\"\n        android:layout_weight=\"1\"\n        android:gravity=\"left|center\"\n        android:orientation=\"horizontal\" >\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/_03\"\n            android:textColor=\"#000000\"\n            android:textSize=\"15sp\" />\n\n        <TextView\n            android:id=\"@+id/group_memeber_number\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"demo\"\n            android:textColor=\"@android:color/holo_blue_light\"\n            android:textSize=\"30sp\"\n            android:textStyle=\"bold\" \n            android:singleLine=\"true\"/>\n    </LinearLayout>\n\n</LinearLayout>"
  },
  {
    "path": "pedometer/res/layout/header_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:orientation=\"vertical\" >\n\n    <RelativeLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:paddingBottom=\"10dip\"\n        android:paddingTop=\"10dip\" >\n\n        <LinearLayout\n            android:id=\"@+id/layout\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_centerInParent=\"true\"\n            android:gravity=\"center\"\n            android:orientation=\"vertical\" >\n\n            <TextView\n                android:id=\"@+id/tip\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:text=\"下拉可以刷新！\" />\n\n            <TextView\n                android:id=\"@+id/lastupdate_time\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\" />\n        </LinearLayout>\n\n        <ImageView\n            android:id=\"@+id/arrow\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_toLeftOf=\"@id/layout\"\n            android:layout_marginRight=\"20dip\"\n            android:src=\"@drawable/pull_to_refresh_arrow\" />\n\n        <ProgressBar\n            android:id=\"@+id/progress\"\n            style=\"?android:attr/progressBarStyleSmall\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_toLeftOf=\"@id/layout\"\n            android:layout_marginRight=\"20dip\"\n            android:visibility=\"gone\" />\n    </RelativeLayout>\n\n</LinearLayout>"
  },
  {
    "path": "pedometer/res/layout/history.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\" >\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"50dp\"\n        android:orientation=\"horizontal\" >\n\n        <ImageView\n            android:id=\"@+id/date_image\"\n            android:layout_width=\"50dp\"\n            android:layout_height=\"50dp\"\n            android:layout_gravity=\"left\"\n            android:layout_marginLeft=\"10dp\"\n            android:background=\"@drawable/selector_tab\"\n            android:contentDescription=\"@string/app_name\"\n            android:src=\"@drawable/selector_calendar\" />\n\n        <TextView\n            android:id=\"@+id/date_text\"\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center\"\n            android:layout_weight=\"1\"\n            android:gravity=\"left\"\n            android:text=\"@string/today\"\n            android:textColor=\"#6DCAEC\"\n            android:textSize=\"20sp\" />\n\n        <ImageView\n            android:layout_width=\"50dp\"\n            android:layout_height=\"50dp\"\n            android:layout_gravity=\"left\"\n            android:layout_marginLeft=\"10dp\"\n            android:contentDescription=\"@string/app_name\" />\n    </LinearLayout>\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:background=\"@android:color/darker_gray\" />\n\n    <TextView\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"10dp\"\n        android:layout_marginTop=\"15dp\"\n        android:text=\"@string/sport\"\n        android:textSize=\"20sp\" />\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"10dp\"\n        android:orientation=\"horizontal\" >\n\n        <TextView\n            android:id=\"@+id/number\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginLeft=\"10dp\"\n            android:singleLine=\"true\"\n            android:typeface=\"normal\"\n            android:text=\"@string/_0\"\n            android:textColor=\"#6DCAEC\"\n            android:textSize=\"90sp\" />\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginLeft=\"5dp\"\n            android:text=\"@string/step\"\n            android:textSize=\"20sp\" />\n    </LinearLayout>\n\n    <ProgressBar\n        android:id=\"@+id/progressBar\"\n        style=\"?android:attr/progressBarStyleHorizontal\"\n        android:layout_width=\"300dp\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"10dp\"\n        android:max=\"1000\"\n        android:progressDrawable=\"@drawable/barcolor\"\n        />\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"20dp\"\n        android:orientation=\"horizontal\" >\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginLeft=\"10dp\"\n            android:text=\"@string/complete\"\n            android:textSize=\"15sp\" />\n\n        <TextView\n            android:id=\"@+id/ratio\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginLeft=\"1dp\"\n            android:text=\"@string/_0_\"\n            android:textSize=\"15sp\" />\n\n        <TextView\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginLeft=\"10dp\"\n            android:layout_marginRight=\"10dp\"\n            android:layout_weight=\"1\"\n            android:gravity=\"right\"\n            android:text=\"@string/_10000\"\n            android:textSize=\"15sp\" />\n    </LinearLayout>\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:layout_marginTop=\"10dp\"\n        android:background=\"@android:color/darker_gray\" />\n\n</LinearLayout>"
  },
  {
    "path": "pedometer/res/layout/member_add.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\" >\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"50dp\"\n        android:orientation=\"horizontal\" >\n\n        <ImageView\n            android:id=\"@+id/member_add_back\"\n            android:layout_width=\"50dp\"\n            android:layout_height=\"50dp\"\n            android:layout_gravity=\"left\"\n            android:layout_marginLeft=\"10dp\"\n            android:contentDescription=\"@string/app_name\"\n            android:src=\"@drawable/selector_back\" />\n\n        <TextView\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center\"\n            android:layout_weight=\"1\"\n            android:gravity=\"center\"\n            android:text=\"@string/_09\"\n            android:textColor=\"#6DCAEC\"\n            android:textSize=\"20sp\" />\n\n        <ImageView\n            android:layout_width=\"50dp\"\n            android:layout_height=\"50dp\"\n            android:layout_gravity=\"left\"\n            android:layout_marginLeft=\"10dp\"\n            android:contentDescription=\"@string/app_name\" />\n    </LinearLayout>\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:background=\"@android:color/darker_gray\" />\n\n    <com.bit.pedometer.ui.fragment.tools.ReFlashListView\n        android:id=\"@+id/member_add_list\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\" >\n    </com.bit.pedometer.ui.fragment.tools.ReFlashListView>\n\n</LinearLayout>"
  },
  {
    "path": "pedometer/res/layout/member_add_list.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\" >\n\n    <LinearLayout\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"60dip\"\n        android:background=\"@drawable/app_item_bg\"\n        android:gravity=\"center_vertical\"\n        android:orientation=\"horizontal\" >\n\n        <ImageView\n            android:id=\"@+id/member_add_list_picture\"\n            android:layout_width=\"50dip\"\n            android:layout_height=\"50dip\"\n            android:layout_marginLeft=\"10dip\" />\n\n        <LinearLayout\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginLeft=\"10dip\"\n            android:layout_weight=\"1\"\n            android:orientation=\"vertical\" >\n\n            <TextView\n                android:id=\"@+id/member_add_list_name\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:text=\"姓名\"\n                android:textColor=\"@android:color/black\"\n                android:textSize=\"18sp\" />\n\n            <TextView\n                android:id=\"@+id/member_add_list_steps\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginTop=\"5dip\"\n                android:text=\"步数\"\n                android:textSize=\"14sp\" />\n        </LinearLayout>\n\n        <Button\n            android:id=\"@+id/member_add_list_button\"\n            android:layout_width=\"100dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginRight=\"10dip\"\n            android:layout_weight=\"0.11\"\n            android:background=\"@drawable/selector_button\"\n            android:gravity=\"center\"\n            android:singleLine=\"true\"\n            android:text=\"添加好友\" \n            android:visibility=\"gone\"/>\n\n        <TextView\n            android:id=\"@+id/already_add\"\n            android:layout_width=\"80dip\"\n            android:layout_height=\"30dip\"\n            android:layout_marginRight=\"10dip\"\n            android:gravity=\"center\"\n            android:text=\"已添加\"\n            android:textColor=\"#6DCAEC\"\n            android:textSize=\"20sp\"\n            android:visibility=\"gone\" />\n    </LinearLayout>\n\n</LinearLayout>"
  },
  {
    "path": "pedometer/res/layout/member_list.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"horizontal\" \n    >\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:layout_weight=\"1\"\n        android:gravity=\"center\"\n        android:orientation=\"horizontal\" >\n\n        <ImageView\n            android:id=\"@+id/pic\"\n            android:layout_width=\"40dp\"\n            android:layout_height=\"40dp\"\n            android:layout_weight=\"1\"\n            android:contentDescription=\"@string/_0\" />\n\n        <LinearLayout\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"60dp\"\n            android:layout_weight=\"3\"\n            android:gravity=\"center\"\n            android:orientation=\"vertical\" >\n\n            <LinearLayout\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n                android:layout_weight=\"1\"\n                android:gravity=\"center|left\"\n                android:orientation=\"vertical\" >\n            <TextView\n                android:id=\"@+id/name\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:layout_gravity=\"center\"\n                android:text=\"demo\"\n                android:layout_marginLeft=\"2dp\"\n                android:textColor=\"#000000\"\n                android:textSize=\"16sp\"/>\n            </LinearLayout>\n\n            <LinearLayout\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n                android:layout_weight=\"1\"\n                android:gravity=\"center|left\"\n                android:orientation=\"horizontal\" >\n                <TextView\n                    android:layout_width=\"0dp\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:gravity=\"center\"\n                    android:text=\"@string/stepNumber\"\n                    android:textColor=\"#000000\"\n                    android:textSize=\"16sp\" \n                    android:singleLine=\"true\"/>\n\n                <TextView\n                    android:id=\"@+id/steps\"\n                    android:layout_width=\"0dp\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"2\"\n                    android:gravity=\"center\"\n                    android:text=\"demo\"\n                    android:textColor=\"@android:color/holo_blue_light\"\n                    android:textSize=\"16sp\"\n                    android:textStyle=\"bold\" />\n            </LinearLayout>\n        </LinearLayout>\n    </LinearLayout>\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:layout_weight=\"1\"\n        android:gravity=\"right|center\"\n        android:orientation=\"horizontal\" >\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginRight=\"10dp\"\n            android:text=\"@string/di\"\n            android:textColor=\"#000000\"\n            android:textSize=\"15sp\"/>\n        <TextView\n            android:id=\"@+id/number\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginRight=\"20dp\"\n            android:text=\"demo\"\n            android:textColor=\"@android:color/holo_blue_light\"\n            android:textSize=\"30sp\"\n            android:textStyle=\"bold\" />\n    </LinearLayout>\n\n</LinearLayout>"
  },
  {
    "path": "pedometer/res/layout/membet_set.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"@drawable/background\"\n    android:orientation=\"vertical\" >\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"120dp\"\n        android:gravity=\"left|center_vertical\"\n        android:orientation=\"horizontal\"\n        android:paddingLeft=\"30dp\" >\n\n        <ImageView\n            android:id=\"@+id/member_picture\"\n            android:layout_width=\"80dp\"\n            android:layout_height=\"80dp\"\n            android:contentDescription=\"@string/_0\" />\n\n        <LinearLayout\n            android:layout_width=\"160dp\"\n            android:layout_height=\"80dp\"\n            android:gravity=\"center_vertical\"\n            android:orientation=\"vertical\"\n            android:paddingLeft=\"15dp\" >\n\n            <LinearLayout\n                android:layout_width=\"160dp\"\n                android:layout_height=\"40dp\"\n                android:gravity=\"center_vertical\"\n                android:orientation=\"horizontal\" >\n\n                <TextView\n                    android:id=\"@+id/member_name\"\n                    android:layout_width=\"80dp\"\n                    android:layout_height=\"40dp\"\n                    android:gravity=\"left|center_vertical\"\n                    android:text=\"@string/male\"\n                    android:textColor=\"@android:color/holo_blue_light\"\n                    android:textSize=\"20sp\" />\n\n                <ImageView\n                    android:id=\"@+id/member_sexpic\"\n                    android:layout_width=\"40dp\"\n                    android:layout_height=\"40dp\"\n                    android:src=\"@drawable/female_set\" />\n            </LinearLayout>\n\n            <TextView\n                android:layout_width=\"160dp\"\n                android:layout_height=\"30dp\"\n                android:text=\"@string/_04\"\n                android:textColor=\"#7B7B7B\"\n                android:textSize=\"20sp\" />\n        </LinearLayout>\n    </LinearLayout>\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:background=\"@android:color/darker_gray\" />\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:layout_marginLeft=\"15dp\"\n        android:layout_marginRight=\"15dp\"\n        android:background=\"#d0d0d0\" />\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:layout_marginLeft=\"15dp\"\n        android:layout_marginRight=\"15dp\"\n        android:background=\"#d0d0d0\" />\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"70dp\"\n        android:orientation=\"horizontal\" >\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"55dp\"\n            android:layout_gravity=\"left|center_vertical\"\n            android:layout_marginLeft=\"15dp\"\n            android:layout_weight=\"1\"\n            android:gravity=\"left|center_vertical\"\n            android:text=\"@string/weight\"\n            android:textColor=\"#7B7B7B\"\n            android:textSize=\"20sp\" />\n\n        <TextView\n            android:id=\"@+id/member_weight\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"55dp\"\n            android:layout_gravity=\"right|center_vertical\"\n            android:layout_marginRight=\"5dp\"\n            android:layout_weight=\"1\"\n            android:gravity=\"right|center_vertical\"\n            android:text=\"@string/_55\"\n            android:textColor=\"@android:color/holo_blue_light\"\n            android:textSize=\"20sp\" />\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"55dp\"\n            android:layout_gravity=\"right|center_vertical\"\n            android:layout_marginRight=\"15dp\"\n            android:gravity=\"right|center_vertical\"\n            android:text=\"@string/kg\"\n            android:textColor=\"@android:color/holo_blue_light\"\n            android:textSize=\"20sp\" />\n    </LinearLayout>\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:layout_marginLeft=\"15dp\"\n        android:layout_marginRight=\"15dp\"\n        android:background=\"#d0d0d0\" />\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"70dp\"\n        android:orientation=\"horizontal\" >\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"55dp\"\n            android:layout_gravity=\"left|center_vertical\"\n            android:layout_marginLeft=\"15dp\"\n            android:layout_weight=\"1\"\n            android:gravity=\"left|center_vertical\"\n            android:text=\"@string/StepNumber\"\n            android:textColor=\"#7B7B7B\"\n            android:textSize=\"20sp\" />\n\n        <TextView\n            android:id=\"@+id/member_steps\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"55dp\"\n            android:layout_gravity=\"right|center_vertical\"\n            android:layout_marginRight=\"5dp\"\n            android:layout_weight=\"1\"\n            android:gravity=\"right|center_vertical\"\n            android:text=\"@string/_2\"\n            android:textColor=\"@android:color/holo_blue_light\"\n            android:textSize=\"20sp\" />\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"55dp\"\n            android:layout_gravity=\"right|center_vertical\"\n            android:layout_marginRight=\"15dp\"\n            android:gravity=\"right|center_vertical\"\n            android:text=\"@string/bu\"\n            android:textColor=\"@android:color/holo_blue_light\"\n            android:textSize=\"20sp\" />\n    </LinearLayout>\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:layout_marginLeft=\"15dp\"\n        android:layout_marginRight=\"15dp\"\n        android:background=\"#d0d0d0\" />\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"120dp\"\n        android:orientation=\"horizontal\" >\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"55dp\"\n            android:layout_gravity=\"left|center_vertical\"\n            android:layout_marginLeft=\"15dp\"\n            android:layout_weight=\"1\"\n            android:gravity=\"left|center_vertical\"\n            android:text=\"@string/_05\"\n            android:textColor=\"#7B7B7B\"\n            android:textSize=\"20sp\" />\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"55dp\"\n            android:layout_gravity=\"right|center_vertical\"\n            android:gravity=\"right|center_vertical\"\n            android:text=\"@string/_08\"\n            android:textColor=\"@android:color/holo_blue_light\"\n            android:textSize=\"20sp\" />\n\n        <com.bit.pedometer.ui.fragment.tools.MyNumberPicker\n            android:id=\"@+id/member_numberPicker\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"right|center_vertical\"\n            android:layout_marginLeft=\"15dp\"\n            android:layout_marginRight=\"15dp\"\n            android:gravity=\"right|center_vertical\" />\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"55dp\"\n            android:layout_gravity=\"right|center_vertical\"\n            android:layout_marginRight=\"15dp\"\n            android:gravity=\"right|center_vertical\"\n            android:text=\"@string/_06\"\n            android:textColor=\"@android:color/holo_blue_light\"\n            android:textSize=\"20sp\" />\n    </LinearLayout>\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:layout_marginLeft=\"15dp\"\n        android:layout_marginRight=\"15dp\"\n        android:background=\"#d0d0d0\" />\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"100dp\"\n        android:gravity=\"bottom\"\n        android:orientation=\"horizontal\" >\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"100dp\"\n            android:layout_weight=\"1\"\n            android:gravity=\"bottom|center_horizontal\"\n            android:orientation=\"horizontal\" >\n\n            <Button\n                android:id=\"@+id/member_button1\"\n                android:layout_width=\"120dp\"\n                android:layout_height=\"60dp\"\n                android:background=\"@drawable/button1\" />\n        </LinearLayout>\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"100dp\"\n            android:layout_weight=\"1\"\n            android:gravity=\"bottom|center_horizontal\"\n            android:orientation=\"horizontal\" >\n\n            <Button\n                android:id=\"@+id/member_button2\"\n                android:layout_width=\"120dp\"\n                android:layout_height=\"60dp\"\n                android:background=\"@drawable/button2\" />\n        </LinearLayout>\n    </LinearLayout>\n\n</LinearLayout>"
  },
  {
    "path": "pedometer/res/layout/page_mian.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\" >\n\n    <FrameLayout\n        android:id=\"@+id/Fragment\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"0dp\"\n        android:layout_weight=\"1\" >\n    </FrameLayout>\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:background=\"@android:color/darker_gray\" />\n\n    <RadioGroup\n        android:id=\"@+id/radioGroup\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:orientation=\"horizontal\" >\n\n        <RadioButton\n            android:id=\"@+id/btn1\"\n            android:layout_width=\"0dp\"\n            android:layout_height=\"match_parent\"\n            android:layout_gravity=\"center\"\n            android:layout_weight=\"1\"\n            android:background=\"#00000000\"\n            android:button=\"@null\"\n            android:drawableTop=\"@drawable/selector_history\"\n            android:gravity=\"center\"\n            android:text=\"@string/history\"\n            android:textColor=\"@drawable/selector_color\"\n            android:textSize=\"13sp\" />\n\n        <RadioButton\n            android:id=\"@+id/btn2\"\n            android:layout_width=\"0dp\"\n            android:layout_height=\"match_parent\"\n            android:layout_gravity=\"center\"\n            android:layout_weight=\"1\"\n            android:background=\"#00000000\"\n            android:button=\"@null\"\n            android:drawableTop=\"@drawable/selector_analysis\"\n            android:gravity=\"center\"\n            android:text=\"@string/analysis\"\n            android:textColor=\"@drawable/selector_color\"\n            android:textSize=\"13sp\" />\n\n        <RadioButton\n            android:id=\"@+id/btn3\"\n            android:layout_width=\"0dp\"\n            android:layout_height=\"match_parent\"\n            android:layout_gravity=\"center\"\n            android:layout_weight=\"1\"\n            android:background=\"#00000000\"\n            android:button=\"@null\"\n            android:checked=\"true\"\n            android:drawableTop=\"@drawable/selector_pedometer\"\n            android:gravity=\"center\"\n            android:text=\"@string/pedometer\"\n            android:textColor=\"@drawable/selector_color\"\n            android:textSize=\"13sp\" />\n\n        <RadioButton\n            android:id=\"@+id/btn4\"\n            android:layout_width=\"0dp\"\n            android:layout_height=\"match_parent\"\n            android:layout_gravity=\"center\"\n            android:layout_weight=\"1\"\n            android:background=\"#00000000\"\n            android:button=\"@null\"\n            android:drawableTop=\"@drawable/selector_pk\"\n            android:gravity=\"center\"\n            android:text=\"@string/pk\"\n            android:textColor=\"@drawable/selector_color\"\n            android:textSize=\"13sp\" />\n\n        <RadioButton\n            android:id=\"@+id/btn5\"\n            android:layout_width=\"0dp\"\n            android:layout_height=\"match_parent\"\n            android:layout_gravity=\"center\"\n            android:layout_weight=\"1\"\n            android:background=\"#00000000\"\n            android:button=\"@null\"\n            android:drawableTop=\"@drawable/selector_set\"\n            android:gravity=\"center\"\n            android:text=\"@string/set\"\n            android:textColor=\"@drawable/selector_color\"\n            android:textSize=\"13sp\" />\n    </RadioGroup>\n\n</LinearLayout>"
  },
  {
    "path": "pedometer/res/layout/pedometer.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\" >\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"50dp\"\n        android:orientation=\"horizontal\" >\n\n        <ImageView\n            android:id=\"@+id/title_pedometer\"\n            android:layout_width=\"50dp\"\n            android:layout_height=\"50dp\"\n            android:layout_gravity=\"left\"\n            android:layout_marginLeft=\"10dp\"\n            android:contentDescription=\"@string/app_name\"\n            android:src=\"@drawable/selector_image\" />\n\n        <TextView\n            android:id=\"@+id/sport\"\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center\"\n            android:layout_weight=\"1\"\n            android:gravity=\"center\"\n            android:text=\"@string/sport\"\n            android:textColor=\"#6DCAEC\"\n            android:textSize=\"20sp\" />\n\n        <ImageView\n            android:layout_width=\"50dp\"\n            android:layout_height=\"50dp\"\n            android:layout_gravity=\"left\"\n            android:layout_marginLeft=\"10dp\"\n            android:contentDescription=\"@string/app_name\" />\n    </LinearLayout>\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:background=\"@android:color/darker_gray\" />\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:layout_weight=\"1\"\n        android:gravity=\"center\" >\n\n        <com.bit.pedometer.ui.view.CircleBar\n            android:id=\"@+id/progress_pedometer\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"300dp\" >\n        </com.bit.pedometer.ui.view.CircleBar>\n    </LinearLayout>\n\n</LinearLayout>"
  },
  {
    "path": "pedometer/res/layout/pk.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\" >\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"50dp\"\n        android:orientation=\"horizontal\" >\n\n        <LinearLayout\n            android:layout_width=\"0dp\"\n            android:layout_height=\"50dp\"\n            android:layout_weight=\"1\"\n            android:orientation=\"horizontal\" >\n\n            <RadioButton\n                android:id=\"@+id/pk_1\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:layout_gravity=\"center_vertical\"\n                android:layout_marginLeft=\"60dp\"\n                android:background=\"#00000000\"\n                android:button=\"@null\"\n                android:checked=\"true\"\n                android:gravity=\"center\"\n                android:text=\"@string/_pk1\"\n                android:textColor=\"@drawable/selector_color\"\n                android:textSize=\"20sp\" />\n        </LinearLayout>\n\n        <TextView\n            android:layout_width=\"1dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center\"\n            android:background=\"@android:color/darker_gray\"\n            android:gravity=\"center\" />\n\n        <LinearLayout\n            android:baselineAligned=\"false\"\n            android:layout_width=\"0dp\"\n            android:layout_height=\"50dp\"\n            android:layout_weight=\"1\"\n            android:orientation=\"horizontal\" >\n            <LinearLayout\n            android:layout_width=\"0dp\"\n            android:layout_height=\"50dp\"\n            android:orientation=\"horizontal\"\n            android:gravity=\"left\" \n            android:layout_weight=\"1\">\n\n            <RadioButton\n                android:id=\"@+id/pk_2\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:layout_gravity=\"center_vertical\"\n                android:background=\"#00000000\"\n                android:layout_marginRight=\"10dp\"\n                android:button=\"@null\"\n                android:gravity=\"center\"\n                android:text=\"@string/_pk\"\n                android:textColor=\"@drawable/selector_color\"\n                android:textSize=\"20sp\" />\n            </LinearLayout>\n <LinearLayout\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"50dp\"\n            android:orientation=\"horizontal\"\n            android:gravity=\"right\" >\n            <ImageView\n                android:id=\"@+id/friend\"\n                android:layout_width=\"50dp\"\n                android:layout_height=\"50dp\"\n                android:layout_gravity=\"fill_horizontal\"\n                android:contentDescription=\"@string/app_name\"\n                android:src=\"@drawable/selector_friend\" />\n            </LinearLayout>\n        </LinearLayout>\n    </LinearLayout>\n\n    <ImageView\n        android:id=\"@+id/pk_tabline\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"3dp\"\n        android:layout_marginLeft=\"60dp\"\n        android:layout_marginRight=\"60dp\"\n        android:background=\"#6DCAEC\"\n        android:contentDescription=\"@string/_0\" />\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:background=\"@android:color/darker_gray\" />\n\n    <android.support.v4.view.ViewPager\n        android:id=\"@+id/viewpager\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"0dp\"\n        android:layout_weight=\"1\"\n        android:orientation=\"vertical\" />\n\n</LinearLayout>"
  },
  {
    "path": "pedometer/res/layout/pk_1.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\" >\n\n    \n\n    <com.bit.pedometer.ui.fragment.tools.ReFlashListView\n        android:id=\"@+id/pk_1_listview\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\" \n     \n        \n        >\n    </com.bit.pedometer.ui.fragment.tools.ReFlashListView>\n\n</LinearLayout>"
  },
  {
    "path": "pedometer/res/layout/pk_2.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\" >\n    <ExpandableListView\n        android:id=\"@+id/pk_2_listview\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\" >\n    </ExpandableListView>\n\n</LinearLayout>\n"
  },
  {
    "path": "pedometer/res/layout/set.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\">\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"50dp\"\n        android:orientation=\"vertical\">\n\n        <TextView\n            android:id=\"@+id/set\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"50dp\"\n            android:layout_gravity=\"center\"\n            android:gravity=\"center\"\n            android:text=\"@string/set\"\n            android:textColor=\"@android:color/holo_blue_light\"\n            android:textSize=\"20sp\" />\n    </LinearLayout>\n\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:background=\"@android:color/darker_gray\" />\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"130dp\"\n        android:gravity=\"center\"\n        android:orientation=\"vertical\">\n\n\n        <ImageView\n            android:id=\"@+id/picture\"\n            android:layout_width=\"75dp\"\n            android:layout_marginTop=\"13dp\"\n            android:layout_height=\"75dp\" />\n\n        <TextView\n            android:id=\"@+id/name_\"\n            android:layout_width=\"wrap_content\"\n            android:layout_marginTop=\"4dp\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/inputname\"\n            android:textColor=\"@android:color/holo_blue_light\"\n            android:textSize=\"20sp\" />\n\n\n    </LinearLayout>\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:layout_marginLeft=\"15dp\"\n        android:layout_marginRight=\"15dp\"\n        android:background=\"#d0d0d0\" />\n\n    <!--<LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"55dp\"\n        android:layout_marginTop=\"10dp\"\n        android:layout_gravity=\"center_vertical\"\n        android:background=\"#ffffff\"\n        android:id=\"@+id/edit_member_info\"\n        android:orientation=\"horizontal\">\n\n        <ImageView\n            android:id=\"@+id/member_icon3\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:src=\"@drawable/ico_mine_modify\" />\n\n        <TextView\n            android:id=\"@+id/member_text3\"\n            android:gravity=\"center\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"match_parent\"\n            android:text=\"修改资料\"\n            android:textColor=\"#666666\"\n            android:textSize=\"20sp\" />\n    </LinearLayout>-->\n\n    <LinearLayout\n        android:id=\"@+id/set_name\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"55dp\"\n        android:orientation=\"horizontal\">\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"55dp\"\n            android:layout_gravity=\"left\"\n            android:layout_marginLeft=\"15dp\"\n            android:layout_weight=\"1\"\n            android:gravity=\"left|center_vertical\"\n            android:text=\"@string/name\"\n            android:textColor=\"#7B7B7B\"\n            android:textSize=\"20sp\" />\n\n\n    </LinearLayout>\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:layout_marginLeft=\"15dp\"\n        android:layout_marginRight=\"15dp\"\n        android:background=\"#d0d0d0\" />\n\n    <LinearLayout\n        android:id=\"@+id/sex\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"55dp\"\n        android:orientation=\"horizontal\">\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"55dp\"\n            android:layout_gravity=\"left\"\n            android:layout_marginLeft=\"15dp\"\n            android:layout_weight=\"1\"\n            android:gravity=\"left|center_vertical\"\n            android:text=\"@string/sex\"\n            android:textColor=\"#7B7B7B\"\n            android:textSize=\"20sp\" />\n\n        <RadioGroup\n            android:id=\"@+id/sex_\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"55dp\"\n            android:layout_gravity=\"right\"\n            android:layout_weight=\"1\"\n            android:gravity=\"right\"\n            android:orientation=\"horizontal\">\n\n            <RadioButton\n                android:id=\"@+id/male\"\n                android:layout_width=\"65dp\"\n                android:layout_height=\"40dp\"\n                android:layout_gravity=\"center_vertical\"\n                android:background=\"@drawable/selector_male\"\n                android:button=\"@null\"\n                android:checked=\"true\"\n                android:gravity=\"center\"\n                android:text=\"@string/male\"\n                android:textColor=\"@drawable/selector_color_set\"\n                android:textSize=\"15sp\" />\n\n            <RadioButton\n                android:id=\"@+id/female\"\n                android:layout_width=\"65dp\"\n                android:layout_height=\"40dp\"\n                android:layout_gravity=\"center_vertical\"\n                android:layout_marginLeft=\"-15dp\"\n                android:background=\"@drawable/selector_female\"\n                android:button=\"@null\"\n                android:gravity=\"center\"\n                android:text=\"@string/female\"\n                android:textColor=\"@drawable/selector_color_set\"\n                android:textSize=\"15sp\" />\n        </RadioGroup>\n    </LinearLayout>\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:layout_marginLeft=\"15dp\"\n        android:layout_marginRight=\"15dp\"\n        android:background=\"#d0d0d0\" />\n\n\n    <LinearLayout\n        android:id=\"@+id/weight\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"55dp\"\n        android:orientation=\"horizontal\">\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"55dp\"\n            android:layout_gravity=\"left\"\n            android:layout_marginLeft=\"15dp\"\n            android:layout_weight=\"1\"\n            android:gravity=\"left|center_vertical\"\n            android:text=\"@string/weight\"\n            android:textColor=\"#7B7B7B\"\n            android:textSize=\"20sp\" />\n\n        <TextView\n            android:id=\"@+id/weight_\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"55dp\"\n            android:layout_gravity=\"right|center_vertical\"\n            android:layout_marginRight=\"5dp\"\n            android:layout_weight=\"1\"\n            android:gravity=\"right|center_vertical\"\n            android:text=\"@string/_55\"\n            android:textColor=\"@android:color/holo_blue_light\"\n            android:textSize=\"20sp\" />\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"55dp\"\n            android:layout_gravity=\"right\"\n            android:layout_marginRight=\"15dp\"\n            android:gravity=\"right|center_vertical\"\n            android:text=\"@string/kg\"\n            android:textColor=\"@android:color/holo_blue_light\"\n            android:textSize=\"20sp\" />\n    </LinearLayout>\n\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:layout_marginLeft=\"15dp\"\n        android:layout_marginRight=\"15dp\"\n        android:background=\"#d0d0d0\" />\n\n    <LinearLayout\n        android:id=\"@+id/sensitivy\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"55dp\"\n        android:orientation=\"horizontal\">\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"55dp\"\n            android:layout_gravity=\"left\"\n            android:layout_marginLeft=\"15dp\"\n            android:layout_weight=\"1\"\n            android:gravity=\"left|center_vertical\"\n            android:text=\"@string/sensitivy\"\n            android:textColor=\"#7B7B7B\"\n            android:textSize=\"20sp\" />\n\n        <TextView\n            android:id=\"@+id/sensitivy_\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"55dp\"\n            android:layout_gravity=\"right\"\n            android:layout_marginRight=\"15dp\"\n            android:layout_weight=\"1\"\n            android:gravity=\"right|center_vertical\"\n            android:text=\"@string/_1\"\n            android:textColor=\"@android:color/holo_blue_light\"\n            android:textSize=\"20sp\" />\n    </LinearLayout>\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:layout_marginLeft=\"15dp\"\n        android:layout_marginRight=\"15dp\"\n        android:background=\"#d0d0d0\" />\n\n    <LinearLayout\n        android:id=\"@+id/lengh_step\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"55dp\"\n        android:orientation=\"horizontal\">\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"55dp\"\n            android:layout_gravity=\"left\"\n            android:layout_marginLeft=\"15dp\"\n            android:layout_weight=\"1\"\n            android:gravity=\"left|center_vertical\"\n            android:text=\"@string/LengthOfStep\"\n            android:textColor=\"#7B7B7B\"\n            android:textSize=\"20sp\" />\n\n        <TextView\n            android:id=\"@+id/lengh_step_\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"55dp\"\n            android:layout_gravity=\"right\"\n            android:layout_marginRight=\"5dp\"\n            android:layout_weight=\"1\"\n            android:gravity=\"right|center_vertical\"\n            android:text=\"@string/_55\"\n            android:textColor=\"@android:color/holo_blue_light\"\n            android:textSize=\"20sp\" />\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"55dp\"\n            android:layout_gravity=\"right\"\n            android:layout_marginRight=\"15dp\"\n            android:gravity=\"right|center_vertical\"\n            android:text=\"@string/cm\"\n            android:textColor=\"@android:color/holo_blue_light\"\n            android:textSize=\"20sp\" />\n    </LinearLayout>\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:layout_marginLeft=\"15dp\"\n        android:layout_marginRight=\"15dp\"\n        android:background=\"#d0d0d0\" />\n\n\n</LinearLayout>"
  },
  {
    "path": "pedometer/res/layout/userinfo.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\" >\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"80dp\"\n        android:gravity=\"center_horizontal|center_vertical\"\n        android:orientation=\"horizontal\" >\n\n        <ImageView\n            android:id=\"@+id/user_picture\"\n            android:layout_width=\"70dp\"\n            android:layout_height=\"70dp\"\n            android:contentDescription=\"@string/_0\" />\n    </LinearLayout>\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:background=\"@android:color/darker_gray\" />\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"55dp\"\n        android:orientation=\"horizontal\" >\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"55dp\"\n            android:layout_gravity=\"left\"\n            android:layout_marginLeft=\"15dp\"\n            android:layout_weight=\"1\"\n            android:gravity=\"left|center_vertical\"\n            android:text=\"@string/name\"\n            android:textColor=\"#7B7B7B\"\n            android:textSize=\"20sp\" />\n\n        <TextView\n            android:id=\"@+id/user_name\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"55dp\"\n            android:layout_gravity=\"right\"\n            android:layout_marginRight=\"15dp\"\n            android:layout_weight=\"1\"\n            android:gravity=\"right|center_vertical\"\n            android:text=\"@string/male\"\n            android:textColor=\"@android:color/holo_blue_light\"\n            android:textSize=\"20sp\" />\n    </LinearLayout>\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:layout_marginLeft=\"15dp\"\n        android:layout_marginRight=\"15dp\"\n        android:background=\"#d0d0d0\" />\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"55dp\"\n        android:orientation=\"horizontal\" >\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"55dp\"\n            android:layout_gravity=\"left\"\n            android:layout_marginLeft=\"15dp\"\n            android:layout_weight=\"1\"\n            android:gravity=\"left|center_vertical\"\n            android:text=\"@string/sex\"\n            android:textColor=\"#7B7B7B\"\n            android:textSize=\"20sp\" />\n\n        <TextView\n            android:id=\"@+id/user_sex\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"55dp\"\n            android:layout_gravity=\"right\"\n            android:layout_marginRight=\"15dp\"\n            android:layout_weight=\"1\"\n            android:gravity=\"right|center_vertical\"\n            android:text=\"@string/male\"\n            android:textColor=\"@android:color/holo_blue_light\"\n            android:textSize=\"20sp\" />\n    </LinearLayout>\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:layout_marginLeft=\"15dp\"\n        android:layout_marginRight=\"15dp\"\n        android:background=\"#d0d0d0\" />\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"55dp\"\n        android:orientation=\"horizontal\" >\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"55dp\"\n            android:layout_gravity=\"left\"\n            android:layout_marginLeft=\"15dp\"\n            android:layout_weight=\"1\"\n            android:gravity=\"left|center_vertical\"\n            android:text=\"@string/StepNumber\"\n            android:textColor=\"#7B7B7B\"\n            android:textSize=\"20sp\" />\n\n        <TextView\n            android:id=\"@+id/user_steps\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"55dp\"\n            android:layout_gravity=\"right\"\n            android:layout_marginRight=\"5dp\"\n            android:layout_weight=\"1\"\n            android:gravity=\"right|center_vertical\"\n            android:text=\"@string/_2\"\n            android:textColor=\"@android:color/holo_blue_light\"\n            android:textSize=\"20sp\" />\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"55dp\"\n            android:layout_gravity=\"right\"\n            android:layout_marginRight=\"15dp\"\n            android:gravity=\"right|center_vertical\"\n            android:text=\"@string/bu\"\n            android:textColor=\"@android:color/holo_blue_light\"\n            android:textSize=\"20sp\" />\n    </LinearLayout>\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:layout_marginLeft=\"15dp\"\n        android:layout_marginRight=\"15dp\"\n        android:background=\"#d0d0d0\" />\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"55dp\"\n        android:orientation=\"horizontal\" >\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"55dp\"\n            android:layout_gravity=\"left\"\n            android:layout_marginLeft=\"15dp\"\n            android:layout_weight=\"1\"\n            android:gravity=\"left|center_vertical\"\n            android:text=\"@string/paiming\"\n            android:textColor=\"#7B7B7B\"\n            android:textSize=\"20sp\" />\n\n        <TextView\n            android:id=\"@+id/user_number\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"55dp\"\n            android:layout_gravity=\"right\"\n            android:layout_marginRight=\"5dp\"\n            android:layout_weight=\"1\"\n            android:gravity=\"right|center_vertical\"\n            android:text=\"@string/_55\"\n            android:textColor=\"@android:color/holo_blue_light\"\n            android:textSize=\"20sp\" />\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"55dp\"\n            android:layout_gravity=\"right\"\n            android:layout_marginRight=\"15dp\"\n            android:gravity=\"right|center_vertical\"\n            android:text=\"@string/ming\"\n            android:textColor=\"@android:color/holo_blue_light\"\n            android:textSize=\"20sp\" />\n    </LinearLayout>\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:layout_marginLeft=\"15dp\"\n        android:layout_marginRight=\"15dp\"\n        android:background=\"#d0d0d0\" />\n\n    \n\n</LinearLayout>"
  },
  {
    "path": "pedometer/res/layout/welcome.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\">\n\n    <ImageView\n        android:id=\"@+id/welcome\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:contentDescription=\"@string/_0\"\n        android:scaleType=\"fitXY\"\n        android:src=\"@drawable/welcome\" />\n\n</LinearLayout>\n"
  },
  {
    "path": "pedometer/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <color name=\"tab_selected_bg\">#6DCAEC</color>\n\n    <color name=\"sliding_menu_item_down\">#ff39393b</color>\n    <color name=\"sliding_menu_item_release\">#00000000</color>\n    <color name=\"sliding_menu_background\">#ff2c2c2e</color>\n    <color name=\"sliding_menu_body_background\">#fff5f5f5</color>\n\n    <color name=\"transparent\">#00000000</color>\n    <color name=\"transparent_background\">#80000000</color>\n    <color name=\"blue\">#03a9f4</color>\n    <color name=\"blue_press\">#01567c</color>\n    <color name=\"disable_press\">#858e99</color>\n    <color name=\"able_press_identify\">#f98425</color>\n    <color name=\"gray\">#858e99</color>\n    <color name=\"white\">#ffffff</color>\n    <color name=\"black\">#000000</color>\n    <color name=\"text_color\">#3f3f3f</color>\n    <color name=\"background\">#efeff4</color>\n\n\n    <color name=\"text_blue_color\">#3170cf</color>\n\n    <color name=\"chat_startColor\">#c3dee7</color>\n    <color name=\"chat_endColor\">#efefe3</color>\n    <color name=\"chat_edittext_strokeColor\">#cBcBcd</color>\n    <color name=\"chat_edittextColor\">#fafafa</color>\n\n    <!--40%白-->\n    <color name=\"color_66ffffff\">#66ffffff</color>\n    <!--20%白-->\n    <color name=\"color_33ffffff\">#33ffffff</color>\n    <!--70%白-->\n    <color name=\"color_b2ffffff\">#b2ffffff</color>\n    <!--80%白-->\n    <color name=\"color_ccffffff\">#ccffffff</color>\n    <!--70%黑-->\n    <color name=\"color_b2000000\">#b2000000</color>\n    <!--90%黑-->\n    <color name=\"color_e5000000\">#e5000000</color>\n    <!--40%黑-->\n    <color name=\"color_66000000\">#66000000</color>\n    <!--40%-->\n    <color name=\"color_66a7cef2\">#66a7cef2</color>\n    <!--60%-->\n    <color name=\"color_9950a6c2\">#9950c6a2</color>\n    <!--70%-->\n    <color name=\"color_b2f97525\">#b2f97525</color>\n    <!--60%-->\n    <color name=\"color_99103a5d\">#99103a5d</color>\n    <!--20%-->\n    <color name=\"color_33ff9710\">#33ff9710</color>\n    <!--70%-->\n    <color name=\"color_b2d1d4d8\">#b2d1d4d8</color>\n\n    <color name=\"color_ffdd3c\">#ffdd3c</color>\n    <color name=\"color_ffc000\">#ffc000</color>\n    <color name=\"color_fda72c\">#fda72c</color>\n    <color name=\"color_ff4200\">#ff4200</color>\n    <color name=\"color_3f3f3f\">#3f3f3f</color>\n    <color name=\"color_4f4f4f\">#4f4f4f</color>\n    <color name=\"color_adadad\">#adadad</color>\n    <color name=\"color_80adadad\">#80adadad</color>\n    <color name=\"color_fcf1df\">#fcf1df</color>\n    <color name=\"color_d7d4cf\">#d7d4cf</color>\n    <color name=\"color_646464\">#646464</color>\n    <color name=\"color_2d2d2d\">#2d2d2d</color>\n    <color name=\"color_efeff4\">#efeff4</color>\n    <color name=\"color_acb2b9\">#acb2b9</color>\n    <color name=\"color_70858e99\">#70858e99</color>\n    <color name=\"color_d1d4d8\">#d1d4d8</color>\n    <color name=\"color_f3452a\">#f3452a</color>\n    <color name=\"color_da7420\">#da7420</color>\n    <color name=\"color_f94a1e\">#f94a1e</color>\n    <color name=\"color_eb4a2a\">#eb4a2a</color>\n    <color name=\"color_f98425\">#f98425</color>\n    <color name=\"color_f3a033\">#f3a033</color>\n    <color name=\"color_f7d87a\">#f7d87a</color>\n    <color name=\"color_f9f9f9\">#f9f9f9</color>\n    <color name=\"color_a4cbf2\">#a4cbf2</color>\n    <color name=\"color_b8b8b8\">#b8b8b8</color>\n    <color name=\"color_c5c5c5\">#c5c5c5</color>\n    <color name=\"color_bbbbbb\">#bbbbbb</color>\n    <color name=\"color_e7e7e7\">#e7e7e7</color>\n    <color name=\"color_7e7e7e\">#7e7e7e</color>\n    <color name=\"color_e7be63\">#e7be63</color>\n    <color name=\"color_55c1e7\">#55c1e7</color>\n    <color name=\"color_03a9f4\">#03a9f4</color>\n    <color name=\"color_1690ce\">#1690ce</color>\n    <color name=\"color_5e5e5e\">#5e5e5e</color>\n    <color name=\"color_696868\">#696868</color>\n    <color name=\"color_a7a8a9\">#a7a8a9</color>\n    <color name=\"color_e5e5e5\">#e5e5e5</color>\n    <color name=\"color_858e99\">#858e99</color>\n    <color name=\"color_eefaff\">#eefaff</color>\n    <color name=\"color_999999\">#999999</color>\n    <color name=\"color_84f3f5\">#84f3f5</color>\n    <color name=\"color_fffdf9\">#fffdf9</color>\n    <color name=\"color_818181\">#818181</color>\n    <color name=\"color_858585\">#858585</color>\n    <color name=\"color_3393e4\">#3393e4</color>\n    <color name=\"color_a5c5d3\">#a5c5d3</color>\n    <color name=\"color_a4a4a4\">#a4a4a4</color>\n    <color name=\"color_ff761a\">#ff761a</color>\n    <color name=\"color_808081\">#808081</color>\n    <color name=\"color_cfb5a7\">#cfb5a7</color>\n    <color name=\"color_6fd7f9\">#6fd7f9</color>\n    <color name=\"color_a8a7a7\">#a8a7a7</color>\n    <color name=\"color_5d6265\">#5d6265</color>\n    <color name=\"color_babbbc\">#babbbc</color>\n    <color name=\"color_e1e1e1\">#e1e1e1</color>\n    <color name=\"color_b09d76\">#b09d76</color>\n    <color name=\"color_9003a9f4\">#9003a9f4</color>\n    <color name=\"translucent\">#cc000000</color>\n    <color name=\"translucent_black\">#20000000</color>\n    <color name=\"translucent55_white\">#8dffffff</color>\n    <color name=\"translucent80_black\">#cd000000</color>\n    <color name=\"translucent40_black\">#66000000</color>\n    <color name=\"color_b4b4b4\">#b4b4b4</color>\n    <color name=\"color_ff7b11\">#ff7b11</color>\n    <color name=\"color_a2a2a2\">#a2a2a2</color>\n    <color name=\"color_ffb207\">#ffb207</color>\n    <color name=\"color_a15100\">#a15100</color>\n    <color name=\"color_ff0000\">#ff0000</color>\n    <color name=\"color_fafafa\">#fafafa</color>\n    <color name=\"color_ff623d\">#ff623d</color>\n    <color name=\"color_ea5920\">#ea5920</color>\n    <color name=\"color_6a6a6a\">#6a6a6a</color>\n    <color name=\"color_f7f7f7\">#f7f7f7</color>\n    <color name=\"color_c4c4c4\">#c4c4c4</color>\n    <color name=\"color_C8C6C7\">#C8C6C7</color>\n    <color name=\"color_979797\">#979797</color>\n    <color name=\"color_898989\">#898989</color>\n    <color name=\"color_ff9f15\">#ff9f15</color>\n\n</resources>"
  },
  {
    "path": "pedometer/res/values/dimens.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <dimen name=\"common_title_height\">40dp</dimen>\n    <!--字体的5种大小，全局使用这5种字体大小-->\n    <dimen name=\"font_size_xxsmall\">12dp</dimen>\n    <dimen name=\"font_size_xsmall\">13dp</dimen>\n    <dimen name=\"font_size_small\">15dp</dimen>\n    <dimen name=\"font_size_middle\">16dp</dimen>\n    <dimen name=\"font_size_large\">19dp</dimen>\n    <dimen name=\"font_size_xlarge\">21dp</dimen>\n    <dimen name=\"font_size_xxlarge\">23dp</dimen>\n    <dimen name=\"font_size_xxxlarge\">27dp</dimen>\n\n    <!--控件距离左右屏幕的距离-->\n    <dimen name=\"item_margin_left_right\">11dp</dimen>\n    <!--按钮个高度-->\n    <dimen name=\"button_height\">43dp</dimen>\n    <!--控件之间的间隔-->\n    <dimen name=\"item_distance\">5dp</dimen>\n    <!--控件之间高的间隔-->\n    <dimen name=\"item_height_distance\">8dp</dimen>\n    <!--输入框的统一高度-->\n    <dimen name=\"textInput_height\">40dp</dimen>\n\n    <!--聊天界面输入框的距离内容的距离-->\n    <dimen name=\"chat_padding_common\">10dp</dimen>\n    <!--聊天界面输入框的距离内容的距离-->\n    <dimen name=\"chat_padding_special\">20dp</dimen>\n    <!--对话框与头像之间的距离-->\n    <dimen name=\"chat_image_distance\">4dp</dimen>\n    <!--头像大小-->\n    <dimen name=\"chat_head_icon_dimen\">38dp</dimen>\n    <!--对话框最大长度-->\n    <dimen name=\"chat_item_maxLength\">240dp</dimen>\n    <!--小ICON的大小-->\n    <dimen name=\"chat_progress_delIcon_size\">18dp</dimen>\n    <!--选择图标大小-->\n    <dimen name=\"chat_icon_size\">25dp</dimen>\n    <!--功能图标大小-->\n    <dimen name=\"chat_icon_more_size\">51dp</dimen>\n    <!--图标距离-->\n    <dimen name=\"chat_icon_distance\">7dp</dimen>\n    <!--聊天内容距顶部距离-->\n    <dimen name=\"chat_top_distance\">14dp</dimen>\n    <!--聊天定位框的高度-->\n    <dimen name=\"chat_location_height\">94dp</dimen>\n    <!--聊天定位框图片的高度-->\n    <dimen name=\"chat_location_image_height\">74dp</dimen>\n    <!--聊天定位框文字间距离-->\n    <dimen name=\"chat_location_image_text_distance\">2dp</dimen>\n    <!--聊天定位框文字最大长度-->\n    <dimen name=\"chat_location_image_text_maxWidth\">130dp</dimen>\n    <!--聊天定位框的长度-->\n    <dimen name=\"chat_location_maxWidth\">235dp</dimen>\n\n    <dimen name=\"dimen_0dp\">0dp</dimen>\n\n    <dimen name=\"dimen_1dp\">1dp</dimen>\n    <dimen name=\"dimen_2dp\">2dp</dimen>\n    <dimen name=\"dimen_3dp\">3dp</dimen>\n    <dimen name=\"dimen_4dp\">4dp</dimen>\n    <dimen name=\"dimen_5dp\">5dp</dimen>\n    <dimen name=\"dimen_6dp\">6dp</dimen>\n    <dimen name=\"dimen_7dp\">7dp</dimen>\n    <dimen name=\"dimen_8dp\">8dp</dimen>\n    <dimen name=\"dimen_9dp\">9dp</dimen>\n    <dimen name=\"dimen_10dp\">10dp</dimen>\n    <dimen name=\"dimen_11dp\">11dp</dimen>\n    <dimen name=\"dimen_12dp\">12dp</dimen>\n    <dimen name=\"dimen_13dp\">13dp</dimen>\n    <dimen name=\"dimen_14dp\">14dp</dimen>\n    <dimen name=\"dimen_15dp\">15dp</dimen>\n    <dimen name=\"dimen_16dp\">16dp</dimen>\n    <dimen name=\"dimen_17dp\">17dp</dimen>\n    <dimen name=\"dimen_18dp\">18dp</dimen>\n    <dimen name=\"dimen_19dp\">19dp</dimen>\n    <dimen name=\"dimen_20dp\">20dp</dimen>\n    <dimen name=\"dimen_21dp\">21dp</dimen>\n    <dimen name=\"dimen_22dp\">22dp</dimen>\n    <dimen name=\"dimen_23dp\">23dp</dimen>\n    <dimen name=\"dimen_24dp\">24dp</dimen>\n    <dimen name=\"dimen_25dp\">25dp</dimen>\n    <dimen name=\"dimen_26dp\">26dp</dimen>\n    <dimen name=\"dimen_27dp\">27dp</dimen>\n    <dimen name=\"dimen_28dp\">28dp</dimen>\n    <dimen name=\"dimen_29dp\">29dp</dimen>\n    <dimen name=\"dimen_30dp\">30dp</dimen>\n    <dimen name=\"dimen_31dp\">31dp</dimen>\n    <dimen name=\"dimen_32dp\">32dp</dimen>\n    <dimen name=\"dimen_33dp\">33dp</dimen>\n    <dimen name=\"dimen_34dp\">34dp</dimen>\n    <dimen name=\"dimen_35dp\">35dp</dimen>\n    <dimen name=\"dimen_36dp\">36dp</dimen>\n    <dimen name=\"dimen_37dp\">37dp</dimen>\n    <dimen name=\"dimen_38dp\">38dp</dimen>\n    <dimen name=\"dimen_39dp\">39dp</dimen>\n    <dimen name=\"dimen_40dp\">40dp</dimen>\n    <dimen name=\"dimen_41dp\">41dp</dimen>\n    <dimen name=\"dimen_42dp\">42dp</dimen>\n    <dimen name=\"dimen_43dp\">43dp</dimen>\n    <dimen name=\"dimen_44dp\">44dp</dimen>\n    <dimen name=\"dimen_45dp\">45dp</dimen>\n    <dimen name=\"dimen_46dp\">46dp</dimen>\n    <dimen name=\"dimen_47dp\">47dp</dimen>\n    <dimen name=\"dimen_48dp\">48dp</dimen>\n    <dimen name=\"dimen_49dp\">49dp</dimen>\n    <dimen name=\"dimen_50dp\">50dp</dimen>\n    <dimen name=\"dimen_51dp\">51dp</dimen>\n    <dimen name=\"dimen_52dp\">52dp</dimen>\n    <dimen name=\"dimen_53dp\">53dp</dimen>\n    <dimen name=\"dimen_54dp\">54dp</dimen>\n    <dimen name=\"dimen_55dp\">55dp</dimen>\n    <dimen name=\"dimen_56dp\">56dp</dimen>\n    <dimen name=\"dimen_57dp\">57dp</dimen>\n    <dimen name=\"dimen_58dp\">58dp</dimen>\n    <dimen name=\"dimen_59dp\">59dp</dimen>\n    <dimen name=\"dimen_60dp\">60dp</dimen>\n    <dimen name=\"dimen_61dp\">61dp</dimen>\n    <dimen name=\"dimen_62dp\">62dp</dimen>\n    <dimen name=\"dimen_63dp\">63dp</dimen>\n    <dimen name=\"dimen_64dp\">64dp</dimen>\n    <dimen name=\"dimen_65dp\">65dp</dimen>\n    <dimen name=\"dimen_66dp\">66dp</dimen>\n    <dimen name=\"dimen_67dp\">67dp</dimen>\n    <dimen name=\"dimen_68dp\">68dp</dimen>\n    <dimen name=\"dimen_69dp\">69dp</dimen>\n    <dimen name=\"dimen_70dp\">70dp</dimen>\n    <dimen name=\"dimen_71dp\">71dp</dimen>\n    <dimen name=\"dimen_72dp\">72dp</dimen>\n    <dimen name=\"dimen_73dp\">73dp</dimen>\n    <dimen name=\"dimen_74dp\">74dp</dimen>\n    <dimen name=\"dimen_75dp\">75dp</dimen>\n    <dimen name=\"dimen_76dp\">76dp</dimen>\n    <dimen name=\"dimen_77dp\">77dp</dimen>\n    <dimen name=\"dimen_78dp\">78dp</dimen>\n    <dimen name=\"dimen_79dp\">79dp</dimen>\n    <dimen name=\"dimen_80dp\">80dp</dimen>\n    <dimen name=\"dimen_81dp\">81dp</dimen>\n    <dimen name=\"dimen_82dp\">82dp</dimen>\n    <dimen name=\"dimen_83dp\">83dp</dimen>\n    <dimen name=\"dimen_84dp\">84dp</dimen>\n    <dimen name=\"dimen_85dp\">85dp</dimen>\n    <dimen name=\"dimen_86dp\">86dp</dimen>\n    <dimen name=\"dimen_87dp\">87dp</dimen>\n    <dimen name=\"dimen_88dp\">88dp</dimen>\n    <dimen name=\"dimen_89dp\">89dp</dimen>\n    <dimen name=\"dimen_90dp\">90dp</dimen>\n    <dimen name=\"dimen_91dp\">91dp</dimen>\n    <dimen name=\"dimen_92dp\">92dp</dimen>\n    <dimen name=\"dimen_93dp\">93dp</dimen>\n    <dimen name=\"dimen_94dp\">94dp</dimen>\n    <dimen name=\"dimen_95dp\">95dp</dimen>\n    <dimen name=\"dimen_96dp\">96dp</dimen>\n    <dimen name=\"dimen_97dp\">97dp</dimen>\n    <dimen name=\"dimen_98dp\">98dp</dimen>\n    <dimen name=\"dimen_99dp\">99dp</dimen>\n    <dimen name=\"dimen_100dp\">100dp</dimen>\n    <dimen name=\"dimen_101dp\">101dp</dimen>\n    <dimen name=\"dimen_102dp\">102dp</dimen>\n    <dimen name=\"dimen_103dp\">103dp</dimen>\n    <dimen name=\"dimen_104dp\">104dp</dimen>\n    <dimen name=\"dimen_105dp\">105dp</dimen>\n    <dimen name=\"dimen_106dp\">106dp</dimen>\n    <dimen name=\"dimen_107dp\">107dp</dimen>\n    <dimen name=\"dimen_108dp\">108dp</dimen>\n    <dimen name=\"dimen_109dp\">109dp</dimen>\n    <dimen name=\"dimen_110dp\">110dp</dimen>\n    <dimen name=\"dimen_111dp\">111dp</dimen>\n    <dimen name=\"dimen_112dp\">112dp</dimen>\n    <dimen name=\"dimen_113dp\">113dp</dimen>\n    <dimen name=\"dimen_114dp\">114dp</dimen>\n    <dimen name=\"dimen_115dp\">115dp</dimen>\n    <dimen name=\"dimen_116dp\">116dp</dimen>\n    <dimen name=\"dimen_117dp\">117dp</dimen>\n    <dimen name=\"dimen_118dp\">118dp</dimen>\n    <dimen name=\"dimen_119dp\">119dp</dimen>\n    <dimen name=\"dimen_120dp\">120dp</dimen>\n    <dimen name=\"dimen_121dp\">121dp</dimen>\n    <dimen name=\"dimen_122dp\">122dp</dimen>\n    <dimen name=\"dimen_123dp\">123dp</dimen>\n    <dimen name=\"dimen_124dp\">124dp</dimen>\n    <dimen name=\"dimen_125dp\">125dp</dimen>\n    <dimen name=\"dimen_126dp\">126dp</dimen>\n    <dimen name=\"dimen_127dp\">127dp</dimen>\n    <dimen name=\"dimen_128dp\">128dp</dimen>\n    <dimen name=\"dimen_129dp\">129dp</dimen>\n    <dimen name=\"dimen_130dp\">130dp</dimen>\n    <dimen name=\"dimen_131dp\">131dp</dimen>\n    <dimen name=\"dimen_132dp\">132dp</dimen>\n    <dimen name=\"dimen_133dp\">133dp</dimen>\n    <dimen name=\"dimen_134dp\">134dp</dimen>\n    <dimen name=\"dimen_135dp\">135dp</dimen>\n    <dimen name=\"dimen_136dp\">136dp</dimen>\n    <dimen name=\"dimen_137dp\">137dp</dimen>\n    <dimen name=\"dimen_138dp\">138dp</dimen>\n    <dimen name=\"dimen_139dp\">139dp</dimen>\n    <dimen name=\"dimen_140dp\">140dp</dimen>\n    <dimen name=\"dimen_141dp\">141dp</dimen>\n    <dimen name=\"dimen_142dp\">142dp</dimen>\n    <dimen name=\"dimen_143dp\">143dp</dimen>\n    <dimen name=\"dimen_144dp\">144dp</dimen>\n    <dimen name=\"dimen_145dp\">145dp</dimen>\n    <dimen name=\"dimen_146dp\">146dp</dimen>\n    <dimen name=\"dimen_147dp\">147dp</dimen>\n    <dimen name=\"dimen_148dp\">148dp</dimen>\n    <dimen name=\"dimen_149dp\">149dp</dimen>\n    <dimen name=\"dimen_150dp\">150dp</dimen>\n    <dimen name=\"dimen_151dp\">151dp</dimen>\n    <dimen name=\"dimen_152dp\">152dp</dimen>\n    <dimen name=\"dimen_153dp\">153dp</dimen>\n    <dimen name=\"dimen_154dp\">154dp</dimen>\n    <dimen name=\"dimen_155dp\">155dp</dimen>\n    <dimen name=\"dimen_156dp\">156dp</dimen>\n    <dimen name=\"dimen_157dp\">157dp</dimen>\n    <dimen name=\"dimen_158dp\">158dp</dimen>\n    <dimen name=\"dimen_159dp\">159dp</dimen>\n    <dimen name=\"dimen_160dp\">160dp</dimen>\n    <dimen name=\"dimen_161dp\">161dp</dimen>\n    <dimen name=\"dimen_162dp\">162dp</dimen>\n    <dimen name=\"dimen_163dp\">163dp</dimen>\n    <dimen name=\"dimen_164dp\">164dp</dimen>\n    <dimen name=\"dimen_165dp\">165dp</dimen>\n    <dimen name=\"dimen_166dp\">166dp</dimen>\n    <dimen name=\"dimen_167dp\">167dp</dimen>\n    <dimen name=\"dimen_168dp\">168dp</dimen>\n    <dimen name=\"dimen_169dp\">169dp</dimen>\n    <dimen name=\"dimen_170dp\">170dp</dimen>\n    <dimen name=\"dimen_171dp\">171dp</dimen>\n    <dimen name=\"dimen_172dp\">172dp</dimen>\n    <dimen name=\"dimen_173dp\">173dp</dimen>\n    <dimen name=\"dimen_174dp\">174dp</dimen>\n    <dimen name=\"dimen_175dp\">175dp</dimen>\n    <dimen name=\"dimen_176dp\">176dp</dimen>\n    <dimen name=\"dimen_177dp\">177dp</dimen>\n    <dimen name=\"dimen_178dp\">178dp</dimen>\n    <dimen name=\"dimen_179dp\">179dp</dimen>\n    <dimen name=\"dimen_180dp\">180dp</dimen>\n    <dimen name=\"dimen_181dp\">181dp</dimen>\n    <dimen name=\"dimen_182dp\">182dp</dimen>\n    <dimen name=\"dimen_183dp\">183dp</dimen>\n    <dimen name=\"dimen_184dp\">184dp</dimen>\n    <dimen name=\"dimen_185dp\">185dp</dimen>\n    <dimen name=\"dimen_186dp\">186dp</dimen>\n    <dimen name=\"dimen_187dp\">187dp</dimen>\n    <dimen name=\"dimen_188dp\">188dp</dimen>\n    <dimen name=\"dimen_189dp\">189dp</dimen>\n    <dimen name=\"dimen_190dp\">190dp</dimen>\n    <dimen name=\"dimen_191dp\">191dp</dimen>\n    <dimen name=\"dimen_192dp\">192dp</dimen>\n    <dimen name=\"dimen_193dp\">193dp</dimen>\n    <dimen name=\"dimen_194dp\">194dp</dimen>\n    <dimen name=\"dimen_195dp\">195dp</dimen>\n    <dimen name=\"dimen_196dp\">196dp</dimen>\n    <dimen name=\"dimen_197dp\">197dp</dimen>\n    <dimen name=\"dimen_198dp\">198dp</dimen>\n    <dimen name=\"dimen_199dp\">199dp</dimen>\n    <dimen name=\"dimen_200dp\">200dp</dimen>\n    <dimen name=\"dimen_201dp\">201dp</dimen>\n    <dimen name=\"dimen_202dp\">202dp</dimen>\n    <dimen name=\"dimen_203dp\">203dp</dimen>\n    <dimen name=\"dimen_204dp\">204dp</dimen>\n    <dimen name=\"dimen_205dp\">205dp</dimen>\n    <dimen name=\"dimen_206dp\">206dp</dimen>\n    <dimen name=\"dimen_207dp\">207dp</dimen>\n    <dimen name=\"dimen_208dp\">208dp</dimen>\n    <dimen name=\"dimen_209dp\">209dp</dimen>\n    <dimen name=\"dimen_210dp\">210dp</dimen>\n    <dimen name=\"dimen_211dp\">211dp</dimen>\n    <dimen name=\"dimen_212dp\">212dp</dimen>\n    <dimen name=\"dimen_213dp\">213dp</dimen>\n    <dimen name=\"dimen_214dp\">214dp</dimen>\n    <dimen name=\"dimen_215dp\">215dp</dimen>\n    <dimen name=\"dimen_216dp\">216dp</dimen>\n    <dimen name=\"dimen_217dp\">217dp</dimen>\n    <dimen name=\"dimen_218dp\">218dp</dimen>\n    <dimen name=\"dimen_219dp\">219dp</dimen>\n    <dimen name=\"dimen_220dp\">220dp</dimen>\n    <dimen name=\"dimen_221dp\">221dp</dimen>\n    <dimen name=\"dimen_222dp\">222dp</dimen>\n    <dimen name=\"dimen_223dp\">223dp</dimen>\n    <dimen name=\"dimen_224dp\">224dp</dimen>\n    <dimen name=\"dimen_225dp\">225dp</dimen>\n    <dimen name=\"dimen_226dp\">226dp</dimen>\n    <dimen name=\"dimen_227dp\">227dp</dimen>\n    <dimen name=\"dimen_228dp\">228dp</dimen>\n    <dimen name=\"dimen_229dp\">229dp</dimen>\n    <dimen name=\"dimen_230dp\">230dp</dimen>\n    <dimen name=\"dimen_231dp\">231dp</dimen>\n    <dimen name=\"dimen_232dp\">232dp</dimen>\n    <dimen name=\"dimen_233dp\">233dp</dimen>\n    <dimen name=\"dimen_234dp\">234dp</dimen>\n    <dimen name=\"dimen_235dp\">235dp</dimen>\n    <dimen name=\"dimen_236dp\">236dp</dimen>\n    <dimen name=\"dimen_237dp\">237dp</dimen>\n    <dimen name=\"dimen_238dp\">238dp</dimen>\n    <dimen name=\"dimen_239dp\">239dp</dimen>\n    <dimen name=\"dimen_240dp\">240dp</dimen>\n    <dimen name=\"dimen_241dp\">241dp</dimen>\n    <dimen name=\"dimen_242dp\">242dp</dimen>\n    <dimen name=\"dimen_243dp\">243dp</dimen>\n    <dimen name=\"dimen_244dp\">244dp</dimen>\n    <dimen name=\"dimen_245dp\">245dp</dimen>\n    <dimen name=\"dimen_246dp\">246dp</dimen>\n    <dimen name=\"dimen_247dp\">247dp</dimen>\n    <dimen name=\"dimen_248dp\">248dp</dimen>\n    <dimen name=\"dimen_249dp\">249dp</dimen>\n    <dimen name=\"dimen_250dp\">250dp</dimen>\n    <dimen name=\"dimen_251dp\">251dp</dimen>\n    <dimen name=\"dimen_252dp\">252dp</dimen>\n    <dimen name=\"dimen_253dp\">253dp</dimen>\n    <dimen name=\"dimen_254dp\">254dp</dimen>\n    <dimen name=\"dimen_255dp\">255dp</dimen>\n    <dimen name=\"dimen_256dp\">256dp</dimen>\n    <dimen name=\"dimen_257dp\">257dp</dimen>\n    <dimen name=\"dimen_258dp\">258dp</dimen>\n    <dimen name=\"dimen_259dp\">259dp</dimen>\n    <dimen name=\"dimen_260dp\">260dp</dimen>\n    <dimen name=\"dimen_261dp\">261dp</dimen>\n    <dimen name=\"dimen_262dp\">262dp</dimen>\n    <dimen name=\"dimen_263dp\">263dp</dimen>\n    <dimen name=\"dimen_264dp\">264dp</dimen>\n    <dimen name=\"dimen_265dp\">265dp</dimen>\n    <dimen name=\"dimen_266dp\">266dp</dimen>\n    <dimen name=\"dimen_267dp\">267dp</dimen>\n    <dimen name=\"dimen_268dp\">268dp</dimen>\n    <dimen name=\"dimen_269dp\">269dp</dimen>\n    <dimen name=\"dimen_270dp\">270dp</dimen>\n    <dimen name=\"dimen_271dp\">271dp</dimen>\n    <dimen name=\"dimen_272dp\">272dp</dimen>\n    <dimen name=\"dimen_273dp\">273dp</dimen>\n    <dimen name=\"dimen_274dp\">274dp</dimen>\n    <dimen name=\"dimen_275dp\">275dp</dimen>\n    <dimen name=\"dimen_276dp\">276dp</dimen>\n    <dimen name=\"dimen_277dp\">277dp</dimen>\n    <dimen name=\"dimen_278dp\">278dp</dimen>\n    <dimen name=\"dimen_279dp\">279dp</dimen>\n    <dimen name=\"dimen_280dp\">280dp</dimen>\n    <dimen name=\"dimen_281dp\">281dp</dimen>\n    <dimen name=\"dimen_282dp\">282dp</dimen>\n    <dimen name=\"dimen_283dp\">283dp</dimen>\n    <dimen name=\"dimen_284dp\">284dp</dimen>\n    <dimen name=\"dimen_285dp\">285dp</dimen>\n    <dimen name=\"dimen_286dp\">286dp</dimen>\n    <dimen name=\"dimen_287dp\">287dp</dimen>\n    <dimen name=\"dimen_288dp\">288dp</dimen>\n    <dimen name=\"dimen_289dp\">289dp</dimen>\n    <dimen name=\"dimen_290dp\">290dp</dimen>\n    <dimen name=\"dimen_291dp\">291dp</dimen>\n    <dimen name=\"dimen_292dp\">292dp</dimen>\n    <dimen name=\"dimen_293dp\">293dp</dimen>\n    <dimen name=\"dimen_294dp\">294dp</dimen>\n    <dimen name=\"dimen_295dp\">295dp</dimen>\n    <dimen name=\"dimen_296dp\">296dp</dimen>\n    <dimen name=\"dimen_297dp\">297dp</dimen>\n    <dimen name=\"dimen_298dp\">298dp</dimen>\n    <dimen name=\"dimen_299dp\">299dp</dimen>\n    <dimen name=\"dimen_300dp\">300dp</dimen>\n    <dimen name=\"dimen_301dp\">301dp</dimen>\n    <dimen name=\"dimen_302dp\">302dp</dimen>\n    <dimen name=\"dimen_303dp\">303dp</dimen>\n    <dimen name=\"dimen_304dp\">304dp</dimen>\n    <dimen name=\"dimen_305dp\">305dp</dimen>\n    <dimen name=\"dimen_306dp\">306dp</dimen>\n    <dimen name=\"dimen_307dp\">307dp</dimen>\n    <dimen name=\"dimen_308dp\">308dp</dimen>\n    <dimen name=\"dimen_309dp\">309dp</dimen>\n    <dimen name=\"dimen_310dp\">310dp</dimen>\n    <dimen name=\"dimen_311dp\">311dp</dimen>\n    <dimen name=\"dimen_312dp\">312dp</dimen>\n    <dimen name=\"dimen_313dp\">313dp</dimen>\n    <dimen name=\"dimen_314dp\">314dp</dimen>\n    <dimen name=\"dimen_315dp\">315dp</dimen>\n    <dimen name=\"dimen_316dp\">316dp</dimen>\n    <dimen name=\"dimen_317dp\">317dp</dimen>\n    <dimen name=\"dimen_318dp\">318dp</dimen>\n    <dimen name=\"dimen_319dp\">319dp</dimen>\n    <dimen name=\"dimen_320dp\">320dp</dimen>\n    <dimen name=\"dimen_321dp\">321dp</dimen>\n    <dimen name=\"dimen_322dp\">322dp</dimen>\n    <dimen name=\"dimen_323dp\">323dp</dimen>\n    <dimen name=\"dimen_324dp\">324dp</dimen>\n    <dimen name=\"dimen_325dp\">325dp</dimen>\n    <dimen name=\"dimen_326dp\">326dp</dimen>\n    <dimen name=\"dimen_327dp\">327dp</dimen>\n    <dimen name=\"dimen_328dp\">328dp</dimen>\n    <dimen name=\"dimen_329dp\">329dp</dimen>\n    <dimen name=\"dimen_330dp\">330dp</dimen>\n    <dimen name=\"dimen_331dp\">331dp</dimen>\n    <dimen name=\"dimen_332dp\">332dp</dimen>\n    <dimen name=\"dimen_333dp\">333dp</dimen>\n    <dimen name=\"dimen_334dp\">334dp</dimen>\n    <dimen name=\"dimen_335dp\">335dp</dimen>\n    <dimen name=\"dimen_336dp\">336dp</dimen>\n    <dimen name=\"dimen_337dp\">337dp</dimen>\n    <dimen name=\"dimen_338dp\">338dp</dimen>\n    <dimen name=\"dimen_339dp\">339dp</dimen>\n    <dimen name=\"dimen_340dp\">340dp</dimen>\n    <dimen name=\"dimen_341dp\">341dp</dimen>\n    <dimen name=\"dimen_342dp\">342dp</dimen>\n    <dimen name=\"dimen_343dp\">343dp</dimen>\n    <dimen name=\"dimen_344dp\">344dp</dimen>\n    <dimen name=\"dimen_345dp\">345dp</dimen>\n    <dimen name=\"dimen_346dp\">346dp</dimen>\n    <dimen name=\"dimen_347dp\">347dp</dimen>\n    <dimen name=\"dimen_348dp\">348dp</dimen>\n    <dimen name=\"dimen_349dp\">349dp</dimen>\n    <dimen name=\"dimen_350dp\">350dp</dimen>\n    <dimen name=\"dimen_351dp\">351dp</dimen>\n    <dimen name=\"dimen_352dp\">352dp</dimen>\n    <dimen name=\"dimen_353dp\">353dp</dimen>\n    <dimen name=\"dimen_354dp\">354dp</dimen>\n    <dimen name=\"dimen_355dp\">355dp</dimen>\n    <dimen name=\"dimen_356dp\">356dp</dimen>\n    <dimen name=\"dimen_357dp\">357dp</dimen>\n    <dimen name=\"dimen_358dp\">358dp</dimen>\n    <dimen name=\"dimen_359dp\">359dp</dimen>\n    <dimen name=\"dimen_360dp\">360dp</dimen>\n    <dimen name=\"dimen_361dp\">361dp</dimen>\n    <dimen name=\"dimen_362dp\">362dp</dimen>\n    <dimen name=\"dimen_363dp\">363dp</dimen>\n    <dimen name=\"dimen_364dp\">364dp</dimen>\n    <dimen name=\"dimen_365dp\">365dp</dimen>\n    <dimen name=\"dimen_366dp\">366dp</dimen>\n    <dimen name=\"dimen_367dp\">367dp</dimen>\n    <dimen name=\"dimen_368dp\">368dp</dimen>\n    <dimen name=\"dimen_369dp\">369dp</dimen>\n    <dimen name=\"dimen_370dp\">370dp</dimen>\n    <dimen name=\"dimen_371dp\">371dp</dimen>\n    <dimen name=\"dimen_372dp\">372dp</dimen>\n    <dimen name=\"dimen_373dp\">373dp</dimen>\n    <dimen name=\"dimen_374dp\">374dp</dimen>\n    <dimen name=\"dimen_375dp\">375dp</dimen>\n    <dimen name=\"dimen_376dp\">376dp</dimen>\n    <dimen name=\"dimen_377dp\">377dp</dimen>\n    <dimen name=\"dimen_378dp\">378dp</dimen>\n    <dimen name=\"dimen_379dp\">379dp</dimen>\n    <dimen name=\"dimen_380dp\">380dp</dimen>\n    <dimen name=\"dimen_381dp\">381dp</dimen>\n    <dimen name=\"dimen_382dp\">382dp</dimen>\n    <dimen name=\"dimen_383dp\">383dp</dimen>\n    <dimen name=\"dimen_384dp\">384dp</dimen>\n    <dimen name=\"dimen_385dp\">385dp</dimen>\n    <dimen name=\"dimen_386dp\">386dp</dimen>\n    <dimen name=\"dimen_387dp\">387dp</dimen>\n    <dimen name=\"dimen_388dp\">388dp</dimen>\n    <dimen name=\"dimen_389dp\">389dp</dimen>\n    <dimen name=\"dimen_390dp\">390dp</dimen>\n    <dimen name=\"dimen_391dp\">391dp</dimen>\n    <dimen name=\"dimen_392dp\">392dp</dimen>\n    <dimen name=\"dimen_393dp\">393dp</dimen>\n    <dimen name=\"dimen_394dp\">394dp</dimen>\n    <dimen name=\"dimen_395dp\">395dp</dimen>\n    <dimen name=\"dimen_396dp\">396dp</dimen>\n    <dimen name=\"dimen_397dp\">397dp</dimen>\n    <dimen name=\"dimen_398dp\">398dp</dimen>\n    <dimen name=\"dimen_399dp\">399dp</dimen>\n    <dimen name=\"dimen_400dp\">400dp</dimen>\n    <dimen name=\"dimen_401dp\">401dp</dimen>\n    <dimen name=\"dimen_402dp\">402dp</dimen>\n    <dimen name=\"dimen_403dp\">403dp</dimen>\n    <dimen name=\"dimen_404dp\">404dp</dimen>\n    <dimen name=\"dimen_405dp\">405dp</dimen>\n    <dimen name=\"dimen_406dp\">406dp</dimen>\n    <dimen name=\"dimen_407dp\">407dp</dimen>\n    <dimen name=\"dimen_408dp\">408dp</dimen>\n    <dimen name=\"dimen_409dp\">409dp</dimen>\n    <dimen name=\"dimen_410dp\">410dp</dimen>\n    <dimen name=\"dimen_411dp\">411dp</dimen>\n    <dimen name=\"dimen_412dp\">412dp</dimen>\n    <dimen name=\"dimen_413dp\">413dp</dimen>\n    <dimen name=\"dimen_414dp\">414dp</dimen>\n    <dimen name=\"dimen_415dp\">415dp</dimen>\n    <dimen name=\"dimen_416dp\">416dp</dimen>\n    <dimen name=\"dimen_417dp\">417dp</dimen>\n    <dimen name=\"dimen_418dp\">418dp</dimen>\n    <dimen name=\"dimen_419dp\">419dp</dimen>\n    <dimen name=\"dimen_420dp\">420dp</dimen>\n    <dimen name=\"dimen_421dp\">421dp</dimen>\n    <dimen name=\"dimen_422dp\">422dp</dimen>\n    <dimen name=\"dimen_423dp\">423dp</dimen>\n    <dimen name=\"dimen_424dp\">424dp</dimen>\n    <dimen name=\"dimen_425dp\">425dp</dimen>\n    <dimen name=\"dimen_426dp\">426dp</dimen>\n    <dimen name=\"dimen_427dp\">427dp</dimen>\n    <dimen name=\"dimen_428dp\">428dp</dimen>\n    <dimen name=\"dimen_429dp\">429dp</dimen>\n    <dimen name=\"dimen_430dp\">430dp</dimen>\n    <dimen name=\"dimen_431dp\">431dp</dimen>\n    <dimen name=\"dimen_432dp\">432dp</dimen>\n    <dimen name=\"dimen_433dp\">433dp</dimen>\n    <dimen name=\"dimen_434dp\">434dp</dimen>\n    <dimen name=\"dimen_435dp\">435dp</dimen>\n    <dimen name=\"dimen_436dp\">436dp</dimen>\n    <dimen name=\"dimen_437dp\">437dp</dimen>\n    <dimen name=\"dimen_438dp\">438dp</dimen>\n    <dimen name=\"dimen_439dp\">439dp</dimen>\n    <dimen name=\"dimen_440dp\">440dp</dimen>\n    <dimen name=\"dimen_441dp\">441dp</dimen>\n    <dimen name=\"dimen_442dp\">442dp</dimen>\n    <dimen name=\"dimen_443dp\">443dp</dimen>\n    <dimen name=\"dimen_444dp\">444dp</dimen>\n    <dimen name=\"dimen_445dp\">445dp</dimen>\n    <dimen name=\"dimen_446dp\">446dp</dimen>\n    <dimen name=\"dimen_447dp\">447dp</dimen>\n    <dimen name=\"dimen_448dp\">448dp</dimen>\n    <dimen name=\"dimen_449dp\">449dp</dimen>\n    <dimen name=\"dimen_450dp\">450dp</dimen>\n    <dimen name=\"dimen_451dp\">451dp</dimen>\n    <dimen name=\"dimen_452dp\">452dp</dimen>\n    <dimen name=\"dimen_453dp\">453dp</dimen>\n    <dimen name=\"dimen_454dp\">454dp</dimen>\n    <dimen name=\"dimen_455dp\">455dp</dimen>\n    <dimen name=\"dimen_456dp\">456dp</dimen>\n    <dimen name=\"dimen_457dp\">457dp</dimen>\n    <dimen name=\"dimen_458dp\">458dp</dimen>\n    <dimen name=\"dimen_459dp\">459dp</dimen>\n    <dimen name=\"dimen_460dp\">460dp</dimen>\n    <dimen name=\"dimen_461dp\">461dp</dimen>\n    <dimen name=\"dimen_462dp\">462dp</dimen>\n    <dimen name=\"dimen_463dp\">463dp</dimen>\n    <dimen name=\"dimen_464dp\">464dp</dimen>\n    <dimen name=\"dimen_465dp\">465dp</dimen>\n    <dimen name=\"dimen_466dp\">466dp</dimen>\n    <dimen name=\"dimen_467dp\">467dp</dimen>\n    <dimen name=\"dimen_468dp\">468dp</dimen>\n    <dimen name=\"dimen_469dp\">469dp</dimen>\n    <dimen name=\"dimen_470dp\">470dp</dimen>\n    <dimen name=\"dimen_471dp\">471dp</dimen>\n    <dimen name=\"dimen_472dp\">472dp</dimen>\n    <dimen name=\"dimen_473dp\">473dp</dimen>\n    <dimen name=\"dimen_474dp\">474dp</dimen>\n    <dimen name=\"dimen_475dp\">475dp</dimen>\n    <dimen name=\"dimen_476dp\">476dp</dimen>\n    <dimen name=\"dimen_477dp\">477dp</dimen>\n    <dimen name=\"dimen_478dp\">478dp</dimen>\n    <dimen name=\"dimen_479dp\">479dp</dimen>\n    <dimen name=\"dimen_480dp\">480dp</dimen>\n    <dimen name=\"dimen_481dp\">481dp</dimen>\n    <dimen name=\"dimen_482dp\">482dp</dimen>\n    <dimen name=\"dimen_483dp\">483dp</dimen>\n    <dimen name=\"dimen_484dp\">484dp</dimen>\n    <dimen name=\"dimen_485dp\">485dp</dimen>\n    <dimen name=\"dimen_486dp\">486dp</dimen>\n    <dimen name=\"dimen_487dp\">487dp</dimen>\n    <dimen name=\"dimen_488dp\">488dp</dimen>\n    <dimen name=\"dimen_489dp\">489dp</dimen>\n    <dimen name=\"dimen_490dp\">490dp</dimen>\n    <dimen name=\"dimen_491dp\">491dp</dimen>\n    <dimen name=\"dimen_492dp\">492dp</dimen>\n    <dimen name=\"dimen_493dp\">493dp</dimen>\n    <dimen name=\"dimen_494dp\">494dp</dimen>\n    <dimen name=\"dimen_495dp\">495dp</dimen>\n    <dimen name=\"dimen_496dp\">496dp</dimen>\n    <dimen name=\"dimen_497dp\">497dp</dimen>\n    <dimen name=\"dimen_498dp\">498dp</dimen>\n    <dimen name=\"dimen_499dp\">499dp</dimen>\n    <dimen name=\"dimen_500dp\">500dp</dimen>\n    <dimen name=\"dimen_501dp\">501dp</dimen>\n    <dimen name=\"dimen_502dp\">502dp</dimen>\n    <dimen name=\"dimen_503dp\">503dp</dimen>\n    <dimen name=\"dimen_504dp\">504dp</dimen>\n    <dimen name=\"dimen_505dp\">505dp</dimen>\n    <dimen name=\"dimen_506dp\">506dp</dimen>\n    <dimen name=\"dimen_507dp\">507dp</dimen>\n    <dimen name=\"dimen_508dp\">508dp</dimen>\n    <dimen name=\"dimen_509dp\">509dp</dimen>\n    <dimen name=\"dimen_510dp\">510dp</dimen>\n    <dimen name=\"dimen_511dp\">511dp</dimen>\n    <dimen name=\"dimen_512dp\">512dp</dimen>\n    <dimen name=\"dimen_513dp\">513dp</dimen>\n    <dimen name=\"dimen_514dp\">514dp</dimen>\n    <dimen name=\"dimen_515dp\">515dp</dimen>\n    <dimen name=\"dimen_516dp\">516dp</dimen>\n    <dimen name=\"dimen_517dp\">517dp</dimen>\n    <dimen name=\"dimen_518dp\">518dp</dimen>\n    <dimen name=\"dimen_519dp\">519dp</dimen>\n    <dimen name=\"dimen_520dp\">520dp</dimen>\n    <dimen name=\"dimen_521dp\">521dp</dimen>\n    <dimen name=\"dimen_522dp\">522dp</dimen>\n    <dimen name=\"dimen_523dp\">523dp</dimen>\n    <dimen name=\"dimen_524dp\">524dp</dimen>\n    <dimen name=\"dimen_525dp\">525dp</dimen>\n    <dimen name=\"dimen_526dp\">526dp</dimen>\n    <dimen name=\"dimen_527dp\">527dp</dimen>\n    <dimen name=\"dimen_528dp\">528dp</dimen>\n    <dimen name=\"dimen_529dp\">529dp</dimen>\n    <dimen name=\"dimen_530dp\">530dp</dimen>\n    <dimen name=\"dimen_531dp\">531dp</dimen>\n    <dimen name=\"dimen_532dp\">532dp</dimen>\n    <dimen name=\"dimen_533dp\">533dp</dimen>\n    <dimen name=\"dimen_534dp\">534dp</dimen>\n    <dimen name=\"dimen_535dp\">535dp</dimen>\n    <dimen name=\"dimen_536dp\">536dp</dimen>\n    <dimen name=\"dimen_537dp\">537dp</dimen>\n    <dimen name=\"dimen_538dp\">538dp</dimen>\n    <dimen name=\"dimen_539dp\">539dp</dimen>\n    <dimen name=\"dimen_540dp\">540dp</dimen>\n    <dimen name=\"dimen_541dp\">541dp</dimen>\n    <dimen name=\"dimen_542dp\">542dp</dimen>\n    <dimen name=\"dimen_543dp\">543dp</dimen>\n    <dimen name=\"dimen_544dp\">544dp</dimen>\n    <dimen name=\"dimen_545dp\">545dp</dimen>\n    <dimen name=\"dimen_546dp\">546dp</dimen>\n    <dimen name=\"dimen_547dp\">547dp</dimen>\n    <dimen name=\"dimen_548dp\">548dp</dimen>\n    <dimen name=\"dimen_549dp\">549dp</dimen>\n    <dimen name=\"dimen_550dp\">550dp</dimen>\n    <dimen name=\"dimen_551dp\">551dp</dimen>\n    <dimen name=\"dimen_552dp\">552dp</dimen>\n    <dimen name=\"dimen_553dp\">553dp</dimen>\n    <dimen name=\"dimen_554dp\">554dp</dimen>\n    <dimen name=\"dimen_555dp\">555dp</dimen>\n    <dimen name=\"dimen_556dp\">556dp</dimen>\n    <dimen name=\"dimen_557dp\">557dp</dimen>\n    <dimen name=\"dimen_558dp\">558dp</dimen>\n    <dimen name=\"dimen_559dp\">559dp</dimen>\n    <dimen name=\"dimen_560dp\">560dp</dimen>\n    <dimen name=\"dimen_561dp\">561dp</dimen>\n    <dimen name=\"dimen_562dp\">562dp</dimen>\n    <dimen name=\"dimen_563dp\">563dp</dimen>\n    <dimen name=\"dimen_564dp\">564dp</dimen>\n    <dimen name=\"dimen_565dp\">565dp</dimen>\n    <dimen name=\"dimen_566dp\">566dp</dimen>\n    <dimen name=\"dimen_567dp\">567dp</dimen>\n    <dimen name=\"dimen_568dp\">568dp</dimen>\n    <dimen name=\"dimen_569dp\">569dp</dimen>\n    <dimen name=\"dimen_570dp\">570dp</dimen>\n    <dimen name=\"dimen_571dp\">571dp</dimen>\n    <dimen name=\"dimen_572dp\">572dp</dimen>\n    <dimen name=\"dimen_573dp\">573dp</dimen>\n    <dimen name=\"dimen_574dp\">574dp</dimen>\n    <dimen name=\"dimen_575dp\">575dp</dimen>\n    <dimen name=\"dimen_576dp\">576dp</dimen>\n    <dimen name=\"dimen_577dp\">577dp</dimen>\n    <dimen name=\"dimen_578dp\">578dp</dimen>\n    <dimen name=\"dimen_579dp\">579dp</dimen>\n    <dimen name=\"dimen_580dp\">580dp</dimen>\n    <dimen name=\"dimen_581dp\">581dp</dimen>\n    <dimen name=\"dimen_582dp\">582dp</dimen>\n    <dimen name=\"dimen_583dp\">583dp</dimen>\n    <dimen name=\"dimen_584dp\">584dp</dimen>\n    <dimen name=\"dimen_585dp\">585dp</dimen>\n    <dimen name=\"dimen_586dp\">586dp</dimen>\n    <dimen name=\"dimen_587dp\">587dp</dimen>\n    <dimen name=\"dimen_588dp\">588dp</dimen>\n    <dimen name=\"dimen_589dp\">589dp</dimen>\n    <dimen name=\"dimen_590dp\">590dp</dimen>\n    <dimen name=\"dimen_591dp\">591dp</dimen>\n    <dimen name=\"dimen_592dp\">592dp</dimen>\n    <dimen name=\"dimen_593dp\">593dp</dimen>\n    <dimen name=\"dimen_594dp\">594dp</dimen>\n    <dimen name=\"dimen_595dp\">595dp</dimen>\n    <dimen name=\"dimen_596dp\">596dp</dimen>\n    <dimen name=\"dimen_597dp\">597dp</dimen>\n    <dimen name=\"dimen_598dp\">598dp</dimen>\n    <dimen name=\"dimen_599dp\">599dp</dimen>\n    <dimen name=\"dimen_600dp\">600dp</dimen>\n</resources>"
  },
  {
    "path": "pedometer/res/values/instapaper_strings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  ~ Copyright (c) Mob.COM $year.14-10-27 上午11:02\n  ~\n  ~ @author Milk <jecelyin@gmail.com>\n  -->\n\n<resources>\n    <string name=\"instapager_login_html\" formatted=\"false\"><![CDATA[\n<!DOCTYPE html>\n<html>\n<head>\n<meta content=\\\"text/html; charset=utf-8\\\" http-equiv=\\\"Content-Type\\\">\n<meta content=\\\"width=device-width,minimum-scale=1,maximum-scale=1,initial-scale=1,user-scalable=no\\\" id=\\\"viewport\\\" name=\\\"viewport\\\">\n<meta content=\\\"yes\\\" name=\\\"apple-mobile-web-app-capable\\\">\n<title>%s</title>\n<style type=\\\"text/css\\\">\nbody{margin:0;padding:0}\n.inputstyle {\n    -webkit-tap-highlight-color:rgba(255,255,255,0);\n    width:100%%;\n    height:44px;\n    color:#000;\n    background:0;\n    border:0;\n    font-size:16px;\n    outline: none;\n    -webkit-appearance:none\n}\n\n.btn {\n    width:90%%;\n    height:44px;\n    line-height:44px;\n    background:#A0C035;\n    border:0;\n    border-radius:4px;\n    color:#fff;\n    font-size:16px;\n    text-align:center;\n    margin-top:15px;\n    display:block\n}\n.btn:disabled {\n    background: #dddddd;\n}\n.error {\n    color:red;\n}\n</style>\n</head>\n\n<body>\n<script type=\\\"text/javascript\\\">\nfunction login(form){\n    var u=form[\\\"u\\\"].value,p=form[\\\"p\\\"].value;\n    if(!u || !p)\n        return false;\n    form[\\\"s\\\"].disabled = true;\n    Android.onLogin(u, p);\n    return false;\n}\n</script>\n<form style=\\\"margin-top:45px;\\\" action=\\\"%s\\\" metho=\\\"get\\\" onsubmit=\\\"return login(this);\\\">\n%s\n<div style=\\\"padding-left:15px;border-top:1px solid #E3E3E5;border-bottom:1px solid #E3E3E5;\\\">\n <input class=\\\"inputstyle\\\" id=\\\"u\\\" name=\\\"u\\\" type=\\\"text\\\" placeholder=\\\"%s\\\" style=\\\"border-bottom:1px solid #E3E3E5;\\\"/>\n <input class=\\\"inputstyle\\\" id=\\\"p\\\" name=\\\"p\\\" type=\\\"password\\\" placeholder=\\\"%s\\\"/>\n</div>\n<p><input style=\\\"margin:0 auto;\\\" type=\\\"submit\\\" name=\\\"s\\\" value=\\\"  %s  \\\" class=\\\"btn\\\"/></p>\n</form>\n</body>\n</html>\n]]></string>\n</resources>"
  },
  {
    "path": "pedometer/res/values/oks_strings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <string name=\"cancel\">取消</string>\n    <string name=\"finish\">完成</string>\n    <string name=\"sharing\">分享操作正在后台进行…</string>\n    <string name=\"share_to\">分享到</string>\n\t<string name=\"share\">分享</string>\n\t<string name=\"multi_share\">图文分享</string>\n\t<string name=\"share_completed\">分享成功</string>\n\t<string name=\"share_canceled\">分享已取消</string>\n\t<string name=\"select_one_plat_at_least\">请选择一个目标平台</string>\n\t<string name=\"list_friends\">%s的朋友</string>\n\t<string name=\"share_failed\">分享失败</string>\n\t<string name=\"pull_to_refresh\">下拉刷新</string>\n\t<string name=\"release_to_refresh\">松开刷新</string>\n\t<string name=\"refreshing\">刷新中…</string>\n\t<string name=\"shake2share\">摇晃手机！</string>\n\t<string name=\"select_a_friend\">请选择一个朋友</string>\n</resources>"
  },
  {
    "path": "pedometer/res/values/ssdk_strings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <string name=\"weibo_oauth_regiseter\">应用授权</string>\n    <string name=\"website\">http://www.mob.com</string>\n    <string name=\"weibo_upload_content\">分享图片</string>\n    <string name=\"wechat_client_inavailable\">目前您的微信版本过低或未安装微信，需要安装微信才能使用</string>\n    <string name=\"google_plus_client_inavailable\">Google+ 版本过低或者没有安装，需要升级或安装Google+才能使用！</string>\n    <string name=\"qq_client_inavailable\">QQ 版本过低或者没有安装，需要升级或安装QQ才能使用！</string>\n    <string name=\"pinterest_client_inavailable\">Pinterest版本过低或者没有安装，需要升级或安装Pinterest才能使用！</string>\n    <string name=\"instagram_client_inavailable\">Instagram版本过低或者没有安装，需要升级或安装Instagram才能使用！</string>\n    <string name=\"yixin_client_inavailable\">目前您的易信版本过低或未安装，需要安装易信才能使用</string>\n    <string name=\"line_client_inavailable\">目前您的Line版本过低或未安装，需要安装Line才能使用</string>\n    <string name=\"kakaotalk_client_inavailable\">目前您的KakaoTalk版本过低或未安装，需要安装KakaoTalk才能使用</string>\n    <string name=\"kakaostory_client_inavailable\">目前您的KakaoStory版本过低或未安装，需要安装KakaoStory才能使用</string>\n    <string name=\"whatsapp_client_inavailable\">目前您的WhatsApp版本过低或未安装，需要安装WhatsApp才能使用</string>\n    \n\t<string name=\"sinaweibo\">新浪微博</string>\n\t<string name=\"tencentweibo\">腾讯微博</string>\n\t<string name=\"qzone\">QQ空间</string>\n\t<string name=\"wechat\">微信好友</string>\n\t<string name=\"wechatmoments\">微信朋友圈</string>\n\t<string name=\"wechatfavorite\">微信收藏</string>\n\t<string name=\"facebook\">Facebook</string>\n\t<string name=\"twitter\">Twitter</string>\n\t<string name=\"renren\">人人网</string>\n\t<string name=\"kaixin\">开心网</string>\n\t<string name=\"email\">邮件</string>\n\t<string name=\"shortmessage\">信息</string>\n\t<string name=\"sohumicroblog\">搜狐微博</string>\n\t<string name=\"sohusuishenkan\">搜狐随身看</string>\n\t<string name=\"neteasemicroblog\">网易微博</string>\n\t<string name=\"douban\">豆瓣</string>\n\t<string name=\"youdao\">有道云笔记</string>\n\t<string name=\"evernote\">印象笔记</string>\n\t<string name=\"linkedin\">领英</string>\n\t<string name=\"googleplus\">Google+</string>\n\t<string name=\"foursquare\">FourSquare</string>\n\t<string name=\"qq\">QQ</string>\n\t<string name=\"pinterest\">Pinterest</string>\n\t<string name=\"flickr\">Flickr</string>\n\t<string name=\"tumblr\">Tumblr</string>\n\t<string name=\"dropbox\">Dropbox</string>\n\t<string name=\"vkontakte\">VK</string>\n\t<string name=\"instagram\">Instagram</string>\n\t<string name=\"yixin\">易信</string>\n\t<string name=\"yixinmoments\">易信朋友圈</string>\n\t<string name=\"mingdao\">明道</string>\n\t<string name=\"kakaotalk\">KakaoTalk</string>\n\t<string name=\"kakaostory\">KakaoStory</string>\n\t<string name=\"line\">Line</string>\n\t<string name=\"bluetooth\">蓝牙</string>\n\t<string name=\"whatsapp\">WhatsApp</string>\n\t<string name=\"pocket\">Pocket</string>\n\t<string name=\"instapaper\">Instapaper</string>\n\t<string name=\"instapaper_email\">邮箱</string>\n\t<string name=\"instapaper_pwd\">密码</string>\n\t<string name=\"instapaper_login\">登录</string>\n\t<string name=\"instapaper_logining\">登录中…</string>\n\t<string name=\"instapager_email_or_password_incorrect\">Email或密码不正确</string>\n    <string name=\"facebookmessenger\">Facebook Messenger</string>\n\n\t<string name=\"share_to_qzone\">分享到QQ空间</string>\n\t<string name=\"share_to_qq\">分享到QQ</string>\n\t<string name=\"mingdao_share_content\">网页分享</string>\n\t<string name=\"share_to_mingdao\">分享到明道</string>\n\t<string name=\"share_to_qzone_default\">来自%s的分享</string>\n\t<string name=\"use_login_button\">请改用“登录”按钮</string>\n</resources>"
  },
  {
    "path": "pedometer/res/values/strings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <string name=\"app_name\">Pedometer</string>\n    <string name=\"action_settings\">Settings</string>\n    <string name=\"hello_world\">Hello world!</string>\n    <string name=\"history\">历史</string>\n    <string name=\"analysis\">分析</string>\n    <string name=\"pk\">pk</string>\n    <string name=\"set\">设置</string>\n    <string name=\"pedometer\">记步</string>\n    <string name=\"Monday\">\"周一 \"</string>\n    <string name=\"Tuesday\">周二</string>\n    <string name=\"Wednesday\">周三</string>\n    <string name=\"Thursday\">周四</string>\n    <string name=\"Friday\">周五</string>\n    <string name=\"Saturday\">周六</string>\n    <string name=\"Sunday\">周日</string>\n    <string name=\"sport\">运动</string>\n    <string name=\"today\">今天</string>\n    <string name=\"_0\">0</string>\n    <string name=\"step\">步数</string>\n    <string name=\"complete\">已完成：</string>\n    <string name=\"_0_\">0%</string>\n    <string name=\"_10000\">目标：10000</string>\n    <string name=\"averagestep\">平均步数</string>\n    <string name=\"sumstep\">总步数</string>\n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    <string name=\"more\">更多</string>\n    <string name=\"sm_item_demo\">接口</string>\n    <string name=\"sm_item_auth\">授权</string>\n    <string name=\"sm_item_wechat\">微信</string>\n    <string name=\"sm_item_yixin\">易信</string>\n    <string name=\"sm_item_customer\">自定义接口</string>\n    <string name=\"sm_item_custom_fields\">自定义分享内容</string>\n    <string name=\"sm_item_fl_weibo\">关注新浪微博</string>\n    <string name=\"sm_item_fl_tc\">关注腾讯微博</string>\n    <string name=\"sm_item_share_view\">摇一摇截屏分享</string>\n    <string name=\"sm_item_visit_website\">关注官方网站</string>\n    <string name=\"sm_item_about\">Demo版本 Ver. %s</string>\n    <string name=\"plz_choose_wechat\">请选择微信客户端完成操作</string>\n    <string name=\"get_token_format\">获取%s的AccessToken</string>\n    <string name=\"get_user_info_format\">获取%s授权用户资料</string>\n    <string name=\"get_other_info_format\">获取%s其他用户资料</string>\n    <string name=\"share_to_format\">分享到%s</string>\n     <string name=\"demo_share_all_gui\">分享全部（有分享界面）</string>\n    <string name=\"demo_share_all\">分享全部（无界面，直接分享）</string>\n    <string name=\"demo_get_access_token\">获取AccessToken</string>\n\t<string name=\"demo_get_my_info\">获取授权用户资料</string>\n    <string name=\"demo_get_other_info\">获取其他用户资料</string>\n\t\n\t<string name=\"get_sina_friends_list\">获取新浪微博关注列表</string>\n\t<string name=\"get_tencent_friends_list\">获取腾讯微博关注列表</string>\n\t<string name=\"customer_douban\">搜索用户</string>\n\t<string name=\"customer_facebook\">获取通知列表</string>\n\t<string name=\"customer_nemb\">获取推荐话题</string>\n\t<string name=\"customer_renren\">上传照片到用户的相册</string>\n\t<string name=\"customer_sina\">获取微博主页列表</string>\n\t<string name=\"customer_qzone\">发表日志到QQ空间</string> \n\t<string name=\"customer_tencent\">获取我的粉丝列表</string>\n\t<string name=\"customer_twitter\">获取主页列表</string>\n\t<string name=\"customer_kaixin\">获取可能认识的人</string>\n\t<string name=\"customer_sohu\">获取好友列表</string>\n\t<string name=\"customer_youdao\">获取笔记本列表</string>\n\t<string name=\"customer_suishenkan\">获取搜狐随身看书签列表</string>\n\t<string name=\"customer_tumblr\">获取Tumblr用户Post列表</string>\n\t\n\t<string name=\"not_yet_authorized\">尚未授权</string>\n\t<string name=\"share_content\">ShareSDK for Android不仅集成简单、支持如QQ好友、微信、新浪微博、腾讯微博等所有社交平台，而且还有强大的统计分析管理后台，实时了解用户、信息流、回流率、传播效应等数据，详情见官网http://mob.com @Mob移动开发者服务平台</string>\n\t<string name=\"share_content_short\">ShareSDK不仅集成简单、支持如微信、新浪微博、腾讯微博等平台，还有强大的统计分析管理后台，实时了解用户、信息流、回流率、传播效应等数据，详情见官网http://mob.com @Mob移动开发者服务平台</string>\n\t<string name=\"evenote_title\">ShareSDK是一个神奇的SDK</string>\n\t\n\t<string name=\"update\">文字分享</string>\n\t<string name=\"image_upload\">图片分享（本地图片）</string>\n\t<string name=\"image_upload_bitmap\">图片分享（Bitmap对象）</string>\n\t<string name=\"image_upload_url\">图片分享（网络图片）</string>\n\t<string name=\"emoji_upload\">表情分享（本地图片）</string>\n\t<string name=\"emoji_upload_url\">表情分享（网络图片）</string>\n\t<string name=\"emoji_upload_bm\">表情分享（Bitmap对象）</string>\n\t<string name=\"music_upload\">音乐分享</string>\n\t<string name=\"video_upload\">视频分享</string>\n\t<string name=\"webpage_upload\">网页分享（本地图片）</string>\n\t<string name=\"webpage_upload_bitmap\">网页分享（Bitmap对象）</string>\n\t<string name=\"webpage_upload_url\">网页分享（网络图片）</string>\n\t<string name=\"app_upload\">应用分享（携带文件）</string>\n\t<string name=\"app_upload_extinfo\">应用分享（携带脚本）</string>\n\t<string name=\"file_upload\">文件分享</string>\n\t<string name=\"share_to_wechat\">微信好友</string>\n\t<string name=\"share_to_moment\">微信朋友圈</string>\n\t<string name=\"share_to_favorite\">微信收藏</string>\n\t<string name=\"wechat_demo_title\">微信分享Demo标题</string>\n\t<string name=\"qzone_add_blog_sample\"><h1>QQ互联</h1><font color='red'>轻松分享,</font><font color='green'>快乐生活。</font><a href='http://connect.qq.com'>详情请看。</a><img src='http://imgcache.qq.com/ptlogin/head/1_100.gif'></img></string>\n\t<string name=\"wechat_client_is_not_installed_correctly\">微信客户端未安装或版本太旧</string>\n\t<string name=\"wechat_client_not_support_following_operation\">微信客户端不支持第三方应用执行关注功能</string>\n\t<string name=\"share_to_yixin\">易信好友</string>\n\t<string name=\"share_to_yixin_moment\">易信朋友圈</string>\n\t<string name=\"share_to_yixin_favorite\">易信收藏</string>\n\t<string name=\"yixin_demo_title\">易信分享Demo标题</string>\n\t<string name=\"receive_rewards\">恭喜你得到%s个金币！</string>\n\t<string name=\"buy_success\">购买成功</string>\n\t<string name=\"buy_failed\">购买失败</string>\n\t<string name=\"laiwang\">来往</string>\n\t<string name=\"qzone_customer_share_style\">自定义QQ空间分享风格</string>\n  \t<string name=\"qq_share_way\">请选择分享方式</string>\n  \t<string name=\"qq_share_from_qqlogin\">QQ/QZone登录发微博</string>\n  \t<string name=\"qq_share_from_tlogin\">腾讯微博登录发微博</string>\n  \t<string name=\"sex\">性别</string>\n  \t<string name=\"birthday\">出生年份</string>\n  \t<string name=\"weight\">体重</string>\n  \t<string name=\"height\">身高</string>\n  \t<string name=\"sensitivy\">灵敏度</string>\n  \t<string name=\"LengthOfStep\">步伐长度</string>\n  \t<string name=\"_1981\">1981</string>\n  \t<string name=\"_55\">55</string>\n  \t<string name=\"kg\">kg</string>\n  \t<string name=\"cm\">cm</string>\n  \t<string name=\"_1\">一级</string>\n  \t<string name=\"male\">男</string>\n  \t<string name=\"female\">女</string>\n  \t<string name=\"_170\">170</string>\n  \t<string name=\"_0k\">0k</string>\n  \t<string name=\"_pk\">分组PK</string>\n  \t<string name=\"_pk1\">多人PK</string>\n  \t<string name=\"StepNumber\">步数</string>\n  \t<string name=\"paiming\">排名</string>\n  \t<string name=\"ming\">名</string>\n  \t<string name=\"bu\">步</string>\n  \t<string name=\"_2\">2</string>\n  \t<string name=\"stepNumber\">步数</string>\n  \t<string name=\"di\">第</string>\n  \t<string name=\"name\">姓名</string>\n  \t<string name=\"pleaseinputname\">请输入姓名</string>\n  \t<string name=\"inputname\">填写您的姓名</string>\n  \t<string name=\"portrait\">头像</string>\n  \t<string name=\"average_steps\">平均步数：</string>\n  \t<string name=\"number_member\">组成员数：</string>\n  \t<string name=\"_00\">第</string>\n  \t<string name=\"_01\">组</string>\n  \t<string name=\"_02\">姓名：</string>\n  \t<string name=\"_03\">步数：</string>\n  \t<string name=\"_04\">健康生活每一天</string>\n  \t<string name=\"_05\">移动到</string>\n  \t<string name=\"_06\">组</string>\n  \t<string name=\"_08\">第</string>\n  \t<string name=\"_09\">添加好友</string>\n\n</resources>\n"
  },
  {
    "path": "pedometer/res/values/styles.xml",
    "content": "<resources>\n\n    <!--\n        Base application theme, dependent on API level. This theme is replaced\n        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.\n    -->\n    <style name=\"AppBaseTheme\" parent=\"android:Theme.Light\">\n        <!--\n            Theme customizations available in newer API levels can go in\n            res/values-vXX/styles.xml, while customizations related to\n            backward-compatibility can go here.\n        -->\n    </style>\n\n    <!-- Application theme. -->\n    <style name=\"AppTheme\" parent=\"AppBaseTheme\">\n        <!-- All customizations that are NOT specific to a particular API-level can go here. -->\n    </style>\n\n    <!-- 自定义dialog style -->\n    <style name=\"TransparentDialog\" parent=\"@android:style/Theme.Dialog\">\n        <item name=\"android:windowFrame\">@null</item>\n        <item name=\"android:windowIsFloating\">true</item>\n        <item name=\"android:windowIsTranslucent\">true</item>\n        <item name=\"android:windowNoTitle\">true</item>\n        <item name=\"android:background\">@android:color/transparent</item>\n        <item name=\"android:windowBackground\">@android:color/transparent</item>\n        <item name=\"android:backgroundDimEnabled\">true</item>\n        <item name=\"android:backgroundDimAmount\">0.6</item>\n    </style>\n    <!-- 自定义ProgressDialog style -->\n    <style name=\"ProgressDialog\" parent=\"@android:style/Theme.Holo.Light.Dialog\">\n        <item name=\"android:windowFrame\">@null</item>\n        <item name=\"android:windowIsFloating\">true</item>\n        <item name=\"android:windowIsTranslucent\">true</item>\n        <item name=\"android:windowNoTitle\">true</item>\n        <item name=\"android:background\">@android:color/transparent</item>\n        <item name=\"android:windowBackground\">@android:color/transparent</item>\n        <item name=\"android:backgroundDimEnabled\">true</item>\n        <item name=\"android:backgroundDimAmount\">0.6</item>\n    </style>\n\n</resources>\n"
  },
  {
    "path": "pedometer/res/values-sw600dp/dimens.xml",
    "content": "<resources>\n\n    <!--\n         Customize dimensions originally defined in res/values/dimens.xml (such as\n         screen margins) for sw600dp devices (e.g. 7\" tablets) here.\n    -->\n\n</resources>\n"
  },
  {
    "path": "pedometer/res/values-sw720dp-land/dimens.xml",
    "content": "<resources>\n\n    <!--\n         Customize dimensions originally defined in res/values/dimens.xml (such as\n         screen margins) for sw720dp devices (e.g. 10\" tablets) in landscape here.\n    -->\n    <dimen name=\"activity_horizontal_margin\">128dp</dimen>\n\n</resources>\n"
  },
  {
    "path": "pedometer/res/values-v11/styles.xml",
    "content": "<resources>\n\n    <!--\n        Base application theme for API 11+. This theme completely replaces\n        AppBaseTheme from res/values/styles.xml on API 11+ devices.\n    -->\n    <style name=\"AppBaseTheme\" parent=\"android:Theme.Holo.Light\">\n        <!-- API 11 theme customizations can go here. -->\n    </style>\n\n</resources>\n"
  },
  {
    "path": "pedometer/res/values-v14/styles.xml",
    "content": "<resources>\n\n    <!--\n        Base application theme for API 14+. This theme completely replaces\n        AppBaseTheme from BOTH res/values/styles.xml and\n        res/values-v11/styles.xml on API 14+ devices.\n    -->\n    <style name=\"AppBaseTheme\" parent=\"android:Theme.Holo.Light.DarkActionBar\">\n        <!-- API 14 theme customizations can go here. -->\n    </style>\n\n</resources>\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/common/utils/BmobUtil.java",
    "content": "package com.bit.pedometer.common.utils;\n\nimport java.util.List;\n\nimport android.content.Context;\n\nimport cn.bmob.v3.Bmob;\nimport cn.bmob.v3.BmobQuery;\nimport cn.bmob.v3.listener.FindListener;\nimport cn.bmob.v3.listener.SaveListener;\nimport cn.bmob.v3.listener.UpdateListener;\n\nimport com.bit.pedometer.data.bean.User;\n\npublic class BmobUtil {\n\n\tpublic static void saveBmob(final User user,\n\t\t\tfinal BmobSaveAndUpdataListener listener, final Context context) {\n\n\t\tnew Thread(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tBmob.initialize(context, \"c153449e638703134b8fe75c52210bc7\");\n\t\t\t\tif (user.getObjectId().equals(\"1\")) {\n\t\t\t\t\tuser.setObjectId(null);\n//\t\t\t\t\tToast.makeText(context, \"我正在存储\", Toast.LENGTH_LONG).show();\n\t\t\t\t\tuser.save(context, new SaveListener() {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onSuccess() {\n\t\t\t\t\t\t\tlistener.onFinishedSave(user);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onFailure(int arg0, String arg1) {\n\t\t\t\t\t\t\tlistener.onFailure(arg1);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t} else {\n//\t\t\t\t\tToast.makeText(context, \"我在更新\", Toast.LENGTH_LONG).show();\n\t\t\t\t\tuser.update(context,new UpdateListener() {\n\t\t\t\t\t\t\n\t\t\t\t\t\tpublic void onSuccess() {\n\t\t\t\t\t\t\tlistener.onFinishedupdata(user);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tpublic void onFailure(int arg0, String arg1) {\n\t\t\t\t\t\t\tlistener.onFailure(arg1);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t}\n\t\t}).start();\n\t}\n\n\tpublic static void queryBmob(final BmobQueryListener listener,\n\t\t\tfinal Context context) {\n\n\t\tnew Thread(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tBmob.initialize(context, \"c153449e638703134b8fe75c52210bc7\");\n\t\t\t\tBmobQuery<User> query = new BmobQuery<User>();\n\t\t\t\tquery.findObjects(context, new FindListener<User>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(List<User> user_list) {\n\t\t\t\t\t\tlistener.onQuerySuccess(user_list);\n\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onError(int arg0, String arg1) {\n\t\t\t\t\t\tlistener.onFailure(arg1);\n\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t}\n\t\t}).start();\n\n\t}\n\t\n\tpublic interface BmobSaveAndUpdataListener{\n\t\tvoid onFinishedSave(User user);\n\t\tvoid onFailure(String str);\n\t\tvoid onFinishedupdata(User user);\n\t\t\n\t}\n\t\n\tpublic interface BmobQueryListener{\n\t\tvoid onQuerySuccess(List<User> users);\n\t\tvoid onFailure(String str);\n\t}\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/common/utils/HttpCallbackListener.java",
    "content": "package com.bit.pedometer.common.utils;\n\npublic interface HttpCallbackListener {\n\n\tvoid onFinish(String response);\n\n\tvoid onError(Exception e);\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/common/utils/HttpUtil.java",
    "content": "package com.bit.pedometer.common.utils;\n\nimport java.io.BufferedReader;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.net.HttpURLConnection;\nimport java.net.URL;\n\npublic class HttpUtil {\n\n\t/**\n\t * 网络请求属于耗时操作，所以必须开启另外一个线程，如果不这样，就会导致主线程被阻塞\n\t * 这里为什么要使用java的回调机制，因为我们这里开启了一个线程，来发送HTTP请求\n\t * ，因为HTTP请求属于耗时操作，这就导致sendHttpRequest 方法还没来得及相应时候就执行结束了，当然也就无法返回显影的数据了\n\t * @param address\n\t * @param listener\n\t */\n\tpublic static void sendHttpRequest(final String address,\n\t\t\tfinal HttpCallbackListener listener) {\n\n\t\tnew Thread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tHttpURLConnection connection = null;\n\t\t\t\ttry {\n\t\t\t\t\t/* 这是另一种实现的方法\n\t\t\t\t\t * HttpClient httpClient = new DefaultHttpClient(); HttpGet\n\t\t\t\t\t * httpGet = new HttpGet(address); HttpResponse httpResponse =\n\t\t\t\t\t * httpClient.execute(httpGet); String response = null; if\n\t\t\t\t\t * (httpResponse.getStatusLine().getStatusCode() == 200) {\n\t\t\t\t\t * HttpEntity entity = httpResponse.getEntity(); response =\n\t\t\t\t\t * EntityUtils.toString(entity);\n\t\t\t\t\t * \n\t\t\t\t\t * }else {\n\t\t\t\t\t * \n\t\t\t\t\t * } Gson gson = new Gson(); List<Weather> weathers =\n\t\t\t\t\t * gson.fromJson(response, new TypeToken<List<Weather>>() {\n\t\t\t\t\t * }.getType()); for (Weather weather1 : weathers) {\n\t\t\t\t\t * weather.setPtime(weather1.getPtime());\n\t\t\t\t\t * weather.setTemp1(weather1.getTemp1());\n\t\t\t\t\t * weather.setTemp2(weather1.getTemp2());\n\t\t\t\t\t * weather.setWeather(weather1.getWeather()); }\n\t\t\t\t\t */\n\t\t\t\t\tURL url = new URL(address);\n\t\t\t\t\tconnection = (HttpURLConnection) url.openConnection();\n\t\t\t\t\tconnection.setRequestMethod(\"GET\");\n\t\t\t\t\tconnection.setConnectTimeout(8000);\n\t\t\t\t\tconnection.setReadTimeout(8000);\n\t\t\t\t\tInputStream in = connection.getInputStream();\n\t\t\t\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\t\t\t\tnew InputStreamReader(in));\n\t\t\t\t\tStringBuilder response = new StringBuilder();\n\t\t\t\t\tString line;\n\t\t\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\t\t\tresponse.append(line);\n\t\t\t\t\t}\n\t\t\t\t\tif (listener != null) {\n\t\t\t\t\t\t// 回调onFinish()方法\n\t\t\t\t\t\tlistener.onFinish(response.toString());\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tif (listener != null) {\n\t\t\t\t\t\t// 回调onError()方法\n\t\t\t\t\t\tlistener.onError(e);\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tif (connection != null) {\n\t\t\t\t\t\tconnection.disconnect();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}).start();\n\t}\n\n}"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/data/bean/Group.java",
    "content": "package com.bit.pedometer.data.bean;\n\npublic class Group {\n\n\tprivate int ID;\n\tprivate int total_number;\n\tprivate int member_number;\n\n\tpublic int getID() {\n\t\treturn ID;\n\t}\n\n\tpublic void setID(int iD) {\n\t\tID = iD;\n\t}\n\n\tpublic int getTotal_number() {\n\t\treturn total_number;\n\t}\n\n\tpublic void setTotal_number(int total_number) {\n\t\tthis.total_number = total_number;\n\t}\n\n\tpublic int getMember_number() {\n\t\treturn member_number;\n\t}\n\n\tpublic void setMember_number(int member_number) {\n\t\tthis.member_number = member_number;\n\t}\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/data/bean/Step.java",
    "content": "package com.bit.pedometer.data.bean;\n\npublic class Step {\n\n\tprivate int id;\n\tprivate int number;\n\tprivate String date;\n\tprivate String userId;\n\n\tpublic int getId() {\n\t\treturn id;\n\t}\n\n\tpublic void setId(int id) {\n\t\tthis.id = id;\n\t}\n\n\tpublic int getNumber() {\n\t\treturn number;\n\t}\n\n\tpublic void setNumber(int number) {\n\t\tthis.number = number;\n\t}\n\n\tpublic String getDate() {\n\t\treturn date;\n\t}\n\n\tpublic void setDate(String date) {\n\t\tthis.date = date;\n\t}\n\n\tpublic String getUserId() {\n\t\treturn userId;\n\t}\n\n\tpublic void setUserId(String userId) {\n\t\tthis.userId = userId;\n\t}\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/data/bean/User.java",
    "content": "package com.bit.pedometer.data.bean;\n\nimport java.io.Serializable;\nimport java.sql.Blob;\n\nimport cn.bmob.v3.BmobObject;\n\npublic class User extends BmobObject implements Serializable {\n\n\t/**\n\t * \n\t */\n\tprivate static final long serialVersionUID = 1L;\n\n\tprivate String name;\n\tprivate String sex;\n\tprivate int weight;\n\tprivate int sensitivity;\n\tprivate int step_length;\n\tprivate int groupId;\n\tprivate byte[] picture;\n\tprivate int today_step;\n\n\tpublic int getToday_step() {\n\t\treturn today_step;\n\t}\n\n\tpublic void setToday_step(int today_step) {\n\t\tthis.today_step = today_step;\n\t}\n\n\tpublic byte[] getPicture() {\n\t\treturn picture;\n\t}\n\n\tpublic void setPicture(byte[] picture) {\n\t\tthis.picture = picture;\n\t}\n\n\tpublic int getGroupId() {\n\t\treturn groupId;\n\t}\n\n\tpublic void setGroupId(int groupId) {\n\t\tthis.groupId = groupId;\n\t}\n\n\n\n\tpublic String getName() {\n\t\treturn name;\n\t}\n\n\tpublic void setName(String name) {\n\t\tthis.name = name;\n\t}\n\n\tpublic String getSex() {\n\t\treturn sex;\n\t}\n\n\tpublic void setSex(String sex) {\n\t\tthis.sex = sex;\n\t}\n\n\tpublic int getWeight() {\n\t\treturn weight;\n\t}\n\n\tpublic void setWeight(int weight) {\n\t\tthis.weight = weight;\n\t}\n\n\tpublic int getSensitivity() {\n\t\treturn sensitivity;\n\t}\n\n\tpublic void setSensitivity(int sensitivity) {\n\t\tthis.sensitivity = sensitivity;\n\t}\n\n\tpublic int getStep_length() {\n\t\treturn step_length;\n\t}\n\n\tpublic void setStep_length(int step_length) {\n\t\tthis.step_length = step_length;\n\t}\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/data/bean/Weather.java",
    "content": "package com.bit.pedometer.data.bean;\n\nimport java.io.Serializable;\n\npublic class Weather{\n\n\t/**\n\t * \n\t */\n\tprivate static final long serialVersionUID = 1L;\n\tprivate int cityid;\n\tprivate String city;\n\tprivate String temp1;\n\tprivate String temp2;\n\tprivate String weather;\n\tprivate String ptime;\n\tpublic int getCityid() {\n\t\treturn cityid;\n\t}\n\tpublic void setCityid(int cityid) {\n\t\tthis.cityid = cityid;\n\t}\n\tpublic String getCity() {\n\t\treturn city;\n\t}\n\tpublic void setCity(String city) {\n\t\tthis.city = city;\n\t}\n\tpublic String getTemp1() {\n\t\treturn temp1;\n\t}\n\tpublic void setTemp1(String temp1) {\n\t\tthis.temp1 = temp1;\n\t}\n\tpublic String getTemp2() {\n\t\treturn temp2;\n\t}\n\tpublic void setTemp2(String temp2) {\n\t\tthis.temp2 = temp2;\n\t}\n\tpublic String getWeather() {\n\t\treturn weather;\n\t}\n\tpublic void setWeather(String weather) {\n\t\tthis.weather = weather;\n\t}\n\tpublic String getPtime() {\n\t\treturn ptime;\n\t}\n\tpublic void setPtime(String ptime) {\n\t\tthis.ptime = ptime;\n\t}\n\t\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/data/db/PedometerDB.java",
    "content": "package com.bit.pedometer.data.db;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport com.bit.pedometer.data.bean.Group;\nimport com.bit.pedometer.data.bean.Step;\nimport com.bit.pedometer.data.bean.User;\nimport com.bit.pedometer.data.bean.Weather;\n\nimport android.content.ContentValues;\nimport android.content.Context;\nimport android.database.Cursor;\nimport android.database.sqlite.SQLiteDatabase;\nimport android.util.Log;\n\n/**\n * 对数据库pedometer里的各个表进行增删改查\n * \n * @author 李垭超\n * \n */\npublic class PedometerDB {\n\n\n\n\tpublic static final String DB_NAME = \"pedometer.db\";// 数据库名称\n\n\tpublic static final int VERSION = 1;// 数据版本\n\n\tprivate static PedometerDB pedometerDB;\n\n\tprivate SQLiteDatabase db;\n\n\t/**\n\t * 将PedometerDB的构造方法设置为私有方法，在别的类里不能通过new来创建这个对象\n\t * \n\t * @param context\n\t */\n\tprivate PedometerDB(Context context) {\n\t\tPedometerOpenHelper pHelper = new PedometerOpenHelper(context, DB_NAME,\n\t\t\t\tnull, VERSION);\n\t\tdb = pHelper.getWritableDatabase();\n\t}\n\n\t/**\n\t * 使用单例模式创建数据库\n\t */\n\tpublic synchronized static PedometerDB getInstance(Context context) {\n\t\tif (pedometerDB == null) {\n\t\t\tpedometerDB = new PedometerDB(context);\n\t\t}\n\t\treturn pedometerDB;\n\t}\n\n\t/**\n\t * 增加user表里的数据\n\t * \n\t * @param user\n\t */\n\tpublic void saveUser(User user) {\n\t\tif (user != null) {\n\t\t\tContentValues values = new ContentValues();\n\t\t\tvalues.put(\"objectId\", user.getObjectId());\n\t\t\tvalues.put(\"name\", user.getName());\n\t\t\tvalues.put(\"sex\", user.getSex());\n\t\t\tvalues.put(\"picture\", user.getPicture());\n\t\t\tvalues.put(\"weight\", user.getWeight());\n\t\t\tvalues.put(\"sensitivity\", user.getSensitivity());\n\t\t\tvalues.put(\"step_length\", user.getStep_length());\n\t\t\tvalues.put(\"groupId\", user.getGroupId());\n\t\t\tvalues.put(\"today_step\", user.getToday_step());\n\t\t\tdb.insert(\"user\", null, values);\n\t\t}\n\t}\n\n\t/**\n\t * 根据user的id删除user表里的数据\n\t * \n\t * @param user\n\t */\n\tpublic void deleteUser(User user) {\n\t\tif (user != null) {\n\t\t\tdb.delete(\"user\", \"objectId = ?\",\n\t\t\t\t\tnew String[] { user.getObjectId() });\n\t\t}\n\t}\n\n\t/**\n\t * 升级user表里的数据\n\t * \n\t * @param user\n\t */\n\tpublic void updateUser(User user) {\n\t\tif (user != null) {\n\t\t\tContentValues values = new ContentValues();\n\t\t\tvalues.put(\"objectId\", user.getObjectId());\n\t\t\tvalues.put(\"name\", user.getName());\n\t\t\tvalues.put(\"sex\", user.getSex());\n\t\t\tvalues.put(\"picture\", user.getPicture());\n\t\t\tvalues.put(\"weight\", user.getWeight());\n\t\t\tvalues.put(\"sensitivity\", user.getSensitivity());\n\t\t\tvalues.put(\"step_length\", user.getStep_length());\n\t\t\tvalues.put(\"groupId\", user.getGroupId());\n\t\t\tvalues.put(\"today_step\", user.getToday_step());\n\t\t\tdb.update(\"user\", values, \"objectId = ?\",\n\t\t\t\t\tnew String[] { user.getObjectId() });\n\t\t}\n\t}\n\n\t/**\n\t * 升级user表里的数据\n\t * \n\t * @param user\n\t */\n\tpublic void changeObjectId(User user) {\n\t\tif (user != null) {\n\t\t\tContentValues values = new ContentValues();\n\t\t\tvalues.put(\"objectId\", user.getObjectId());\n\t\t\tdb.update(\"user\", values, null, null);\n\t\t}\n\t}\n\n\t/**\n\t * 增加step表里的数据\n\t * \n\t * @param step\n\t */\n\tpublic void saveStep(Step step) {\n\t\tif (step != null) {\n\t\t\tContentValues values = new ContentValues();\n\t\t\tvalues.put(\"number\", step.getNumber());\n\t\t\tvalues.put(\"date\", step.getDate());\n\t\t\tvalues.put(\"userId\", step.getUserId());\n\t\t\tdb.insert(\"step\", null, values);\n\t\t}\n\t}\n\n\t/**\n\t * 升级step表里的数据\n\t * \n\t * @param step\n\t */\n\tpublic void updateStep(Step step) {\n\t\tif (step != null) {\n\t\t\tContentValues values = new ContentValues();\n\t\t\tvalues.put(\"number\", step.getNumber());\n\t\t\tvalues.put(\"date\", step.getDate());\n\t\t\tvalues.put(\"userId\", step.getUserId());\n\t\t\tdb.update(\"step\", values, \"userId = ? and date = ?\", new String[] {\n\t\t\t\t\tstep.getUserId(), step.getDate() });\n\t\t}\n\t}\n\n\t/**\n\t * 升级step表里的数据\n\t * \n\t * @param step\n\t */\n\tpublic void changeuserId(Step step) {\n\t\tif (step != null) {\n\t\t\tContentValues values = new ContentValues();\n\t\t\t// values.put(\"number\", step.getNumber());\n\t\t\t// values.put(\"date\", step.getDate());\n\t\t\tvalues.put(\"userId\", step.getUserId());\n\t\t\tdb.update(\"step\", values, null, null);\n\t\t}\n\t}\n\n\t/**\n\t * 增加group数据表里的数据\n\t * \n\t * @param group\n\t */\n\tpublic void saveGroup(Group group) {\n\t\tif (group != null) {\n\t\t\tContentValues values = new ContentValues();\n\t\t\tvalues.put(\"total_number\", group.getTotal_number());\n\t\t\tvalues.put(\"member_number\", group.getMember_number());\n\t\t\tdb.insert(\"group1\", null, values);\n\t\t}\n\t}\n\n\t/**\n\t * 升级group表里的数据\n\t * \n\t * @param group\n\t */\n\tpublic void updateGroup(Group group) {\n\t\tif (group != null) {\n\t\t\tContentValues values = new ContentValues();\n\t\t\tvalues.put(\"total_number\", group.getTotal_number());\n\t\t\tvalues.put(\"member_number\", group.getMember_number());\n\t\t\tdb.update(\"group1\", values, \"id = ?\",\n\t\t\t\t\tnew String[] { String.valueOf(group.getID()) });\n\t\t}\n\t}\n\n\t/**\n\t * 存储从网站上抓取的天气数据\n\t * \n\t * @param weather\n\t */\n\tpublic void saveWeather(Weather weather) {\n\t\tif (weather != null) {\n\t\t\tContentValues values = new ContentValues();\n\t\t\tvalues.put(\"cityid\", weather.getCityid());\n\t\t\tvalues.put(\"city\", weather.getCity());\n\t\t\tvalues.put(\"temp1\", weather.getTemp1());\n\t\t\tvalues.put(\"temp2\", weather.getTemp2());\n\t\t\tvalues.put(\"weather\", weather.getWeather());\n\t\t\tvalues.put(\"date\", weather.getWeather());\n\t\t\tdb.insert(\"weather\", null, values);\n\t\t}\n\t}\n\n\t/**\n\t * 根据group组的id取数据\n\t * \n\t * @param weather\n\t */\n\tpublic Group loadGroup(int id) {\n\t\tGroup group = null;\n\t\tCursor cursor = db.query(\"group1\", null, \"id = ?\",\n\t\t\t\tnew String[] { String.valueOf(id) }, null, null, null);\n\t\tif (cursor.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tgroup = new Group();\n\t\t\t\tgroup.setID(cursor.getInt(cursor.getColumnIndex(\"id\")));\n\t\t\t\tgroup.setTotal_number(cursor.getInt(cursor\n\t\t\t\t\t\t.getColumnIndex(\"total_number\")));\n\t\t\t\tgroup.setMember_number(cursor.getInt(cursor\n\t\t\t\t\t\t.getColumnIndex(\"member_number\")));\n\t\t\t} while (cursor.moveToNext());\n\n\t\t}\n\t\treturn group;\n\n\t}\n\n\t/**\n\t * 根据user表的userid和date来取数据\n\t * \n\t * @param userId\n\t * @param date\n\t * @return\n\t */\n\tpublic Step loadSteps(String userId, String date) {\n\t\tStep step = null;\n\t\tCursor cursor = db.query(\"step\", null, \"userId = ? and date = ?\",\n\t\t\t\tnew String[] { userId, date }, null, null, null);\n\t\tif (cursor.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tstep = new Step();\n\t\t\t\tstep.setNumber(cursor.getInt(cursor.getColumnIndex(\"number\")));\n\t\t\t\tstep.setDate(cursor.getString(cursor.getColumnIndex(\"date\")));\n\t\t\t\tstep.setUserId(userId);\n\t\t\t} while (cursor.moveToNext());\n\n\t\t} else {\n\t\t\tLog.i(\"tag\", \"step is null!\");\n\t\t}\n\t\treturn step;\n\t}\n\n\t/**\n\t * 取出group1中的所有数据 因为sqlit中自带group表，所以不能创建group组\n\t * \n\t * @return\n\t */\n\tpublic List<Group> loadListGroup() {\n\t\tGroup group = null;\n\t\tList<Group> list = new ArrayList<Group>();\n\t\tCursor cursor = db.rawQuery(\"select * from group1\", null);\n\t\tif (cursor.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tgroup = new Group();\n\t\t\t\tgroup.setID(cursor.getInt(cursor.getColumnIndex(\"id\")));\n\t\t\t\tgroup.setTotal_number(cursor.getInt(cursor\n\t\t\t\t\t\t.getColumnIndex(\"total_number\")));\n\t\t\t\tgroup.setMember_number(cursor.getInt(cursor\n\t\t\t\t\t\t.getColumnIndex(\"member_number\")));\n\t\t\t\tlist.add(group);\n\t\t\t} while (cursor.moveToNext());\n\n\t\t}\n\t\treturn list;\n\n\t}\n\n\t/**\n\t * 取出user中所有的数据，按照步数的降序取出\n\t * \n\t * @return\n\t */\n\tpublic List<User> lodListUsers() {\n\t\tList<User> list = null;\n\t\tCursor cursor = db.rawQuery(\n\t\t\t\t\"select * from user  order by today_step desc\", null);\n\t\tif (cursor.moveToFirst()) {\n\t\t\tlist = new ArrayList<User>();\n\t\t\tdo {\n\t\t\t\tUser user = new User();\n\t\t\t\tuser.setObjectId(cursor.getString(cursor\n\t\t\t\t\t\t.getColumnIndex(\"objectId\")));\n\t\t\t\tuser.setGroupId(cursor.getInt(cursor.getColumnIndex(\"groupId\")));\n\t\t\t\tuser.setName(cursor.getString(cursor.getColumnIndex(\"name\")));\n\t\t\t\tuser.setSex(cursor.getString(cursor.getColumnIndex(\"sex\")));\n\t\t\t\tuser.setPicture(cursor.getBlob(cursor.getColumnIndex(\"picture\")));\n\t\t\t\tuser.setSensitivity(cursor.getInt(cursor\n\t\t\t\t\t\t.getColumnIndex(\"sensitivity\")));\n\t\t\t\tuser.setStep_length(cursor.getInt(cursor\n\t\t\t\t\t\t.getColumnIndex(\"step_length\")));\n\t\t\t\tuser.setWeight(cursor.getInt(cursor.getColumnIndex(\"weight\")));\n\t\t\t\tuser.setToday_step(cursor.getInt(cursor\n\t\t\t\t\t\t.getColumnIndex(\"today_step\")));\n\t\t\t\tlist.add(user);\n\t\t\t} while (cursor.moveToNext());\n\t\t}\n\t\treturn list;\n\n\t}\n\n\t/**\n\t * 更具date取出所有的step数据\n\t * \n\t * @param date\n\t * @return\n\t */\n\tpublic List<Step> loadListSteps() {\n\t\tList<Step> list = new ArrayList<Step>();\n\n\t\tCursor cursor = db.rawQuery(\"select * from step order by number desc\",\n\t\t\t\tnull);\n\t\tif (cursor.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tStep step = new Step();\n\t\t\t\tstep.setId(cursor.getInt(cursor.getColumnIndex(\"id\")));\n\t\t\t\tstep.setNumber(cursor.getInt(cursor.getColumnIndex(\"number\")));\n\t\t\t\tstep.setDate(cursor.getString(cursor.getColumnIndex(\"date\")));\n\t\t\t\tstep.setUserId(cursor.getString(cursor.getColumnIndex(\"userId\")));\n\t\t\t\tlist.add(step);\n\t\t\t} while (cursor.moveToNext());\n\n\t\t}\n\n\t\treturn list;\n\t}\n\n\t/**\n\t * 根据id取出user数据\n\t * \n\t * @param id\n\t * @return\n\t */\n\tpublic User loadUser(String objectId) {\n\t\tUser user = null;\n\t\tCursor cursor = db.query(\"user\", null, \"objectId = ?\",\n\t\t\t\tnew String[] { objectId }, null, null, null);\n\t\tif (cursor.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tuser = new User();\n\t\t\t\tuser.setName(cursor.getString(cursor.getColumnIndex(\"name\")));\n\t\t\t\tuser.setSex(cursor.getString(cursor.getColumnIndex(\"sex\")));\n\t\t\t\tuser.setObjectId(objectId);\n\t\t\t\tuser.setPicture(cursor.getBlob(cursor.getColumnIndex(\"picture\")));\n\t\t\t\tuser.setSensitivity(cursor.getInt(cursor\n\t\t\t\t\t\t.getColumnIndex(\"sensitivity\")));\n\t\t\t\tuser.setStep_length(cursor.getInt(cursor\n\t\t\t\t\t\t.getColumnIndex(\"step_length\")));\n\t\t\t\tuser.setWeight(cursor.getInt(cursor.getColumnIndex(\"weight\")));\n\t\t\t\tuser.setGroupId(cursor.getInt(cursor.getColumnIndex(\"groupId\")));\n\t\t\t\tuser.setToday_step(cursor.getInt(cursor\n\t\t\t\t\t\t.getColumnIndex(\"today_step\")));\n\t\t\t} while (cursor.moveToNext());\n\t\t} else {\n\t\t\tLog.i(\"tag\", \"User is null!\");\n\t\t}\n\t\treturn user;\n\t}\n\n\t/**\n\t * 取出第一个用户，也就是用此app的用户\n\t * \n\t * @param id\n\t * @return\n\t */\n\tpublic User loadFirstUser() {\n\t\tUser user = null;\n\t\tCursor cursor = db.query(\"user\", null, null, null, null, null, null);\n\t\tif (cursor.moveToFirst()) {\n\t\t\tuser = new User();\n\t\t\tuser.setName(cursor.getString(cursor.getColumnIndex(\"name\")));\n\t\t\tuser.setSex(cursor.getString(cursor.getColumnIndex(\"sex\")));\n\t\t\tuser.setObjectId(cursor.getString(cursor.getColumnIndex(\"objectId\")));\n\t\t\tuser.setPicture(cursor.getBlob(cursor.getColumnIndex(\"picture\")));\n\t\t\tuser.setSensitivity(cursor.getInt(cursor\n\t\t\t\t\t.getColumnIndex(\"sensitivity\")));\n\t\t\tuser.setStep_length(cursor.getInt(cursor\n\t\t\t\t\t.getColumnIndex(\"step_length\")));\n\t\t\tuser.setWeight(cursor.getInt(cursor.getColumnIndex(\"weight\")));\n\t\t\tuser.setGroupId(cursor.getInt(cursor.getColumnIndex(\"groupId\")));\n\t\t\tuser.setToday_step(cursor.getInt(cursor\n\t\t\t\t\t.getColumnIndex(\"today_step\")));\n\t\t} else {\n\t\t\tLog.i(\"tag\", \"User is null!\");\n\t\t}\n\t\treturn user;\n\t}\n\n\t/**\n\t * 更具日期取出天气数据\n\t * \n\t * @param date\n\t * @return\n\t */\n\tpublic Weather loadWeather(String date) {\n\t\tWeather weather = new Weather();\n\t\tCursor cursor = db.query(\"weather\", null, \"date = ?\",\n\t\t\t\tnew String[] { date }, null, null, null);\n\t\tif (cursor.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tweather.setCity(cursor.getString(cursor.getColumnIndex(\"city\")));\n\t\t\t\tweather.setTemp1(cursor.getString(cursor\n\t\t\t\t\t\t.getColumnIndex(\"temp1\")));\n\t\t\t\tweather.setTemp2(cursor.getString(cursor\n\t\t\t\t\t\t.getColumnIndex(\"temp2\")));\n\t\t\t\tweather.setWeather(cursor.getString(cursor\n\t\t\t\t\t\t.getColumnIndex(\"weather\")));\n\t\t\t} while (cursor.moveToNext());\n\n\t\t} else {\n\n\t\t}\n\n\t\treturn weather;\n\n\t}\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/data/db/PedometerOpenHelper.java",
    "content": "package com.bit.pedometer.data.db;\n\nimport android.content.Context;\nimport android.database.sqlite.SQLiteDatabase;\nimport android.database.sqlite.SQLiteDatabase.CursorFactory;\nimport android.database.sqlite.SQLiteOpenHelper;\n\npublic class PedometerOpenHelper extends SQLiteOpenHelper{\n\t\n\t/**\n\t * 创建step表\n\t */\n\tpublic static final String CREATE_STEP = \"create table step(\"\n\t\t\t+ \"id integer primary key autoincrement,\"\n\t\t\t+ \"number text,\"\n\t\t\t+ \"date integer,\"\n\t\t\t+ \"userId text)\";\n\t\n\t/**\n\t * 创建group表\n\t */\n\tpublic static final String CREATE_GROUP = \"create table group1(\"\n\t\t\t+ \"id integer primary key autoincrement,\"\n\t\t\t+ \"total_number integer,\"\n\t\t\t+ \"member_number integer)\";\n\t\n\n\t/**\n\t * 创建user表\n\t */\n\tpublic static final String CREATE_USER = \"create table user(\"\n\t\t\t+ \"objectId text ,\"\n\t\t\t+ \"name text,\"\n\t\t\t+ \"sex text,\"\n\t\t\t+ \"weight integer,\"\n\t\t\t+ \"step_length integer,\"\n\t\t\t+ \"sensitivity integer,\"\n\t\t\t+ \"picture blob,\"\n\t\t\t+ \"groupId integer,\"\n\t\t\t+ \"today_step integer)\";\n\t\n\t/**\n\t * 创建weather表\n\t */\n\tpublic static final String CREATE_WEATHER = \"create table weather(\"\n\t\t\t+ \"cityid integer primary key,\"\n\t\t\t+ \"city text,\"\n\t\t\t+ \"temp1 text,\"\n\t\t\t+ \"temp2 text,\"\n\t\t\t+ \"weather text,\"\n\t\t\t+ \"ptime text)\";\n\t\n\t/**\n\t * 带参数的PedometerOpenHelper构造函数\n\t * @param context\n\t * @param name\n\t * @param factory\n\t * @param version\n\t */\n\tpublic PedometerOpenHelper(Context context, String name,\n\t\t\tCursorFactory factory, int version) {\n\t\tsuper(context, name, factory, version);\n\t}\n\n\t@Override\n\t/**\n\t * 创建数据库\n\t */\n\tpublic void onCreate(SQLiteDatabase db) {\n\t\tdb.execSQL(CREATE_STEP);\n\t\tdb.execSQL(CREATE_USER);\n\t\tdb.execSQL(CREATE_WEATHER);\n\t\tdb.execSQL(CREATE_GROUP);\n\t}\n\n\t@Override\n\tpublic void onUpgrade(SQLiteDatabase arg0, int arg1, int arg2) {\n\t\t\n\t}\n\n\t\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/receiver/AutoSaveReceiver.java",
    "content": "package com.bit.pedometer.receiver;\n\nimport com.bit.pedometer.service.AutoSaveService;\n\nimport android.content.BroadcastReceiver;\nimport android.content.Context;\nimport android.content.Intent;\nimport android.widget.Toast;\n\npublic class AutoSaveReceiver extends BroadcastReceiver{\n\n\t@Override\n\tpublic void onReceive(Context context, Intent intent) {\n\n\t\tIntent i = new Intent(context, AutoSaveService.class);\n\t\tToast.makeText(context, \"date changes\", Toast.LENGTH_SHORT)\n\t\t.show();\n\t\tcontext.startService(i);\n\t}\n\n\t\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/service/AutoSaveService.java",
    "content": "package com.bit.pedometer.service;\n\nimport java.text.SimpleDateFormat;\nimport java.util.Calendar;\nimport java.util.Date;\n\nimport com.bit.pedometer.data.db.PedometerDB;\nimport com.bit.pedometer.data.bean.Step;\nimport com.bit.pedometer.data.bean.User;\n\nimport android.annotation.SuppressLint;\nimport android.app.Service;\nimport android.content.Intent;\nimport android.os.IBinder;\nimport android.util.Log;\n\npublic class AutoSaveService extends Service {\n\tprivate PedometerDB pedometerDB;\n\tprivate Step step;\n\tprivate User user;\n\tprivate String date;\n\tprivate Calendar calendar;\n\tprivate SimpleDateFormat sdf;\n\n\t@Override\n\tpublic IBinder onBind(Intent arg0) {\n\t\treturn null;\n\t}\n\n\t@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t}\n\n\t@Override\n\tpublic int onStartCommand(Intent intent, int flags, int startId) {\n\t\tinit();\n\t\treturn super.onStartCommand(intent, flags, startId);\n\n\t}\n\n\t@SuppressLint(\"SimpleDateFormat\")\n\tprivate void init() { \n\t\tLog.i(\"info\", \"你好啊\");\n\t\tcalendar = Calendar.getInstance();\n\t\tcalendar.add(Calendar.DAY_OF_MONTH, -1);\n\t\tsdf = new SimpleDateFormat(\"yyyyMMdd\");\n\t\tpedometerDB = PedometerDB.getInstance(this);\n\t\tdate = sdf.format(calendar.getTime());\n\t\tLog.i(\"info\", date);\n\n\t\tuser = pedometerDB.loadFirstUser();\n\t\tstep = pedometerDB.loadSteps(user.getObjectId(), date);\n\t\tstep.setNumber(StepDetector.CURRENT_SETP);\n\t\tpedometerDB.updateStep(step);\n\t\tLog.i(\"info\", \"你好啊1\");\n\n\t\tuser.setToday_step(0);\n\t\tpedometerDB.updateUser(user);\n\n\t\tstep = new Step();\n\t\tstep.setDate(sdf.format(new Date()));\n\t\tstep.setNumber(0);\n\t\tstep.setUserId(user.getObjectId());\n\t\tpedometerDB.saveStep(step);\n\n\t}\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/service/MyService.java",
    "content": "package com.bit.pedometer.service;\n\nimport android.app.IntentService;\nimport android.content.Intent;\nimport android.os.Handler;\nimport android.os.HandlerThread;\nimport android.os.IBinder;\nimport android.os.Looper;\nimport android.os.Message;\n\n/**\n * Created by Android Studio. author: liyachao Date: 15/10/24 Time: 10:24\n */\npublic abstract class MyService extends IntentService {\n    /**\n     * Creates an IntentService.  Invoked by your subclass's constructor.\n     *\n     * @param name Used to name the worker thread, important only for debugging.\n     */\n    public MyService(String name) {\n        super(name);\n        mName = name;\n    }\n\n    private volatile Looper mServiceLooper;\n    private volatile ServiceHandler mServiceHandler;\n    private String mName;\n    private boolean mRedelivery;\n\n    private final class ServiceHandler extends Handler {\n        public ServiceHandler(Looper looper) {\n            super(looper);\n        }\n\n        @Override\n        public void handleMessage(Message msg) {\n            onHandleIntent((Intent) msg.obj);\n            stopSelf(msg.arg1);\n        }\n    }\n\n    public void setIntentRedelivery(boolean enabled) {\n        mRedelivery = enabled;\n    }\n\n    @Override\n    public void onCreate() {\n        // TODO: It would be nice to have an option to hold a partial wakelock\n        // during processing, and to have a static startService(Context, Intent)\n        // method that would launch the service & hand off a wakelock.\n\n        super.onCreate();\n        HandlerThread thread = new HandlerThread(\"IntentService[\" + mName + \"]\");\n        thread.start();\n\n        mServiceLooper = thread.getLooper();\n        mServiceHandler = new ServiceHandler(mServiceLooper);\n    }\n\n    public void onStart(Intent intent, int startId) {\n        Message msg = mServiceHandler.obtainMessage();\n        msg.arg1 = startId;\n        msg.obj = intent;\n        mServiceHandler.sendMessage(msg);\n    }\n\n    /**\n     * You should not override this method for your IntentService. Instead,\n     * override {@link #onHandleIntent}, which the system calls when the IntentService\n     * receives a start request.\n     *\n     * @see android.app.Service#onStartCommand\n     */\n    @Override\n    public int onStartCommand(Intent intent, int flags, int startId) {\n        onStart(intent, startId);\n        return mRedelivery ? START_REDELIVER_INTENT : START_NOT_STICKY;\n    }\n\n    @Override\n    public void onDestroy() {\n        mServiceLooper.quit();\n    }\n\n    /**\n     * Unless you provide binding for your service, you don't need to implement this\n     * method, because the default implementation returns null.\n     *\n     * @see android.app.Service#onBind\n     */\n    @Override\n    public IBinder onBind(Intent intent) {\n        return null;\n    }\n\n    /**\n     * This method is invoked on the worker thread with a request to process.\n     * Only one Intent is processed at a time, but the processing happens on a\n     * worker thread that runs independently from other application logic.\n     * So, if this code takes a long time, it will hold up other requests to\n     * the same IntentService, but it will not hold up anything else.\n     * When all requests have been handled, the IntentService stops itself,\n     * so you should not call {@link #stopSelf}.\n     *\n     * @param intent The value passed to {@link\n     *               android.content.Context#startService(Intent)}.\n     */\n    protected abstract void onHandleIntent(Intent intent);\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/service/StepDetector.java",
    "content": "package com.bit.pedometer.service;\n\nimport android.content.Context;\nimport android.hardware.Sensor;\nimport android.hardware.SensorEvent;\nimport android.hardware.SensorEventListener;\nimport android.hardware.SensorManager;\n\n/**\n * 这是一个实现了信号监听的记步的类\n * 这是从谷歌找来的一个记步的算法，看不太懂\n * @author Liyachao Date:2015-1-6\n *\n */\npublic class StepDetector implements SensorEventListener {\n\n\tpublic static int CURRENT_SETP = 0;\n\tpublic static float SENSITIVITY = 10; // SENSITIVITY灵敏度\n\tprivate float mLastValues[] = new float[3 * 2];\n\tprivate float mScale[] = new float[2];\n\tprivate float mYOffset;\n\tprivate static long end = 0;\n\tprivate static long start = 0;\n\t/**\n\t * 最后加速度方向\n\t */\n\tprivate float mLastDirections[] = new float[3 * 2];\n\tprivate float mLastExtremes[][] = { new float[3 * 2], new float[3 * 2] };\n\tprivate float mLastDiff[] = new float[3 * 2];\n\tprivate int mLastMatch = -1;\n\n\t/**\n\t * 传入上下文的构造函数\n\t * \n\t * @param context\n\t */\n\tpublic StepDetector(Context context) {\n\t\tsuper();\n\t\tint h = 480;\n\t\tmYOffset = h * 0.5f;\n\t\tmScale[0] = -(h * 0.5f * (1.0f / (SensorManager.STANDARD_GRAVITY * 2)));\n\t\tmScale[1] = -(h * 0.5f * (1.0f / (SensorManager.MAGNETIC_FIELD_EARTH_MAX)));\n\t}\n\n\t//当传感器检测到的数值发生变化时就会调用这个方法\n\tpublic void onSensorChanged(SensorEvent event) {\n\t\tSensor sensor = event.sensor;\n\t\tsynchronized (this) {\n\t\t\tif (sensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n\n\t\t\t\tfloat vSum = 0;\n\t\t\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t\t\tfinal float v = mYOffset + event.values[i] * mScale[1];\n\t\t\t\t\tvSum += v;\n\t\t\t\t}\n\t\t\t\tint k = 0;\n\t\t\t\tfloat v = vSum / 3;\n\n\t\t\t\tfloat direction = (v > mLastValues[k] ? 1\n\t\t\t\t\t\t: (v < mLastValues[k] ? -1 : 0));\n\t\t\t\tif (direction == -mLastDirections[k]) {\n\t\t\t\t\t// Direction changed\n\t\t\t\t\tint extType = (direction > 0 ? 0 : 1); // minumum or\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// maximum?\n\t\t\t\t\tmLastExtremes[extType][k] = mLastValues[k];\n\t\t\t\t\tfloat diff = Math.abs(mLastExtremes[extType][k]\n\t\t\t\t\t\t\t- mLastExtremes[1 - extType][k]);\n\n\t\t\t\t\tif (diff > SENSITIVITY) {\n\t\t\t\t\t\tboolean isAlmostAsLargeAsPrevious = diff > (mLastDiff[k] * 2 / 3);\n\t\t\t\t\t\tboolean isPreviousLargeEnough = mLastDiff[k] > (diff / 3);\n\t\t\t\t\t\tboolean isNotContra = (mLastMatch != 1 - extType);\n\n\t\t\t\t\t\tif (isAlmostAsLargeAsPrevious && isPreviousLargeEnough\n\t\t\t\t\t\t\t\t&& isNotContra) {\n\t\t\t\t\t\t\tend = System.currentTimeMillis();\n\t\t\t\t\t\t\tif (end - start > 500) {// 此时判断为走了一步\n\n\t\t\t\t\t\t\t\tCURRENT_SETP++;\n\t\t\t\t\t\t\t\tmLastMatch = extType;\n\t\t\t\t\t\t\t\tstart = end;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmLastMatch = -1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tmLastDiff[k] = diff;\n\t\t\t\t}\n\t\t\t\tmLastDirections[k] = direction;\n\t\t\t\tmLastValues[k] = v;\n\t\t\t}\n\n\t\t}\n\t}\n\t//当传感器的经度发生变化时就会调用这个方法，在这里没有用\n\tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n\n\t}\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/service/StepService.java",
    "content": "package com.bit.pedometer.service;\n\nimport android.app.Service;\nimport android.content.Context;\nimport android.content.Intent;\nimport android.hardware.Sensor;\nimport android.hardware.SensorManager;\nimport android.os.IBinder;\n\npublic class StepService extends Service {\n\tpublic static Boolean flag = false;\n\tprivate SensorManager sensorManager;\n\tprivate StepDetector stepDetector;\n\n\t@Override\n\tpublic IBinder onBind(Intent arg0) {\n\t\t// TODO Auto-generated method stub\n\t\treturn null;\n\t}\n\n\t@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t\tnew Thread(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tstartStepDetector();\n\t\t\t}\n\t\t}).start();\n\n\t}\n\n\tprivate void startStepDetector() {\n\t\tflag = true;\n\t\tstepDetector = new StepDetector(this);\n\t\tsensorManager = (SensorManager) this.getSystemService(SENSOR_SERVICE);//获取传感器管理器的实例\n\t\tSensor sensor = sensorManager\n\t\t\t\t.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);//获得传感器的类型，这里获得的类型是加速度传感器\n\t\t//此方法用来注册，只有注册过才会生效，参数：SensorEventListener的实例，Sensor的实例，更新速率\n\t\tsensorManager.registerListener(stepDetector, sensor,\n\t\t\t\tSensorManager.SENSOR_DELAY_FASTEST);\n\t}\n\n\t@Override\n\tpublic int onStartCommand(Intent intent, int flags, int startId) {\n\t\treturn super.onStartCommand(intent, flags, startId);\n\t}\n\n\t@Override\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tflag = false;\n\t\tif (stepDetector != null) {\n\t\t\tsensorManager.unregisterListener(stepDetector);\n\t\t}\n\n\t}\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/activity/BaseActivity.java",
    "content": "package com.bit.pedometer.ui.activity;\n\nimport android.app.ProgressDialog;\nimport android.content.Context;\nimport android.content.DialogInterface;\nimport android.graphics.Color;\nimport android.os.Bundle;\nimport android.os.Handler;\nimport android.support.v4.app.FragmentActivity;\nimport android.text.TextUtils;\nimport android.view.KeyEvent;\nimport android.view.View;\nimport android.view.WindowManager;\nimport android.view.inputmethod.InputMethodManager;\nimport android.widget.ImageView;\nimport android.widget.LinearLayout;\nimport android.widget.RelativeLayout;\nimport android.widget.TextView;\nimport android.widget.Toast;\n\nimport com.bit.pedometer.R;\nimport com.bit.pedometer.ui.view.MyDialog;\n\n\n/**\n * Created by Android Studio. author: liyachao Date: 15/5/20 Time: 16:31\n */\npublic abstract class BaseActivity extends FragmentActivity {\n\n    /**\n     * 自定义的吐司\n     */\n    private Toast toast;\n\n//    /**\n//     * 吐司中显示的文字\n//     */\n//    private TextView toastTextView;\n\n    /**\n     * 使用handler发送吐司\n     */\n    private Handler handler = new Handler();\n\n    /**\n     * 显示对话框\n     */\n    private MyDialog dialog;\n    /**\n     * 现实进度条\n     */\n    private ProgressDialog progressDialog;\n\n    /**\n     * 软键盘管理工具\n     */\n    InputMethodManager imm;\n\n    private Context context;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        init();\n        setContentView();\n        initView();\n        setTitle();\n        initData();\n        setEvent();\n    }\n\n\n    /**\n     * 初始化布局\n     */\n    protected abstract void setContentView();\n\n    /**\n     * 初始化控件\n     */\n    protected abstract void initView();\n\n    /**\n     * 设置标头\n     */\n    protected abstract void setTitle();\n\n    /**\n     * 初始化值\n     */\n    protected abstract void initData();\n\n    /**\n     * 设置事件\n     */\n    protected abstract void setEvent();\n\n\n    private void init() {\n        context = this;\n        /**\n         * 初始化吐司和吐司的布局文件\n         */\n//        LayoutInflater inflater = LayoutInflater.from(this);\n//        View view = inflater.inflate(R.layout.toast_layout, null);\n//        toastTextView = (TextView) view.findViewById(R.id.toast_text);\n//        toast = new Toast(getApplicationContext());\n//        toast.setView(view);\n        toast = Toast.makeText(context, \"\", Toast.LENGTH_SHORT);\n\n\n        /**\n         * 初始化进度框\n         */\n        progressDialog = new ProgressDialog(this, R.style.ProgressDialog);\n        /**\n         * 初始化软键盘管理工具\n         */\n\n        imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);\n\n\n    }\n\n\n    protected <T extends View> T getView(int viewId) {\n        View view = findViewById(viewId);\n        return (T) view;\n    }\n\n    /**\n     * 设置标题栏\n     *\n     * @param str 标题栏文字\n     */\n    protected void setTitleText(String str) {\n        TextView titleText = (TextView) findViewById(R.id.center_title);\n        titleText.setText(str);\n    }\n\n    /**\n     * 设置标题栏颜色\n     *\n     * @param colorStr 标题栏颜色\n     */\n    protected void setMyTitleColor(String colorStr) {\n        RelativeLayout titleLayout = (RelativeLayout) findViewById(R.id.title_layout);\n        titleLayout.setBackgroundColor(Color.parseColor(colorStr));\n    }\n\n    /**\n     * 设置标题栏颜色\n     *\n     * @param color 标题栏颜色\n     */\n    protected void setMyTitleColor(int color) {\n        RelativeLayout titleLayout = (RelativeLayout) findViewById(R.id.title_layout);\n        titleLayout.setBackgroundColor(color);\n    }\n\n    /**\n     * 显示标题栏左部图片\n     *\n     * @param resId         图片资源的ID\n     * @param clickListener 点击事件\n     */\n    protected void showLeftWithImage(int resId,\n                                     View.OnClickListener clickListener) {\n        ImageView leftImage = (ImageView) findViewById(R.id.left_title_image);\n        leftImage.setVisibility(View.VISIBLE);\n        leftImage.setImageResource(resId);\n\n        //设置点击区域\n        LinearLayout leftClickRange = (LinearLayout) findViewById(R.id.left_title_layout);\n        leftClickRange.setOnClickListener(clickListener);\n    }\n\n    /**\n     * 显示左部的文字\n     *\n     * @param str           所要显示的文字\n     * @param clickListener 点击事件\n     */\n    protected void showLeftWithText(String str,\n                                    View.OnClickListener clickListener) {\n        TextView leftText = (TextView) findViewById(R.id.left_title_text);\n        leftText.setVisibility(View.VISIBLE);\n        leftText.setText(str);\n\n        //设置点击区域\n        LinearLayout leftClickRange = (LinearLayout) findViewById(R.id.left_title_layout);\n        leftClickRange.setOnClickListener(clickListener);\n    }\n\n    /**\n     * 显示标题栏右部图片\n     *\n     * @param resId         图片资源的ID\n     * @param clickListener 点击事件\n     */\n    protected void showRightWithImage(int resId,\n                                      View.OnClickListener clickListener) {\n        ImageView rightImage = (ImageView) findViewById(R.id.right_title_image);\n        rightImage.setVisibility(View.VISIBLE);\n        rightImage.setImageResource(resId);\n\n        //设置点击区域\n        LinearLayout rightClickRange = (LinearLayout) findViewById(R.id.right_title_layout);\n        rightClickRange.setOnClickListener(clickListener);\n    }\n\n    /**\n     * 显示标题栏右部第二个图片\n     *\n     * @param resId         图片资源的ID\n     * @param clickListener 点击事件\n     */\n    protected void showRightWithSecondImage(int resId,\n                                            View.OnClickListener clickListener) {\n        ImageView rightImage = (ImageView) findViewById(R.id.right_second_title_image);\n        rightImage.setVisibility(View.VISIBLE);\n        rightImage.setImageResource(resId);\n\n        //设置点击区域\n        LinearLayout rightClickRange = (LinearLayout) findViewById(R.id.right_second_title_layout);\n        rightClickRange.setOnClickListener(clickListener);\n    }\n\n    /**\n     * 显示右部的文字\n     *\n     * @param str           所要显示的文字\n     * @param clickListener 点击事件\n     */\n    protected void showRightWithText(String str,\n                                     View.OnClickListener clickListener) {\n        TextView rightText = (TextView) findViewById(R.id.right_title_text);\n        rightText.setVisibility(View.VISIBLE);\n        rightText.setText(str);\n\n        //设置点击区域\n        LinearLayout rightClickRange = (LinearLayout) findViewById(R.id.right_title_layout);\n        rightClickRange.setOnClickListener(clickListener);\n    }\n\n    /**\n     * 显示自定义的Toast，并在有软键盘和没有软键盘弹出时间不相同\n     *\n     * @param strId    在strings.xml对应的字符串\n     * @param booleans\n     */\n    protected void showToast(int strId, boolean[] booleans) {\n        String str = getResources().getString(strId);\n        showToast(str, booleans);\n    }\n\n    /**\n     * 显示自定义的Toast，并在有软键盘和没有软键盘弹出时间不相同\n     *\n     * @param str      吐司的内容\n     * @param booleans 输入框是否有焦点\n     */\n    protected void showToast(final String str, final boolean[] booleans) {\n        runOnUiThread(new Runnable() {\n            @Override\n            public void run() {\n                toast.setText(str);\n//        toast.setGravity(Gravity.TOP, 0, dp2px(60));\n                boolean isAllFocused = false;//是否输入框一个都没有选中\n                if (booleans != null) {\n                    for (boolean b : booleans) {\n                        if (b) {\n                            isAllFocused = true;\n                            break;\n                        }\n                    }\n                }\n\n                if (isAllFocused) {\n                    closeSoftKeyboard();\n                    handler.postDelayed(new Runnable() {\n                        @Override\n                        public void run() {\n                            toast.show();\n//                            Toast toast = Toast.makeText(context, str, Toast.LENGTH_SHORT);\n                        }\n                    }, 300);\n                } else {\n                    toast.show();\n//                    Toast.makeText(context, str, Toast.LENGTH_SHORT).show();\n                }\n            }\n        });\n\n    }\n\n    /**\n     * 关闭软键盘\n     */\n    protected void closeSoftKeyboard() {\n        if (getCurrentFocus() != null && getCurrentFocus().getWindowToken() != null) {\n            imm.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);\n        }\n    }\n\n\n    /**\n     * 开启软键盘\n     */\n    protected void showSoftKeyboard() {\n        imm.toggleSoftInput(0, InputMethodManager.SHOW_FORCED);\n    }\n\n    protected void showToast(String str) {\n        showToast(str, null);\n    }\n\n    protected void showToast(int strId) {\n        showToast(strId, null);\n    }\n\n\n    /**\n     * 显示进度框\n     *\n     * @param message 传入显示的文字\n     */\n    protected void showProgressDialog(final String message) {\n        runOnUiThread(new Runnable() {\n            @Override\n            public void run() {\n                progressDialog.setMessage(message);\n                progressDialog.setCancelable(false);\n                progressDialog.show();\n                progressDialog.setOnKeyListener(new DialogInterface.OnKeyListener() {\n                    @Override\n                    public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) {\n                        if ((keyCode == KeyEvent.KEYCODE_BACK) && (progressDialog.isShowing())) {\n                            progressDialog.dismiss();\n                            return true;\n                        }\n                        return false;\n                    }\n                });\n            }\n        });\n\n    }\n\n    /**\n     * 显示进度框\n     *\n     * @param message\n     * @param keyListener 监听点击返回按钮\n     */\n    protected void showProgressDialog(final String message, final DialogInterface.OnKeyListener keyListener) {\n        runOnUiThread(new Runnable() {\n            @Override\n            public void run() {\n                progressDialog.setMessage(message);\n                progressDialog.setCancelable(false);\n                progressDialog.show();\n                progressDialog.setOnKeyListener(keyListener);\n            }\n        });\n    }\n\n\n    /**\n     * 现实对话框\n     *\n     * @param message      输入显示的文字\n     * @param sureListener 监听事件\n     */\n    protected void showDialog(final String message, final View.OnClickListener sureListener) {\n\n        runOnUiThread(new Runnable() {\n            @Override\n            public void run() {\n                /**\n                 * 初始化对话框\n                 */\n                dialog = new MyDialog(BaseActivity.this, R.style.TransparentDialog);\n                dialog.setCancelable(false);\n                dialog.setDialogTitle(\"提示\");\n                dialog.setDialogContent(message);\n                dialog.setMyOnclickListener(new View.OnClickListener() {\n                    @Override\n                    public void onClick(View v) {\n                        dialog.dismiss();\n                    }\n                }, sureListener);\n                dialog.show();\n            }\n        });\n\n    }\n\n    /**\n     * 现实对话框\n     *\n     * @param message      输入显示的文字\n     * @param sureListener 监听事件\n     */\n    protected void showDialog(final String message,\n                              final String leftButtonStr, final String rightButtonStr,\n                              final View.OnClickListener sureListener) {\n\n        runOnUiThread(new Runnable() {\n            @Override\n            public void run() {\n                /**\n                 * 初始化对话框\n                 */\n                dialog = new MyDialog(BaseActivity.this, R.style.TransparentDialog);\n                dialog.setCancelable(false);\n                dialog.setDialogTitle(\"提示\");\n                dialog.setButtonText(leftButtonStr, rightButtonStr);\n                dialog.setDialogContent(message);\n                dialog.setMyOnclickListener(new View.OnClickListener() {\n                    @Override\n                    public void onClick(View v) {\n                        dialog.dismiss();\n                    }\n                }, sureListener);\n                dialog.show();\n            }\n        });\n\n    }\n\n    /**\n     * 现实对话框\n     *\n     * @param message      输入显示的文字\n     * @param sureListener 监听事件\n     */\n    protected void showDialog(final String message, final View.OnClickListener sureListener\n            , final View.OnClickListener cancelListener) {\n\n        runOnUiThread(new Runnable() {\n            @Override\n            public void run() {\n                /**\n                 * 初始化对话框\n                 */\n                dialog = new MyDialog(BaseActivity.this, R.style.TransparentDialog);\n                dialog.setCancelable(false);\n                dialog.setDialogTitle(\"提示\");\n                dialog.setDialogContent(message);\n                dialog.setMyOnclickListener(cancelListener, sureListener);\n                dialog.show();\n            }\n        });\n\n    }\n\n    /**\n     * 关闭对话框\n     */\n    protected void cancelProgressDialog() {\n        if (progressDialog != null && progressDialog.isShowing())\n            progressDialog.cancel();\n    }\n\n    /**\n     * 关闭进度框\n     */\n    protected void cancelDialog() {\n        if (dialog != null && dialog.isShowing()) {\n            dialog.dismiss();\n        }\n    }\n\n    /**\n     * popupwindow关闭，显示正常\n     */\n    protected void onLight() {\n        WindowManager.LayoutParams lp = getWindow().getAttributes();\n        lp.alpha = 1.0f;\n        getWindow().setAttributes(lp);\n    }\n\n    /**\n     * popupwindow开启，显示暗色\n     */\n    protected void offLight() {\n        WindowManager.LayoutParams lp = getWindow().getAttributes();\n        lp.alpha = 0.7f;\n        getWindow().setAttributes(lp);\n    }\n\n}"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/activity/MainActivity.java",
    "content": "package com.bit.pedometer.ui.activity;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport com.bit.pedometer.R;\nimport com.bit.pedometer.data.db.PedometerDB;\nimport com.bit.pedometer.ui.fragment.FragmentAdapter;\nimport com.bit.pedometer.ui.fragment.FragmentAnalysis;\nimport com.bit.pedometer.ui.fragment.FragmentHistory;\nimport com.bit.pedometer.ui.fragment.FragmentPK;\nimport com.bit.pedometer.ui.fragment.FragmentPedometer;\nimport com.bit.pedometer.ui.fragment.FragmentSet;\n\n\nimport android.os.Bundle;\nimport android.support.v4.app.FragmentActivity;\nimport android.view.Window;\nimport android.widget.RadioButton;\nimport android.widget.RadioGroup;\nimport android.support.v4.app.Fragment;\n\n/**\n * 这是pedometer的主页面\n *\n * @author 李垭超\n */\npublic class MainActivity extends FragmentActivity {\n    public static String myObjectId = null;\n    private RadioGroup rgs;//用来切换各个页面\n    private RadioButton btn1;//如果是用户第一次进入这个app没有进行注册，则会跳转到注册页面\n    public List<Fragment> fragments = new ArrayList<Fragment>();//将5个fragment添加到这个list里\n    private PedometerDB pd;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        this.requestWindowFeature(Window.FEATURE_NO_TITLE);\n        setContentView(R.layout.page_mian);\n        btn1 = (RadioButton) findViewById(R.id.btn5);\n        pd = PedometerDB.getInstance(this);\n        //判断用户是否进行注册过，如果没有进行注册则选中注册页面的radiobutton\n        if (pd.loadFirstUser() == null) {\n            btn1.setChecked(true);\n        } else {\n            myObjectId = pd.loadFirstUser().getObjectId();\n        }\n\n        rgs = (RadioGroup) findViewById(R.id.radioGroup);//实例化RadioGroup\n        fragments.add(new FragmentHistory());\n        fragments.add(new FragmentAnalysis());\n        fragments.add(new FragmentPedometer());\n        fragments.add(new FragmentPK());\n        fragments.add(new FragmentSet());\n        //自己写的一个fragment的适配器，进行几个页面的逻辑跳转\n        new FragmentAdapter(MainActivity.this, fragments, R.id.Fragment, rgs,\n                this);\n\n    }\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/activity/SetToTakePicActivity.java",
    "content": "package com.bit.pedometer.ui.activity;\n\nimport android.app.Activity;\nimport android.content.Intent;\nimport android.os.Bundle;\nimport android.view.View;\n\nimport com.bit.pedometer.R;\n\n/**\n * Created with Android Studio. User: liyachao Date: 15-4-14 Time: 下午2:33\n * 头像获取方式选择弹出框\n */\npublic class SetToTakePicActivity extends Activity {\n\n    public static final String INTENT_KEY_BUTTON_TYPE = \"ButtonType\";\n    public static final String BUTTON_TYPE_TAKE_PICTURES = \"TAKE_PICTURES\";\n    public static final String BUTTON_TYPE_FROM_ALBUM = \"FROM_ALBUM\";\n    public static final String BUTTON_TYPE_NUM = \"NUM\";\n    private String num;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_set_headpic);\n\n        View btnTakePics = findViewById(R.id.btn_take_pictures);\n        View btnFromAlbum = findViewById(R.id.btn_from_album);\n        View btnCancel = findViewById(R.id.btn_cancel);\n\n        btnTakePics.setOnClickListener(new mOnClickListener());\n        btnFromAlbum.setOnClickListener(new mOnClickListener());\n        btnCancel.setOnClickListener(new mOnClickListener());\n\n        num = getIntent().getStringExtra(\"num\");\n    }\n\n    class mOnClickListener implements View.OnClickListener {\n        @Override\n        public void onClick(View view) {\n            switch (view.getId()) {\n                case R.id.btn_take_pictures:\n                    Intent intent = new Intent();\n                    intent.putExtra(INTENT_KEY_BUTTON_TYPE,\n                            BUTTON_TYPE_TAKE_PICTURES);\n                    intent.putExtra(BUTTON_TYPE_NUM, num);\n                    setResult(Activity.RESULT_OK, intent);\n                    finish();\n                    break;\n                case R.id.btn_from_album:\n                    intent = new Intent();\n                    intent.putExtra(INTENT_KEY_BUTTON_TYPE, BUTTON_TYPE_FROM_ALBUM);\n                    intent.putExtra(BUTTON_TYPE_NUM, num);\n                    setResult(Activity.RESULT_OK, intent);\n                    finish();\n                    break;\n                case R.id.btn_cancel:\n                    finish();\n                    break;\n                default:\n                    break;\n            }\n        }\n    }\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/activity/WelcomeActivity.java",
    "content": "package com.bit.pedometer.ui.activity;\n\nimport java.util.Timer;\nimport java.util.TimerTask;\n\nimport com.bit.pedometer.R;\nimport com.bit.pedometer.service.StepDetector;\nimport com.bit.pedometer.service.StepService;\n\nimport android.app.Activity;\nimport android.content.Intent;\nimport android.os.Bundle;\nimport android.view.Window;\n\n/**\n * 这是开启程序的第一个启动页面\n * @author liyachao\n *\n */\npublic class WelcomeActivity extends Activity {\n\t//private Animation animation;\n\n\t@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tthis.requestWindowFeature(Window.FEATURE_NO_TITLE);//页面设置为无标题\n\t\t//如果StepServer是启动的话或者CURRENT_SETP不为0，则直接进入到主页面，否则进入欢迎页面\n\t\tif (StepService.flag || StepDetector.CURRENT_SETP > 0) {\n\t\t\tIntent intent = new Intent(WelcomeActivity.this, MainActivity.class);\n\t\t\tstartActivity(intent);\n\t\t\tthis.finish();\n\t\t} else {\n\t\t\tsetContentView(R.layout.welcome);\n\t\t\t\n//\t\t\tanimation = AnimationUtils.loadAnimation(WelcomeActivity.this,\n//\t\t\t\t\tR.anim.animation_main);\n//\t\t\tthis.findViewById(R.id.welcome).setAnimation(animation);\n//\t\t\tanimation.setAnimationListener(new AnimationListener() {\n//\n//\t\t\t\t@Override\n//\t\t\t\tpublic void onAnimationStart(Animation arg0) {\n//\t\t\t\t\t// TODO Auto-generated method stub\n//\n//\t\t\t\t}\n//\n//\t\t\t\t@Override\n//\t\t\t\tpublic void onAnimationRepeat(Animation arg0) {\n//\t\t\t\t\t// TODO Auto-generated method stub\n//\n//\t\t\t\t}\n//\n//\t\t\t\t@Override\n//\t\t\t\tpublic void onAnimationEnd(Animation arg0) {\n//\t\t\t\t\tIntent intent = new Intent(WelcomeActivity.this,\n//\t\t\t\t\t\t\tMainActivity.class);\n//\t\t\t\t\tstartActivity(intent);\n//\t\t\t\t\tWelcomeActivity.this.finish();\n//\t\t\t\t}\n//\t\t\t});\n\t\t\t//设置一个计时器，在此页面上停留3秒然后跳转到主页面,\n\t\t\t (new Timer()).schedule(new TimerTask() {\n\t\t\t public void run() {\n\t\t\t Intent intent = new Intent(WelcomeActivity.this,\n\t\t\t MainActivity.class);\n\t\t\t startActivity(intent);\n\t\t\t finish();\n\t\t\t }\n\t\t\t }, 3000);\n\t\t}\n\t}\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/fragment/FragmentAdapter.java",
    "content": "package com.bit.pedometer.ui.fragment;\n\n\nimport java.util.List;\n\nimport com.bit.pedometer.ui.activity.MainActivity;\nimport com.bit.pedometer.data.db.PedometerDB;\nimport com.bit.pedometer.data.bean.Group;\n\nimport android.annotation.SuppressLint;\nimport android.app.AlertDialog;\nimport android.content.Context;\nimport android.content.DialogInterface;\nimport android.content.DialogInterface.OnClickListener;\nimport android.support.v4.app.Fragment;\nimport android.support.v4.app.FragmentActivity;\nimport android.support.v4.app.FragmentTransaction;\nimport android.widget.RadioGroup;\nimport android.widget.RadioGroup.OnCheckedChangeListener;\n\n/**\n * 5个fragment切换的适配器\n * \n * @author 李垭超\n * \n */\npublic class FragmentAdapter implements OnCheckedChangeListener {\n\tprivate List<Fragment> fragments;// 一个tab页面对应一个Fragment\n\tprivate RadioGroup rGroup;// 用于切换tab\n\tprivate FragmentActivity activity;// Fragment所属的Activity\n\tprivate int fgContentId;// Activity中所要被替换的区域的id\n\tprivate int currentId; // 当前Tab页面索引\n\tprivate FragmentTransaction fTransaction;// 用于让调用者在切换tab时候增加新的功能\n\t@SuppressLint(\"SimpleDateFormat\")\n\tpublic FragmentAdapter(FragmentActivity activity,\n\t\t\tfinal List<Fragment> fragments, final int fgContentId,\n\t\t\tRadioGroup rGroup, Context context) {\n\t\tPedometerDB pedometerDB = PedometerDB.getInstance(context);\n\t\tthis.activity = activity;\n\t\tthis.fragments = fragments;\n\t\tthis.rGroup = rGroup;\n\t\tthis.fgContentId = fgContentId;\n\t\tfTransaction = activity.getSupportFragmentManager().beginTransaction();\n\t\t// 判断是否存在用户，如果存在则显示第三个页面，如果不存在则显示第5个页面\n\t\tif (MainActivity.myObjectId != null) {\n\t\t\tfTransaction.add(fgContentId, fragments.get(2));\n\t\t\tfTransaction.commit();\n\t\t} else {\n\t\t\t//如果是第一次登陆则自动初始化三个小组，进行PK\n\t\t\tGroup group = new Group();\n\t\t\tgroup.setTotal_number(0);\n\t\t\tgroup.setMember_number(0);\n\t\t\tpedometerDB.saveGroup(group);\n\n\t\t\tgroup.setTotal_number(0);\n\t\t\tgroup.setMember_number(0);\n\t\t\tpedometerDB.saveGroup(group);\n\n\t\t\tgroup.setTotal_number(0);\n\t\t\tgroup.setMember_number(0);\n\t\t\tpedometerDB.saveGroup(group);\n\n\t\t\t//进行对话框提示，需要进行注册\n\t\t\tAlertDialog.Builder dialog = new AlertDialog.Builder(context);\n\t\t\tdialog.setTitle(\"提示\");\n\t\t\tdialog.setMessage(\"您还没有注册，需要注册！\");\n\t\t\tdialog.setPositiveButton(\"确认\", new OnClickListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t\t\tfTransaction.add(fgContentId, fragments.get(4));\n\t\t\t\t\tfTransaction.show(fragments.get(4));\n\t\t\t\t\tfTransaction.commit();\n\t\t\t\t}\n\t\t\t});\n\t\t\tdialog.setCancelable(false);\n\t\t\tdialog.show();\n\t\t}\n\t\trGroup.setOnCheckedChangeListener(this);\n\t}\n\n\t/**\n\t * 改变Tab键，进行更换页面\n\t */\n\tpublic void onCheckedChanged(RadioGroup arg0, int arg1) {\n\t\tfor (int i = 0; i < rGroup.getChildCount(); i++) {\n\t\t\tif (rGroup.getChildAt(i).getId() == arg1) {\n\t\t\t\tFragment fragment = fragments.get(i);\n\t\t\t\tFragmentTransaction ft = obtainFragmentTransaction(i);\n\t\t\t\tgetCurrentFragment().onPause();// 暂停当前页面\n\t\t\t\tif (fragment.isAdded()) {\n\t\t\t\t\tfragment.onResume();// 启动目标tab的onResume()\n\t\t\t\t} else {\n\t\t\t\t\tft.add(fgContentId, fragment);\n\t\t\t\t}\n\t\t\t\tshowFragment(i);// 显示目标tab\n\t\t\t\tft.commit();\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t/**\n\t * 显示切换的页面\n\t * @param i\n\t */\n\tprivate void showFragment(int i) {\n\t\tfor (int i1 = 0; i1 < fragments.size(); i1++) {\n\t\t\tFragment fragment = fragments.get(i1);\n\t\t\tFragmentTransaction ft = obtainFragmentTransaction(i1);\n\t\t\tif (i == i1) {\n\t\t\t\tft.show(fragment);\n\t\t\t} else {\n\t\t\t\tft.hide(fragment);\n\t\t\t}\n\t\t\tft.commit();\n\t\t}\n\t\tcurrentId = i;// 更新目标tab为当前tab\n\t}\n\n\t/**\n\t * 得到当前的页面\n\t * @return\n\t */\n\tprivate Fragment getCurrentFragment() {\n\t\treturn fragments.get(currentId);\n\t}\n\n\t/**\n\t * 得到当前页面的事务管理\n\t * @param i\n\t * @return\n\t */\n\tprivate FragmentTransaction obtainFragmentTransaction(int i) {\n\t\tFragmentTransaction fg = activity.getSupportFragmentManager()\n\t\t\t\t.beginTransaction();\n\t\treturn fg;\n\t}\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/fragment/FragmentAnalysis.java",
    "content": "package com.bit.pedometer.ui.fragment;\n\nimport java.text.SimpleDateFormat;\nimport java.util.Calendar;\n\nimport com.bit.pedometer.ui.activity.MainActivity;\nimport com.bit.pedometer.R;\nimport com.bit.pedometer.data.db.PedometerDB;\nimport com.bit.pedometer.ui.fragment.tools.DisplayUtil;\nimport com.bit.pedometer.data.bean.Step;\nimport com.bit.pedometer.ui.view.HistogramView;\n\nimport android.annotation.SuppressLint;\nimport android.support.v4.app.Fragment;\nimport android.os.Bundle;\nimport android.view.LayoutInflater;\nimport android.view.MotionEvent;\nimport android.view.View;\nimport android.view.View.OnTouchListener;\nimport android.view.animation.Animation;\nimport android.view.animation.Transformation;\nimport android.view.ViewGroup;\nimport android.widget.TextView;\n\npublic class FragmentAnalysis extends Fragment implements OnTouchListener {\n\tprivate HistogramView hv;\n\n\tprivate PedometerDB pedometerDB;\n\n\tprivate String[] weeks;// 设置星期数目\n\tprivate int[] steps;// 设置7天的步数\n\tprivate int[] text;// 设置是否显示对应柱状图的数值\n\n\tprivate TextView average_step;\n\tprivate TextView sum_step;\n\n\tprivate Step step = null;\n\n\tprivate int average = 0;\n\tprivate int sum = 0;\n\tprivate int average1 = 0;\n\tprivate int sum1 = 0;\n\n\tprivate Calendar calendar;\n\tprivate String day;\n\n\tprivate View view;\n\n\tprivate AllAnimation ani;\n\n\t@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.analyze, container, false);\n\t\treturn view;\n\t}\n\n\t@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t\tsetWeek();\n\t\tsetProgress();\n\t\tview.startAnimation(ani);\n\n\t}\n\n\t@SuppressLint(\"ClickableViewAccessibility\")\n\tprivate void init() {\n\t\tweeks = new String[] { \"周一\", \"周二\", \"周三\", \"周四\", \"周五\", \"周六\", \"周日\" };\n\t\tsteps = new int[] { 0, 0, 0, 0, 0, 0, 0 };\n\t\ttext = new int[] { 0, 0, 0, 0, 0, 0, 0 };\n\t\taverage_step = (TextView) view.findViewById(R.id.average_step);\n\t\tsum_step = (TextView) view.findViewById(R.id.sum_step);\n\t\tani = new AllAnimation();\n\t\tani.setDuration(2000);\n\n\t\tcalendar = Calendar.getInstance();\n\n\t\thv = (HistogramView) view.findViewById(R.id.histograms);\n\n\t\tpedometerDB = PedometerDB.getInstance(getActivity());\n\n\t\thv.setOnTouchListener(this);\n\n\t}\n\n\t@SuppressLint(\"SimpleDateFormat\")\n\tprivate void setProgress() {\n\t\tint i = 0;\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyyMMdd\");\n\t\tday = sdf.format(calendar.getTime());\n\t\t// Toast.makeText(getActivity(), day + \"\", Toast.LENGTH_LONG).show();\n\t\tstep = pedometerDB.loadSteps(MainActivity.myObjectId, day);\n\t\tif (step != null) {\n\t\t\tsteps[i++] = step.getNumber();\n\t\t\tsum += step.getNumber();\n\t\t} else {\n\t\t\tsteps[i++] = 0;\n\t\t\tsum += 0;\n\t\t}\n\n\t\tcalendar.add(Calendar.DAY_OF_MONTH, -1);\n\t\tday = sdf.format(calendar.getTime());\n\t\tstep = pedometerDB.loadSteps(MainActivity.myObjectId, day);\n\t\tif (step != null) {\n\t\t\tsteps[i++] = step.getNumber();\n\t\t\tsum += step.getNumber();\n\t\t} else {\n\t\t\tsteps[i++] = 0;\n\t\t\tsum += 0;\n\t\t}\n\t\t// Toast.makeText(getActivity(), day+\"\", Toast.LENGTH_LONG).show();\n\n\t\tcalendar.add(Calendar.DAY_OF_MONTH, -1);\n\t\tday = sdf.format(calendar.getTime());\n\t\tstep = pedometerDB.loadSteps(MainActivity.myObjectId, day);\n\t\tif (step != null) {\n\t\t\tsteps[i++] = step.getNumber();\n\t\t\tsum += step.getNumber();\n\t\t} else {\n\t\t\tsteps[i++] = 0;\n\t\t\tsum += 0;\n\t\t}\n\n\t\tcalendar.add(Calendar.DAY_OF_MONTH, -1);\n\t\tday = sdf.format(calendar.getTime());\n\t\tstep = pedometerDB.loadSteps(MainActivity.myObjectId, day);\n\t\tif (step != null) {\n\t\t\tsteps[i++] = step.getNumber();\n\t\t\tsum += step.getNumber();\n\t\t} else {\n\t\t\tsteps[i++] = 0;\n\t\t\tsum += 0;\n\t\t}\n\n\t\tcalendar.add(Calendar.DAY_OF_MONTH, -1);\n\t\tday = sdf.format(calendar.getTime());\n\t\tstep = pedometerDB.loadSteps(MainActivity.myObjectId, day);\n\t\tif (step != null) {\n\t\t\tsteps[i++] = step.getNumber();\n\t\t\tsum += step.getNumber();\n\t\t} else {\n\t\t\tsteps[i++] = 0;\n\t\t\tsum += 0;\n\t\t}\n\n\t\tcalendar.add(Calendar.DAY_OF_MONTH, -1);\n\t\tday = sdf.format(calendar.getTime());\n\t\tstep = pedometerDB.loadSteps(MainActivity.myObjectId, day);\n\t\tif (step != null) {\n\t\t\tsteps[i++] = step.getNumber();\n\t\t\tsum += step.getNumber();\n\t\t} else {\n\t\t\tsteps[i++] = 0;\n\t\t\tsum += 0;\n\t\t}\n\n\t\tcalendar.add(Calendar.DAY_OF_MONTH, -1);\n\t\tday = sdf.format(calendar.getTime());\n\t\tstep = pedometerDB.loadSteps(MainActivity.myObjectId, day);\n\t\tif (step != null) {\n\t\t\tsteps[i++] = step.getNumber();\n\t\t\tsum += step.getNumber();\n\t\t} else {\n\t\t\tsteps[i++] = 0;\n\t\t\tsum += 0;\n\t\t}\n\n\t\thv.setWeekd(weeks);\n\t\thv.setProgress(steps);\n\n\t}\n\n\tprivate void setWeek() {\n\t\tint day = calendar.get(Calendar.DAY_OF_WEEK);\n\t\t// Toast.makeText(getActivity(), day + \"\", Toast.LENGTH_LONG).show();\n\t\tday -= 1;\n\t\tfor (int i = 0; i < weeks.length; i++) {\n\t\t\tweeks[i] = week(day - i);\n\t\t}\n\t}\n\n\tprivate String week(int day) {\n\t\tif (day < 1) {\n\t\t\tday += 7;\n\t\t}\n\t\tswitch (day) {\n\t\tcase 1:\n\t\t\treturn \"周一\";\n\t\tcase 2:\n\t\t\treturn \"周二\";\n\t\tcase 3:\n\t\t\treturn \"周三\";\n\t\tcase 4:\n\t\t\treturn \"周四\";\n\t\tcase 5:\n\t\t\treturn \"周五\";\n\t\tcase 6:\n\t\t\treturn \"周六\";\n\t\tcase 7:\n\t\t\treturn \"周日\";\n\t\tdefault:\n\t\t\treturn \"\";\n\t\t}\n\t}\n\n\tprivate class AllAnimation extends Animation {\n\t\t@Override\n\t\tprotected void applyTransformation(float interpolatedTime,\n\t\t\t\tTransformation t) {\n\t\t\tsuper.applyTransformation(interpolatedTime, t);\n\t\t\tif (interpolatedTime < 1.0f) {\n\t\t\t\tsum1 = (int) (sum * interpolatedTime);\n\t\t\t\taverage1 = (int) (average * interpolatedTime);\n\t\t\t} else {\n\t\t\t\tsum1 = sum;\n\t\t\t\taverage1 = average;\n\t\t\t}\n\t\t\tview.postInvalidate();\n\t\t\tsum_step.setText(sum1 + \"\");\n\t\t\taverage = sum / 7;\n\t\t\taverage_step.setText(average1 + \"\");\n\n\t\t}\n\t}\n\n\t@SuppressLint(\"ClickableViewAccessibility\")\n\t@Override\n\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\tint step = (v.getWidth() - dp2px(30)) / 8;\n\t\tint x = (int) event.getX();\n\t\tfor (int i = 0; i < 7; i++) {\n\t\t\tif (x > (dp2px(15) + step * (i + 1) - dp2px(15))\n\t\t\t\t\t&& x < (dp2px(15) + step * (i + 1) + dp2px(15))) {\n\t\t\t\ttext[i] = 1;\n\t\t\t\tfor (int j = 0; j < 7; j++) {\n\t\t\t\t\tif (i != j) {\n\t\t\t\t\t\ttext[j] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\thv.setText(text);\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tprivate int dp2px(int value) {\n\t\treturn DisplayUtil.dip2px(getActivity(), value);\n\t}\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/fragment/FragmentHistory.java",
    "content": "package com.bit.pedometer.ui.fragment;\n\nimport java.text.SimpleDateFormat;\nimport java.util.Calendar;\nimport java.util.Date;\n\nimport com.bit.pedometer.ui.activity.MainActivity;\nimport com.bit.pedometer.R;\nimport com.bit.pedometer.data.db.PedometerDB;\nimport com.bit.pedometer.data.bean.Step;\n\nimport android.annotation.SuppressLint;\nimport android.app.DatePickerDialog;\nimport android.support.v4.app.Fragment;\nimport android.app.DatePickerDialog.OnDateSetListener;\nimport android.os.Bundle;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.View.OnClickListener;\nimport android.view.ViewGroup;\nimport android.view.animation.Animation;\nimport android.view.animation.Transformation;\nimport android.widget.DatePicker;\nimport android.widget.ImageView;\nimport android.widget.ProgressBar;\nimport android.widget.TextView;\n\npublic class FragmentHistory extends Fragment implements OnClickListener {\n\tprivate AllAnimation ani;\n\tprivate View view;\n\tprivate ImageView iView;\n\tprivate TextView tView;\n\tprivate TextView number;\n\tprivate TextView ratio;\n\tprivate ProgressBar progressBar;\n\n\tprivate DatePicker dPicker;\n\tprivate DatePickerDialog dialog;\n\n\tprivate Calendar calendar;\n\tprivate int year;\n\tprivate int month;\n\tprivate int day;\n\tprivate String date;\n\tprivate String date1;\n\n\tprivate PedometerDB pedometerDB;\n\tprivate Step step;\n\n\tprivate int count;\n\tprivate int progress;\n\tprivate int ratio1;\n\tprivate SimpleDateFormat sdf;\n\n\t@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.history, container, false);\n\t\treturn view;\n\t}\n\n\t@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t\tinsert();\n\t}\n\n\t@SuppressLint(\"SimpleDateFormat\")\n\tprivate void init() {\n\t\tiView = (ImageView) view.findViewById(R.id.date_image);\n\t\ttView = (TextView) view.findViewById(R.id.date_text);\n\t\tnumber = (TextView) view.findViewById(R.id.number);\n\t\tprogressBar = (ProgressBar) view.findViewById(R.id.progressBar);\n\t\tratio = (TextView) view.findViewById(R.id.ratio);\n\n\t\tani = new AllAnimation();\n\t\tani.setDuration(2000);\n\t\tiView.setOnClickListener(this);\n\n\t\tcalendar = Calendar.getInstance();\n\t\tyear = calendar.get(Calendar.YEAR);\n\t\tmonth = calendar.get(Calendar.MONTH);\n\t\tday = calendar.get(Calendar.DAY_OF_MONTH);\n\t\tpedometerDB = PedometerDB.getInstance(getActivity());\n\n\t\tsdf = new SimpleDateFormat(\"yyyyMMdd\");\n\t\tdate1 = sdf.format(new Date());\n\n\t\tstep = pedometerDB.loadSteps(MainActivity.myObjectId, date1);\n\t\tif (step == null) {\n\t\t\tstep = new Step();\n\t\t}\n\t\tview.startAnimation(ani);\n\t\tnumber.setText(count + \"\");\n\t\tprogressBar.setProgress(progress);\n\t\tratio.setText(ratio1 + \"%\");\n\n\t}\n\n\t@Override\n\tpublic void onClick(View arg0) {\n\t\tdialog = new DatePickerDialog(getActivity(), new OnDateSetListener() {\n\n\t\t\tpublic void onDateSet(DatePicker arg0, int arg1, int arg2, int arg3) {\n\n\t\t\t\tif (arg3 < 10 && arg2 < 10) {\n\t\t\t\t\tdate = arg1 + \"\" + \"0\" + (arg2 + 1) + \"0\" + arg3;\n\t\t\t\t} else if (arg3 < 10) {\n\t\t\t\t\tdate = arg1 + \"\" + (arg2 + 1) + \"0\" + arg3;\n\t\t\t\t} else if (arg2 < 10) {\n\t\t\t\t\tdate = arg1 + \"\" + \"0\" + (arg2 + 1) + arg3;\n\t\t\t\t} else {\n\t\t\t\t\tdate = arg1 + \"\" + (arg2 + 1) + \"\" + arg3;\n\t\t\t\t}\n\t\t\t\tif (date.equals(date1)) {\n\t\t\t\t\ttView.setText(\"今天\");\n\t\t\t\t} else {\n\t\t\t\t\ttView.setText(arg1 + \"/\" + (arg2 + 1) + \"/\" + arg3);\n\t\t\t\t}\n\t\t\t\tqueryStep();\n\t\t\t}\n\t\t}, year, month, day);\n\t\tdPicker = dialog.getDatePicker();\n\t\tdPicker.setSpinnersShown(false);\n\t\tdPicker.setCalendarViewShown(true);\n\t\t// 设置对话框背景\n\t\t// dPicker.setBackground(view.getResources().getDrawable(R.drawable.back_pressed));\n\t\tdPicker.setMaxDate(System.currentTimeMillis());\n\t\t// dialog.setTitle(\"你好\");\n\t\tdialog.show();\n\n\t}\n\n\t// 这是用来测试数据的，正常使用的话，可以将这个方法删除。\n\tprivate void insert() {\n\t\tif (pedometerDB.lodListUsers().size() < 2) {\n\t\t\tint drawables[] = new int[] { R.drawable.head1, R.drawable.head2,\n\t\t\t\t\tR.drawable.head3, R.drawable.head4, R.drawable.head5,\n\t\t\t\t\tR.drawable.head6, R.drawable.head8, R.drawable.head9,\n\t\t\t\t\tR.drawable.head10 };\n\n\t\t\tcalendar.add(Calendar.DAY_OF_MONTH, -1);\n\t\t\tStep step = new Step();\n\t\t\tstep.setNumber(9000);\n\t\t\tstep.setDate(sdf.format(calendar.getTime()));\n\t\t\tstep.setUserId(MainActivity.myObjectId);\n\t\t\tpedometerDB.saveStep(step);\n\n\t\t\tcalendar.add(Calendar.DAY_OF_MONTH, -1);\n\t\t\tstep.setNumber(8754);\n\t\t\tstep.setDate(sdf.format(calendar.getTime()));\n\t\t\tstep.setUserId(MainActivity.myObjectId);\n\t\t\tpedometerDB.saveStep(step);\n\n\t\t\tcalendar.add(Calendar.DAY_OF_MONTH, -1);\n\t\t\tstep.setNumber(4213);\n\t\t\tstep.setDate(sdf.format(calendar.getTime()));\n\t\t\tstep.setUserId(MainActivity.myObjectId);\n\t\t\tpedometerDB.saveStep(step);\n\n\t\t\tcalendar.add(Calendar.DAY_OF_MONTH, -1);\n\t\t\tstep.setNumber(1234);\n\t\t\tstep.setDate(sdf.format(calendar.getTime()));\n\t\t\tstep.setUserId(MainActivity.myObjectId);\n\t\t\tpedometerDB.saveStep(step);\n\n\t\t\tcalendar.add(Calendar.DAY_OF_MONTH, -1);\n\t\t\tstep.setNumber(4523);\n\t\t\tstep.setDate(sdf.format(calendar.getTime()));\n\t\t\tstep.setUserId(MainActivity.myObjectId);\n\t\t\tpedometerDB.saveStep(step);\n\n\t\t\tcalendar.add(Calendar.DAY_OF_MONTH, -1);\n\t\t\tstep.setNumber(1342);\n\t\t\tstep.setDate(sdf.format(calendar.getTime()));\n\t\t\tstep.setUserId(MainActivity.myObjectId);\n\t\t\tpedometerDB.saveStep(step);\n\n//\t\t\tString temp = sdf.format(new Date());\n//\t\t\tGroup group = pedometerDB.loadGroup(1);\n//\t\t\tgroup.setMember_number(group.getMember_number() + 2);\n//\t\t\tgroup.setTotal_number(group.getTotal_number() + 9834);\n//\t\t\tpedometerDB.updateGroup(group);\n//\n//\t\t\tgroup = pedometerDB.loadGroup(2);\n//\t\t\tgroup.setMember_number(group.getMember_number() + 2);\n//\t\t\tgroup.setTotal_number(group.getTotal_number() + 11234);\n//\t\t\tpedometerDB.updateGroup(group);\n//\n//\t\t\tgroup = pedometerDB.loadGroup(3);\n//\t\t\tgroup.setMember_number(group.getMember_number() + 3);\n//\t\t\tgroup.setTotal_number(group.getTotal_number() + 12013);\n//\t\t\tpedometerDB.updateGroup(group);\n\n//\t\t\tUser user = new User();\n//\t\t\tuser.setName(\"潘兆轩\");\n//\t\t\tuser.setObjectId(\"1\");\n//\t\t\tuser.setPicture(PictureUtil.Bitmap2Byte(PictureUtil\n//\t\t\t\t\t.drawable2Bitmap(getActivity().getResources().getDrawable(\n//\t\t\t\t\t\t\tdrawables[1]))));\n//\t\t\tuser.setGroupId(1);\n//\t\t\tuser.setSensitivity(5);\n//\t\t\tuser.setSex(\"男\");\n//\t\t\tuser.setStep_length(35);\n//\t\t\tuser.setWeight(63);\n//\t\t\tuser.setToday_step(5213);\n//\t\t\tpedometerDB.saveUser(user);\n//\t\t\tstep.setNumber(5213);\n//\t\t\tstep.setDate(temp);\n//\t\t\tstep.setUserId(\"1\");\n//\t\t\tpedometerDB.saveStep(step);\n//\n//\t\t\tuser.setName(\"陶冶\");\n//\t\t\tuser.setObjectId(\"3\");\n//\t\t\tuser.setPicture(PictureUtil.Bitmap2Byte(PictureUtil\n//\t\t\t\t\t.drawable2Bitmap(getActivity().getResources().getDrawable(\n//\t\t\t\t\t\t\tdrawables[0]))));\n//\t\t\tuser.setSensitivity(5);\n//\t\t\tuser.setSex(\"女\");\n//\t\t\tuser.setGroupId(1);\n//\t\t\tuser.setToday_step(4321);\n//\t\t\tuser.setStep_length(30);\n//\t\t\tuser.setWeight(53);\n//\t\t\tpedometerDB.saveUser(user);\n//\t\t\tstep.setNumber(4321);\n//\t\t\tstep.setDate(temp);\n//\t\t\tstep.setUserId(\"3\");\n//\t\t\tpedometerDB.saveStep(step);\n//\n//\t\t\tuser.setName(\"李楠\");\n//\t\t\tuser.setObjectId(\"4\");\n//\t\t\tuser.setPicture(PictureUtil.Bitmap2Byte(PictureUtil\n//\t\t\t\t\t.drawable2Bitmap(getActivity().getResources().getDrawable(\n//\t\t\t\t\t\t\tdrawables[2]))));\n//\t\t\tuser.setGroupId(3);\n//\t\t\tuser.setSensitivity(5);\n//\t\t\tuser.setSex(\"男\");\n//\t\t\tuser.setStep_length(35);\n//\t\t\tuser.setWeight(63);\n//\t\t\tuser.setToday_step(3213);\n//\t\t\tpedometerDB.saveUser(user);\n//\t\t\tstep.setNumber(3213);\n//\t\t\tstep.setDate(temp);\n//\t\t\tstep.setUserId(\"3\");\n//\t\t\tpedometerDB.saveStep(step);\n//\n//\t\t\tuser.setName(\"李名扬\");\n//\t\t\tuser.setObjectId(\"6\");\n//\t\t\tuser.setPicture(PictureUtil.Bitmap2Byte(PictureUtil\n//\t\t\t\t\t.drawable2Bitmap(getActivity().getResources().getDrawable(\n//\t\t\t\t\t\t\tdrawables[3]))));\n//\t\t\tuser.setGroupId(2);\n//\t\t\tuser.setSensitivity(5);\n//\t\t\tuser.setSex(\"男\");\n//\t\t\tuser.setStep_length(35);\n//\t\t\tuser.setToday_step(6234);\n//\t\t\tuser.setWeight(89);\n//\t\t\tpedometerDB.saveUser(user);\n//\t\t\tstep.setNumber(6234);\n//\t\t\tstep.setDate(temp);\n//\t\t\tstep.setUserId(\"6\");\n//\t\t\tpedometerDB.saveStep(step);\n//\n//\t\t\tuser.setName(\"李涛\");\n//\t\t\tuser.setObjectId(\"7\");\n//\t\t\tuser.setPicture(PictureUtil.Bitmap2Byte(PictureUtil\n//\t\t\t\t\t.drawable2Bitmap(getActivity().getResources().getDrawable(\n//\t\t\t\t\t\t\tdrawables[4]))));\n//\t\t\tuser.setGroupId(2);\n//\t\t\tuser.setSensitivity(5);\n//\t\t\tuser.setToday_step(5000);\n//\t\t\tuser.setSex(\"女\");\n//\t\t\tuser.setStep_length(30);\n//\t\t\tuser.setWeight(53);\n//\t\t\tpedometerDB.saveUser(user);\n//\t\t\tstep.setNumber(5000);\n//\t\t\tstep.setDate(temp);\n//\t\t\tstep.setUserId(\"7\");\n//\t\t\tpedometerDB.saveStep(step);\n//\n//\t\t\tuser.setName(\"潘大轩\");\n//\t\t\tuser.setObjectId(\"8\");\n//\t\t\tuser.setPicture(PictureUtil.Bitmap2Byte(PictureUtil\n//\t\t\t\t\t.drawable2Bitmap(getActivity().getResources().getDrawable(\n//\t\t\t\t\t\t\tdrawables[5]))));\n//\t\t\tuser.setGroupId(3);\n//\t\t\tuser.setSensitivity(5);\n//\t\t\tuser.setToday_step(6400);\n//\t\t\tuser.setSex(\"女\");\n//\t\t\tuser.setStep_length(30);\n//\t\t\tuser.setWeight(53);\n//\t\t\tpedometerDB.saveUser(user);\n//\t\t\tstep.setNumber(6400);\n//\t\t\tstep.setDate(temp);\n//\t\t\tstep.setUserId(\"8\");\n//\t\t\tpedometerDB.saveStep(step);\n//\n//\t\t\tuser.setName(\"潘小轩\");\n//\t\t\tuser.setObjectId(\"9\");\n//\t\t\tuser.setPicture(PictureUtil.Bitmap2Byte(PictureUtil\n//\t\t\t\t\t.drawable2Bitmap(getActivity().getResources().getDrawable(\n//\t\t\t\t\t\t\tdrawables[6]))));\n//\t\t\tuser.setGroupId(3);\n//\t\t\tuser.setSensitivity(5);\n//\t\t\tuser.setToday_step(2400);\n//\t\t\tuser.setSex(\"女\");\n//\t\t\tuser.setStep_length(30);\n//\t\t\tuser.setWeight(53);\n//\t\t\tpedometerDB.saveUser(user);\n//\t\t\tstep.setNumber(2400);\n//\t\t\tstep.setDate(temp);\n//\t\t\tstep.setUserId(\"9\");\n//\t\t\tpedometerDB.saveStep(step);\n\n\t\t\t// Group group = new Group();\n\t\t\t// group.setAverage_number(9534);\n\t\t\t// group.setMember_number(2);\n\t\t\t// pedometerDB.saveGroup(group);\n\t\t\t//\n\t\t\t// group.setAverage_number(12340);\n\t\t\t// group.setMember_number(2);\n\t\t\t// pedometerDB.saveGroup(group);\n\t\t\t//\n\t\t\t// group.setAverage_number(12013);\n\t\t\t// group.setMember_number(3);\n\t\t\t// pedometerDB.saveGroup(group);\n\t\t}\n\t}\n\n\t/**\n\t * 查询选择日期所走的步数\n\t */\n\tprivate void queryStep() {\n\t\tstep = pedometerDB.loadSteps(MainActivity.myObjectId, date);\n\t\tif (step != null) {\n\t\t\t// count = 0;\n\t\t\t// Toast.makeText(getActivity(), step.getNumber() + \"---\"+date,\n\t\t\t// Toast.LENGTH_SHORT).show();\n\t\t\tprogressBar.setProgress(0);\n\t\t\tnumber.setText(count + \"\");\n\t\t\tview.startAnimation(ani);\n\t\t} else {\n\t\t\tprogressBar.setProgress(0);\n\t\t\tnumber.setText(0 + \"\");\n\t\t\tratio.setText(\"0%\");\n\t\t}\n\t}\n\n\tprivate class AllAnimation extends Animation {\n\t\t@Override\n\t\tprotected void applyTransformation(float interpolatedTime,\n\t\t\t\tTransformation t) {\n\t\t\tsuper.applyTransformation(interpolatedTime, t);\n\t\t\tif (interpolatedTime < 1.0f) {\n\t\t\t\tcount = (int) (step.getNumber() * interpolatedTime);\n\t\t\t\tprogress = (int) ((step.getNumber() / (double) 10000)\n\t\t\t\t\t\t* progressBar.getMax() * interpolatedTime);\n\t\t\t\tratio1 = (int) ((step.getNumber() / (double) 10000) * 100 * interpolatedTime);\n\t\t\t} else {\n\t\t\t\tcount = step.getNumber();\n\t\t\t\tprogress = (int) ((step.getNumber() / (double) 10000) * progressBar\n\t\t\t\t\t\t.getMax());\n\t\t\t\tratio1 = (int) ((step.getNumber() / (double) 10000) * 100);\n\t\t\t}\n\t\t\tview.postInvalidate();\n\t\t\tprogressBar.setProgress(progress);\n\t\t\tnumber.setText(count + \"\");\n\t\t\tratio.setText(ratio1 + \"%\");\n\t\t}\n\t}\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/fragment/FragmentPK.java",
    "content": "package com.bit.pedometer.ui.fragment;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport com.bit.pedometer.R;\nimport com.bit.pedometer.ui.fragment.PK.FragmentPK_1;\nimport com.bit.pedometer.ui.fragment.PK.FragmentPK_2;\nimport com.bit.pedometer.ui.fragment.PK.FragmentPK_addmember;\nimport com.bit.pedometer.ui.fragment.tools.DisplayUtil;\n\nimport android.support.v4.app.Fragment;\nimport android.support.v4.app.FragmentPagerAdapter;\nimport android.support.v4.view.ViewPager;\nimport android.support.v4.view.ViewPager.OnPageChangeListener;\nimport android.content.Intent;\nimport android.os.Bundle;\nimport android.util.DisplayMetrics;\nimport android.view.Display;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.View.OnClickListener;\nimport android.view.ViewGroup;\nimport android.widget.ImageView;\nimport android.widget.LinearLayout;\nimport android.widget.RadioButton;\n\npublic class FragmentPK extends Fragment {\n\tprivate View view;\n\tprivate RadioButton rButton1;\n\tprivate RadioButton rButton2;\n\tprivate List<Fragment> fragments;\n\tprivate FragmentPagerAdapter mAdapter;\n\tprivate ViewPager viewPager;\n\tprivate ImageView imageView;\n\tprivate int mScreen1_2;\n\tprivate ImageView friend;\n\tFragmentPK_1 fPk_1;\n\tFragmentPK_2 fPk_2;\n\tprivate int mCurrentPageIndex;\n\n\t@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.pk, container, false);\n\t\tinit();\n\t\tinitTabline();\n\t\treturn view;\n\t}\n\n\tprivate void initTabline() {\n\t\timageView = (ImageView) view.findViewById(R.id.pk_tabline);\n\t\tDisplay display = getActivity().getWindow().getWindowManager()\n\t\t\t\t.getDefaultDisplay();\n\t\tDisplayMetrics outMetrics = new DisplayMetrics();\n\t\tdisplay.getMetrics(outMetrics);// 得到屏幕的像素和分辨率,得到了屏幕的高度和宽度\n\t\tmScreen1_2 = outMetrics.widthPixels / 2\n\t\t\t\t- DisplayUtil.dip2px(getActivity(), 60);\n\t\tLinearLayout.LayoutParams lp = (android.widget.LinearLayout.LayoutParams) imageView\n\t\t\t\t.getLayoutParams();\n\t\tlp.leftMargin = DisplayUtil.dip2px(getActivity(), 60);\n\t\tlp.width = mScreen1_2;\n\t\timageView.setLayoutParams(lp);\n\t}\n\n\tprivate void init() {\n\t\trButton1 = (RadioButton) view.findViewById(R.id.pk_1);\n\t\trButton2 = (RadioButton) view.findViewById(R.id.pk_2);\n\t\tviewPager = (ViewPager) view.findViewById(R.id.viewpager);\n\n\t\tfriend = (ImageView) view.findViewById(R.id.friend);\n\t\trButton1.setClickable(false);\n\t\trButton2.setClickable(false);\n\t\tfragments = new ArrayList<Fragment>();\n\n\t\tfPk_1 = new FragmentPK_1();\n\t\tfPk_2 = new FragmentPK_2();\n\n\t\tfragments.add(fPk_1);\n\t\tfragments.add(fPk_2);\n\n\t\tmAdapter = new FragmentPagerAdapter(getActivity()\n\t\t\t\t.getSupportFragmentManager()) {\n\n\t\t\t@Override\n\t\t\tpublic int getCount() {\n\t\t\t\treturn fragments.size();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Fragment getItem(int arg0) {\n\t\t\t\treturn fragments.get(arg0);\n\t\t\t}\n\t\t};\n\t\tviewPager.setAdapter(mAdapter);\n\t\tviewPager.setOnPageChangeListener(new OnPageChangeListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onPageSelected(int position) {\n\t\t\t\tswitch (position) {\n\t\t\t\tcase 0:\n\t\t\t\t\trButton1.setChecked(true);\n\t\t\t\t\trButton2.setChecked(false);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\trButton1.setChecked(false);\n\t\t\t\t\trButton2.setChecked(true);\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\t\t\t\tmCurrentPageIndex = position;\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onPageScrolled(int position, float positionOffset,\n\t\t\t\t\tint positionOffsetPx) {\n\t\t\t\tLinearLayout.LayoutParams lp = (android.widget.LinearLayout.LayoutParams) imageView\n\t\t\t\t\t\t.getLayoutParams();\n\t\t\t\tif (mCurrentPageIndex == 0 && position == 0)// 0->1\n\t\t\t\t{\n\t\t\t\t\tlp.leftMargin = DisplayUtil.dip2px(getActivity(), 60)\n\t\t\t\t\t\t\t+ (int) (positionOffset * mScreen1_2 + mCurrentPageIndex\n\t\t\t\t\t\t\t\t\t* mScreen1_2);\n\t\t\t\t} else if (mCurrentPageIndex == 1 && position == 0)// 1->0\n\t\t\t\t{\n\t\t\t\t\tlp.leftMargin = DisplayUtil.dip2px(getActivity(), 60)\n\t\t\t\t\t\t\t+ (int) (mCurrentPageIndex * mScreen1_2 + (positionOffset - 1)\n\t\t\t\t\t\t\t\t\t* mScreen1_2);\n\t\t\t\t}\n\t\t\t\timageView.setLayoutParams(lp);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\t\t});\n\n\t\tfriend.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View arg0) {\n//\t\t\t\tConnectivityManager connectivityManager = (ConnectivityManager) getActivity()\n//\t\t\t\t\t\t.getSystemService(getActivity().CONNECTIVITY_SERVICE);\n//\t\t\t\tNetworkInfo networkInfo = connectivityManager\n//\t\t\t\t\t\t.getActiveNetworkInfo();\n//\t\t\t\tif (networkInfo != null && networkInfo.isAvailable()) {\n\t\t\t\t\tIntent intent = new Intent(getActivity(),\n\t\t\t\t\t\t\tFragmentPK_addmember.class);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\tgetActivity().overridePendingTransition(\n\t\t\t\t\t\t\tR.anim.slide_left_in, R.anim.slide_left_out);\n\n//\t\t\t\t} else {\n//\t\t\t\t\tToast.makeText(getActivity(), \"您需要连接网络才能使用此功能~\", Toast.LENGTH_LONG)\n//\t\t\t\t\t\t\t.show();\n//\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\n\t}\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/fragment/FragmentPedometer.java",
    "content": "package com.bit.pedometer.ui.fragment;\n\nimport java.text.SimpleDateFormat;\nimport java.util.Date;\n\nimport org.json.JSONException;\nimport org.json.JSONObject;\n\nimport cn.sharesdk.framework.ShareSDK;\n\nimport com.bit.pedometer.ui.activity.MainActivity;\nimport com.bit.pedometer.R;\nimport com.bit.pedometer.data.db.PedometerDB;\nimport com.bit.pedometer.ui.fragment.onekeyshare.*;\nimport com.bit.pedometer.data.bean.Group;\nimport com.bit.pedometer.data.bean.Step;\nimport com.bit.pedometer.data.bean.User;\nimport com.bit.pedometer.data.bean.Weather;\nimport com.bit.pedometer.service.StepDetector;\nimport com.bit.pedometer.service.StepService;\nimport com.bit.pedometer.ui.view.CircleBar;\nimport com.bit.pedometer.common.utils.HttpCallbackListener;\nimport com.bit.pedometer.common.utils.HttpUtil;\n\nimport android.annotation.SuppressLint;\nimport android.support.v4.app.Fragment;\nimport android.content.Intent;\nimport android.net.ConnectivityManager;\nimport android.net.NetworkInfo;\nimport android.os.Bundle;\nimport android.os.Handler;\nimport android.os.Message;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.View.OnClickListener;\nimport android.view.ViewGroup;\nimport android.widget.ImageView;\nimport android.widget.Toast;\n\npublic class FragmentPedometer extends Fragment implements OnClickListener {\n\tprivate View view;\n\tprivate CircleBar circleBar;\n\tprivate int total_step = 0;\n\tprivate Thread thread;\n\tprivate int Type = 1;\n\tprivate int calories = 0;\n\tprivate ImageView sharekey;\n\tprivate int step_length = 50;\n\tprivate int weight = 70;\n\tprivate Step step = null;\n\tprivate User user = null;\n\tprivate Group group = null;\n\tprivate Weather weather;\n\tprivate PedometerDB pedometerDB;\n\tprivate SimpleDateFormat sdf;\n\tprivate String today;\n\tprivate String test;\n\tprivate boolean flag = true;// 来判断第三个页面是否开启动画\n\n\t@SuppressLint(\"HandlerLeak\")\n\tHandler handler = new Handler() {\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tsuper.handleMessage(msg);\n\t\t\ttotal_step = StepDetector.CURRENT_SETP;\n\t\t\tif (Type == 1) {\n\t\t\t\tcircleBar.setProgress(total_step, Type);\n\t\t\t} else if (Type == 2) {\n\t\t\t\tcalories = (int) (weight * total_step * step_length * 0.01 * 0.01);\n\t\t\t\tcircleBar.setProgress(calories, Type);\n\t\t\t} else if (Type == 3) {\n\t\t\t\tif (flag) {\n\t\t\t\t\tcircleBar.startCustomAnimation();\n\t\t\t\t\tflag = false;\n\t\t\t\t}\n\t\t\t\tif (test != null || weather.getWeather() == null) {\n\t\t\t\t\tweather.setWeather(\"正在更新中...\");\n\t\t\t\t\tweather.setPtime(\"\");\n\t\t\t\t\tweather.setTemp1(\"\");\n\t\t\t\t\tweather.setTemp2(\"\");\n\t\t\t\t\tcircleBar.setWeather(weather);\n\t\t\t\t} else {\n\t\t\t\t\tcircleBar.setWeather(weather);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\t@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tthis.view = inflater.inflate(R.layout.pedometer, container, false);\n\t\tinit();\n\t\tmThread();\n\t\treturn view;\n\t}\n\n\t@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\t\tsaveDate();\n\t}\n\t@Override\n\tpublic void onDestroy() {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onDestroy();\n\t\tsaveDate();\n\t}\n\t\n\n\tprivate void saveDate() {\n\t\tuser = pedometerDB.loadUser(MainActivity.myObjectId);\n\t\tstep = pedometerDB.loadSteps(MainActivity.myObjectId, today);\n\t\tgroup = pedometerDB.loadGroup(user.getGroupId());\n\t\tuser.setToday_step(StepDetector.CURRENT_SETP);\n\t\tpedometerDB.updateUser(user);\n//\t\tToast.makeText(getActivity(), StepDetector.CURRENT_SETP+\"--\" + group.getID(),\n//\t\t\t\tToast.LENGTH_LONG).show();\n\t\tgroup.setTotal_number(group.getTotal_number()\n\t\t\t\t+ (user.getToday_step()- step.getNumber()));\n\t\tpedometerDB.updateGroup(group);\n\t\tstep.setNumber(StepDetector.CURRENT_SETP);\n\t\tpedometerDB.updateStep(step);\n\t}\n\n\t@SuppressLint(\"SimpleDateFormat\")\n\tprivate void init() {\n\t\n\t\tConnectivityManager connectivityManager = (ConnectivityManager) getActivity()\n\t\t\t\t.getSystemService(getActivity().CONNECTIVITY_SERVICE);\n\t\tNetworkInfo networkInfo = connectivityManager\n\t\t\t\t.getActiveNetworkInfo();\n\t\tif (networkInfo != null && networkInfo.isAvailable()) {\n\t\t\t\n\t\t}else {\n\t\t\tToast.makeText(getActivity(), \"没有网络\", Toast.LENGTH_LONG).show();\n\t\t}\n\t\tsdf = new SimpleDateFormat(\"yyyyMMdd\");\n\t\ttoday = sdf.format(new Date());\n\t\t\n\t\tpedometerDB = PedometerDB.getInstance(getActivity());\n\t\tuser = pedometerDB.loadUser(MainActivity.myObjectId);\n//\t\tToast.makeText(getActivity(), MainActivity.myObjectId+\"--\" ,\n//\t\t\t\tToast.LENGTH_LONG).show();\n\t\tif (MainActivity.myObjectId != null) {\n\t\t\tstep_length = user.getStep_length();\n\t\t\tweight = user.getWeight();\n\t\t\tStepDetector.SENSITIVITY = user.getSensitivity();\n\t\t\tStepDetector.CURRENT_SETP = user.getToday_step();\n\t\t} else {\n\t\t\tToast.makeText(getActivity(), \"this is my\", Toast.LENGTH_SHORT)\n\t\t\t\t\t.show();\n\t\t}\n\t\tIntent intent = new Intent(getActivity(), StepService.class);\n\t\tgetActivity().startService(intent);\n\n\t\tsharekey = (ImageView) view.findViewById(R.id.title_pedometer);\n\t\tweather = new Weather();\n\t\tcircleBar = (CircleBar) view.findViewById(R.id.progress_pedometer);\n\t\tcircleBar.setMax(10000);\n\t\tcircleBar.setProgress(StepDetector.CURRENT_SETP, 1);\n\t\tcircleBar.startCustomAnimation();\n\t\tcircleBar.setOnClickListener(this);\n\n\t\tShareSDK.initSDK(getActivity());\n\t\tsharekey.setOnClickListener(this);\n\n\t}\n\n\tprivate void mThread() {\n\t\tif (thread == null) {\n\n\t\t\tthread = new Thread(new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tThread.sleep(500);\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (StepService.flag) {\n\t\t\t\t\t\t\tMessage msg = new Message();\n\t\t\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tthread.start();\n\t\t}\n\t}\n\n\t@SuppressLint(\"SimpleDateFormat\")\n\tprivate void queryFromServer(final String address) {\n\t\tHttpUtil.sendHttpRequest(address, new HttpCallbackListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onFinish(String response) {\n\t\t\t\tJSONObject jsonObject;\n\t\t\t\ttry {\n\t\t\t\t\tjsonObject = new JSONObject(response.toString());\n\t\t\t\t\tJSONObject weatherInfo = jsonObject\n\t\t\t\t\t\t\t.getJSONObject(\"weatherinfo\");\n\t\t\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\t\t\tweather.setPtime(sdf.format(new Date()));\n\t\t\t\t\tweather.setTemp1(weatherInfo.getString(\"temp1\"));\n\t\t\t\t\tweather.setTemp2(weatherInfo.getString(\"temp2\"));\n\t\t\t\t\tweather.setWeather(weatherInfo.getString(\"weather\"));\n\t\t\t\t\ttest = null;\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onError(Exception e) {\n\t\t\t\ttest = \"同步失败\";\n\t\t\t}\n\t\t});\n\t}\n\n\t@Override\n\tpublic void onClick(View arg0) {\n\t\tswitch (arg0.getId()) {\n\t\tcase R.id.title_pedometer:\n\t\t\tOnekeyShare oks = new OnekeyShare();\n\t\t\toks.setNotification(R.drawable.pedometer,\n\t\t\t\t\t\"ShareSDK notification content\");\n\t\t\toks.setText(\"今天已经走了\" + total_step + \"步\");\n\t\t\toks.setSilent(false);\n\t\t\toks.disableSSOWhenAuthorize();\n\t\t\toks.setDialogMode();\n\t\t\t// 显示\n\t\t\toks.show(getActivity());\n\t\t\tbreak;\n\t\tcase R.id.progress_pedometer:\n\t\t\tif (Type == 1) {\n\t\t\t\tType = 2;\n\t\t\t} else if (Type == 2) {\n\t\t\t\tString address = \"http://www.weather.com.cn/data/cityinfo\"\n\t\t\t\t\t\t+ \"/101010100.html\";\n\t\t\t\tqueryFromServer(address);\n\t\t\t\tflag = true;\n\t\t\t\tType = 3;\n\t\t\t} else if (Type == 3) {\n\t\t\t\tType = 1;\n\t\t\t}\n\t\t\tMessage msg = new Message();\n\t\t\thandler.sendMessage(msg);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/fragment/FragmentSet.java",
    "content": "package com.bit.pedometer.ui.fragment;\n\nimport java.io.File;\nimport java.text.SimpleDateFormat;\nimport java.util.Date;\n\nimport com.bit.pedometer.ui.activity.MainActivity;\nimport com.bit.pedometer.R;\nimport com.bit.pedometer.ui.activity.SetToTakePicActivity;\nimport com.bit.pedometer.data.db.PedometerDB;\nimport com.bit.pedometer.ui.fragment.tools.PictureUtil;\nimport com.bit.pedometer.ui.fragment.tools.ToRoundBitmap;\nimport com.bit.pedometer.data.bean.Group;\nimport com.bit.pedometer.data.bean.Step;\nimport com.bit.pedometer.data.bean.User;\n\nimport android.annotation.SuppressLint;\nimport android.app.Activity;\nimport android.app.AlertDialog;\nimport android.support.v4.app.Fragment;\nimport android.content.DialogInterface;\nimport android.content.Intent;\nimport android.graphics.Bitmap;\nimport android.graphics.BitmapFactory;\nimport android.net.Uri;\nimport android.os.Bundle;\nimport android.os.Environment;\nimport android.provider.MediaStore;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.View.OnClickListener;\nimport android.view.ViewGroup;\nimport android.widget.EditText;\nimport android.widget.ImageView;\nimport android.widget.LinearLayout;\nimport android.widget.NumberPicker;\nimport android.widget.RadioButton;\nimport android.widget.TextView;\nimport android.widget.Toast;\n\npublic class FragmentSet extends Fragment implements OnClickListener {\n    public static final int REQUEST_CODE_TO_TACK_PICTURE = 2201;\n    public static final int REQUEST_CODE_TACK_PICTURE = 2202;\n    public static final int REQUEST_CODE_TACK_PICTURE_ZOOM = 2204;\n    public static final int REQUEST_CODE_FROM_ALBUM = 2203;\n    public static final int REQUEST_CODE_FROM_ALBUM_ZOOM = 2205;\n\n\n    private File file;\n    private View view;\n    // private LinearLayout sexLayout;\n\n\n    private LinearLayout weightLayout;\n    private LinearLayout sensitivyLayout;\n    private LinearLayout lengthLayout;\n    private LinearLayout nameLayout;\n    private RadioButton rButton1;\n    private RadioButton rButton2;\n\n    private TextView weightText;\n    private ImageView pictureImage;\n    private TextView sensitivyText;\n    private TextView lengthText;\n    private TextView nameText;\n    private EditText editText;\n\n    private AlertDialog.Builder dialog;\n    private NumberPicker numberPicker;\n\n    private PedometerDB pedometerDB;\n    private User user = null;\n    private Group group = null;\n    private ToRoundBitmap toRoundBitmap;\n\n    // private Intent pictureIntent;\n\n    @Override\n    public View onCreateView(LayoutInflater inflater, ViewGroup container,\n                             Bundle savedInstanceState) {\n        view = inflater.inflate(R.layout.set, container, false);\n        init();\n\n        return view;\n    }\n\n    @Override\n    public void onPause() {\n        super.onPause();\n        pedometerDB.updateUser(user);\n\n    }\n\n    @Override\n    public void onDestroy() {\n        super.onDestroy();\n        pedometerDB.updateUser(user);\n    }\n\n    @SuppressLint(\"SimpleDateFormat\")\n    private void init() {\n        toRoundBitmap = ToRoundBitmap.getInstance(getActivity());\n        // sexLayout = (LinearLayout) view.findViewById(R.id.sex);\n        weightLayout = (LinearLayout) view.findViewById(R.id.weight);\n        sensitivyLayout = (LinearLayout) view.findViewById(R.id.sensitivy);\n        lengthLayout = (LinearLayout) view.findViewById(R.id.lengh_step);\n        nameLayout = (LinearLayout) view.findViewById(R.id.set_name);\n\n        weightText = (TextView) view.findViewById(R.id.weight_);\n\n        sensitivyText = (TextView) view.findViewById(R.id.sensitivy_);\n        lengthText = (TextView) view.findViewById(R.id.lengh_step_);\n        nameText = (TextView) view.findViewById(R.id.name_);\n        pictureImage = (ImageView) view.findViewById(R.id.picture);\n        rButton1 = (RadioButton) view.findViewById(R.id.male);\n        rButton2 = (RadioButton) view.findViewById(R.id.female);\n\n        pedometerDB = PedometerDB.getInstance(getActivity());\n\n        weightLayout.setOnClickListener(this);\n        sensitivyLayout.setOnClickListener(this);\n        nameLayout.setOnClickListener(this);\n        lengthLayout.setOnClickListener(this);\n        rButton1.setOnClickListener(this);\n        rButton2.setOnClickListener(this);\n        pictureImage.setOnClickListener(this);\n\n        if (MainActivity.myObjectId != null) {\n            user = pedometerDB.loadUser(MainActivity.myObjectId);\n            nameText.setText(user.getName());\n            setSensitivity(user.getSensitivity());\n            weightText.setText(String.valueOf(user.getWeight()));\n\n            Bitmap picture = PictureUtil.Byte2Bitmap(user.getPicture());\n            pictureImage.setImageBitmap(toRoundBitmap.toRoundBitmap(picture));\n\n            lengthText.setText(String.valueOf(user.getStep_length()));\n\n            if (user.getSex().equals(\"男\")) {\n                rButton1.setChecked(true);\n            } else {\n                rButton2.setChecked(true);\n            }\n        } else {\n            pictureImage.setImageBitmap(toRoundBitmap\n                    .toRoundBitmap(BitmapFactory.decodeResource(getActivity()\n                            .getResources(), R.drawable.default_picture)));\n            user = new User();\n            user.setName(nameText.getText().toString());\n            user.setWeight(Integer.valueOf(weightText.getText().toString()));\n            user.setSensitivity(10);\n            user.setSex(\"男\");\n            Bitmap picture = PictureUtil.drawable2Bitmap(getActivity()\n                    .getResources().getDrawable(R.drawable.default_picture));\n            user.setPicture(PictureUtil.Bitmap2Byte(picture));\n            user.setStep_length(Integer\n                    .valueOf(lengthText.getText().toString()));\n            user.setGroupId(1);\n            group = pedometerDB.loadGroup(1);\n            group.setMember_number(1);\n            pedometerDB.updateGroup(group);\n            user.setObjectId(\"1\");\n            MainActivity.myObjectId = user.getObjectId();\n            pedometerDB.saveUser(user);\n            // 将当前日期格式化为：yyyyMMdd\n            SimpleDateFormat sdf = new SimpleDateFormat(\"yyyyMMdd\");\n            Step step = new Step();\n            // 得到当天的日期\n            step.setDate(sdf.format(new Date()));\n            step.setUserId(MainActivity.myObjectId);\n            step.setNumber(0);\n            pedometerDB.saveStep(step);\n\n        }\n\n    }\n\n    @Override\n    public void onClick(View arg0) {\n        switch (arg0.getId()) {\n            case R.id.picture:\n                Intent intent = new Intent(getActivity(),\n                        SetToTakePicActivity.class);\n                startActivityForResult(intent, REQUEST_CODE_TO_TACK_PICTURE);\n\n                pedometerDB.updateUser(user);\n                break;\n            case R.id.set_name:\n                dialog = new AlertDialog.Builder(getActivity());\n                editText = new EditText(getActivity());\n                editText.setSingleLine(true);\n                dialog.setView(editText);\n\n                dialog.setTitle(\"填写姓名\");\n                dialog.setPositiveButton(\"确认\",\n                        new DialogInterface.OnClickListener() {\n\n                            @Override\n                            public void onClick(DialogInterface arg0, int arg1) {\n                                nameText.setText(editText.getText().toString());\n                                user.setName(editText.getText().toString());\n                                pedometerDB.updateUser(user);\n                            }\n                        });\n                dialog.show();\n                break;\n\n            case R.id.weight:\n                dialog = new AlertDialog.Builder(getActivity());\n                numberPicker = new NumberPicker(getActivity());\n                numberPicker.setFocusable(true);\n                numberPicker.setFocusableInTouchMode(true);\n                numberPicker.setMaxValue(200);\n                numberPicker.setValue(Integer.parseInt(weightText.getText()\n                        .toString()));\n                numberPicker.setMinValue(30);\n                dialog.setView(numberPicker);\n                dialog.setPositiveButton(\"确定\",\n                        new DialogInterface.OnClickListener() {\n\n                            @Override\n                            public void onClick(DialogInterface arg0, int arg1) {\n                                weightText.setText(numberPicker.getValue() + \"\");\n                                user.setWeight(numberPicker.getValue());\n                            }\n                        });\n                dialog.show();\n                break;\n\n            case R.id.sensitivy:\n                dialog = new AlertDialog.Builder(getActivity());\n                numberPicker = new NumberPicker(getActivity());\n                numberPicker.setFocusable(true);\n                numberPicker.setFocusableInTouchMode(true);\n                numberPicker.setMaxValue(10);\n                numberPicker.setMinValue(1);\n                dialog.setView(numberPicker);\n                dialog.setPositiveButton(\"确定\",\n                        new DialogInterface.OnClickListener() {\n\n                            @Override\n                            public void onClick(DialogInterface arg0, int arg1) {\n                                user.setSensitivity(numberPicker.getValue());\n                                setSensitivity(numberPicker.getValue());\n\n                            }\n                        });\n                dialog.show();\n                break;\n            case R.id.lengh_step:\n                dialog = new AlertDialog.Builder(getActivity());\n                numberPicker = new NumberPicker(getActivity());\n                numberPicker.setFocusable(true);\n                numberPicker.setFocusableInTouchMode(true);\n                numberPicker.setMaxValue(100);\n                numberPicker.setValue(Integer.parseInt(lengthText.getText()\n                        .toString()));\n                numberPicker.setMinValue(15);\n                dialog.setView(numberPicker);\n                dialog.setPositiveButton(\"确定\",\n                        new DialogInterface.OnClickListener() {\n\n                            @Override\n                            public void onClick(DialogInterface arg0, int arg1) {\n                                lengthText.setText(numberPicker.getValue() + \"\");\n                                user.setStep_length(numberPicker.getValue());\n                            }\n                        });\n                dialog.show();\n                break;\n            case R.id.male:\n\n                user.setSex(\"男\");\n\n                break;\n            case R.id.female:\n                user.setSex(\"女\");\n                break;\n        }\n\n    }\n\n    private void setSensitivity(int value) {\n        switch (value) {\n            case 1:\n                sensitivyText.setText(\"一级\");\n                break;\n            case 2:\n                sensitivyText.setText(\"二级\");\n                break;\n            case 3:\n                sensitivyText.setText(\"三级\");\n                break;\n            case 4:\n                sensitivyText.setText(\"四级\");\n                break;\n            case 5:\n                sensitivyText.setText(\"五级\");\n                break;\n            case 6:\n                sensitivyText.setText(\"六级\");\n                break;\n            case 7:\n                sensitivyText.setText(\"七级\");\n                break;\n            case 8:\n                sensitivyText.setText(\"八级\");\n                break;\n            case 9:\n                sensitivyText.setText(\"九级\");\n                break;\n            case 10:\n                sensitivyText.setText(\"十级\");\n                break;\n\n            default:\n                break;\n        }\n    }\n\n    @Override\n    public void onActivityResult(int requestCode, int resultCode, Intent data) {\n        if (Activity.RESULT_OK == resultCode) {\n            switch (requestCode) {\n                case REQUEST_CODE_TO_TACK_PICTURE:\n                    Intent i = new Intent();\n                    i.setAction(MediaStore.ACTION_IMAGE_CAPTURE);\n                    // 两个参数:外部存储设备目录,存储的名字\n                    file = new File(Environment.getExternalStorageDirectory(),\n                            System.currentTimeMillis() + \".jpg\");\n                    // 往意图中放额外的数据\n                    i.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(file)); // 设置拍照的照片存储在哪个位置。\n                    String state = Environment.getExternalStorageState();\n                    if (!Environment.MEDIA_MOUNTED.equals(state)) {\n                        Toast.makeText(getActivity(),\n                                \"SD Card Error! Please check it!\",\n                                Toast.LENGTH_SHORT).show();\n                        return;\n                    }\n                    // 头像获取方式获取，并调用对应系统API\n                    String buttonType = (String) data.getExtras().get(\n                            SetToTakePicActivity.INTENT_KEY_BUTTON_TYPE);\n                    if (SetToTakePicActivity.BUTTON_TYPE_TAKE_PICTURES\n                            .equals(buttonType)) {\n                        startActivityForResult(i, REQUEST_CODE_TACK_PICTURE_ZOOM);\n                    } else if (SetToTakePicActivity.BUTTON_TYPE_FROM_ALBUM\n                            .equals(buttonType)) {\n                        Intent intent = new Intent(Intent.ACTION_PICK, null);\n                        intent.setDataAndType(\n                                MediaStore.Images.Media.EXTERNAL_CONTENT_URI,\n                                \"image/*\");\n                        startActivityForResult(intent, REQUEST_CODE_FROM_ALBUM_ZOOM);\n                    }\n                    break;\n                case REQUEST_CODE_TACK_PICTURE_ZOOM:\n                    Uri uri_tack = Uri.fromFile(file);\n                    if (uri_tack != null) {\n                        startPhotoZoom(uri_tack, REQUEST_CODE_TACK_PICTURE);\n                    }\n                    break;\n                case REQUEST_CODE_TACK_PICTURE:\n                    Bitmap photo = null;\n                    if (photo == null) {\n                        Bundle bundle = data.getExtras();\n                        if (bundle != null) {\n                            photo = (Bitmap) bundle.get(\"data\");\n                        }\n                    }\n                    if (photo != null) {\n                        pictureImage.setImageBitmap(toRoundBitmap.toRoundBitmap(photo));\n                    } else {\n                        Toast.makeText(getActivity(),\n                                \"添加头像失败，请重新操作\",\n                                Toast.LENGTH_LONG).show();\n                    }\n                    break;\n\n                case REQUEST_CODE_FROM_ALBUM_ZOOM:\n                    Uri originalUri = data.getData();\n                    if (originalUri != null) {\n                        startPhotoZoom(originalUri, REQUEST_CODE_FROM_ALBUM);\n                    }\n                    break;\n                case REQUEST_CODE_FROM_ALBUM:\n                    Bitmap image = null;\n                    Bundle bundle = data.getExtras();\n                    if (bundle != null) {\n                        image = (Bitmap) bundle.get(\"data\");\n                    }\n                    if (image != null) {\n                        pictureImage.setImageBitmap(toRoundBitmap.toRoundBitmap(image));\n                    } else {\n                        Toast.makeText(getActivity(),\n                                \"添加头像失败，请重新操作\",\n                                Toast.LENGTH_LONG).show();\n                    }\n                    break;\n                default:\n                    break;\n            }\n        }\n    }\n\n    /**\n     * 裁剪图片方法实现\n     *\n     * @param uri\n     */\n    public void startPhotoZoom(Uri uri, int witch) {\n        Intent intent = new Intent(\"com.android.camera.action.CROP\");\n        intent.setDataAndType(uri, \"image/*\");\n        // 下面这个crop=true是设置在开启的Intent中设置显示的VIEW可裁剪\n        intent.putExtra(\"crop\", \"true\");\n        // aspectX aspectY 是宽高的比例\n        intent.putExtra(\"aspectX\", 1);\n        intent.putExtra(\"aspectY\", 1);\n        // outputX outputY 是裁剪图片宽高\n        intent.putExtra(\"outputX\", 300);\n        intent.putExtra(\"outputY\", 300);\n        // 系统的裁剪图片默认对图片进行人脸识别，当识别到有人脸时，\n        // 会按aspectX和aspectY为1来处理，如果想设置成自定义的裁剪比例，\n        // 需要设置noFaceDetection为true。\n        intent.putExtra(\"noFaceDetection\", true);\n        intent.putExtra(\"return-data\", true);\n        startActivityForResult(intent, witch);\n    }\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/fragment/PK/FragmentPK_1.java",
    "content": "package com.bit.pedometer.ui.fragment.PK;\n\nimport java.util.List;\n\nimport com.bit.pedometer.ui.activity.MainActivity;\nimport com.bit.pedometer.R;\nimport com.bit.pedometer.data.db.PedometerDB;\nimport com.bit.pedometer.ui.fragment.tools.MyListAdapter;\nimport com.bit.pedometer.ui.fragment.tools.PictureUtil;\nimport com.bit.pedometer.ui.fragment.tools.ReFlashListView;\nimport com.bit.pedometer.ui.fragment.tools.ToRoundBitmap;\nimport com.bit.pedometer.ui.fragment.tools.ReFlashListView.IReflashListener;\nimport com.bit.pedometer.data.bean.Group;\nimport com.bit.pedometer.data.bean.User;\n\nimport android.support.v4.app.Fragment;\nimport android.annotation.SuppressLint;\nimport android.app.AlertDialog;\nimport android.content.DialogInterface;\nimport android.graphics.Bitmap;\nimport android.os.Bundle;\nimport android.os.Handler;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.AdapterView;\nimport android.widget.ImageView;\nimport android.widget.TextView;\nimport android.widget.AdapterView.OnItemClickListener;\n\npublic class FragmentPK_1 extends Fragment implements OnItemClickListener,\n\t\tIReflashListener {\n\n\tprivate View view;\n\tprivate ReFlashListView listView;\n\tprivate MyListAdapter mAdapter;\n\tprivate PedometerDB pedometerDB;\n\tprivate List<User> users;\n\tprivate ToRoundBitmap toRoundBitmap;\n\n\t@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.pk_1, container, false);\n\t\tinit();\n\t\tshowList();\n\t\treturn view;\n\t}\n\n\t@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t\tusers = pedometerDB.lodListUsers();\n\t\tshowList();\n\t}\n\n\t@SuppressLint(\"SimpleDateFormat\")\n\tprivate void init() {\n\t\ttoRoundBitmap = ToRoundBitmap.getInstance(getActivity());\n\t\tlistView = (ReFlashListView) view.findViewById(R.id.pk_1_listview);\n\t\tpedometerDB = PedometerDB.getInstance(getActivity());\n\t\tusers = pedometerDB.lodListUsers();\n\t\t// Toast.makeText(getActivity(), users.get(0).getSex() + \"\",\n\t\t// Toast.LENGTH_LONG).show();\n\t\t// listView.setOnScrollListener(this);\n\t}\n\n\tprivate void showList() {\n\t\tif (mAdapter == null) {\n\t\t\tmAdapter = new MyListAdapter(getActivity(), users, listView);\n\t\t\tlistView.setAdapter(mAdapter);\n\t\t} else {\n\t\t\tmAdapter.changeData(users);\n\t\t}\n\t\tlistView.setInterface(this);\n\t\tlistView.setOnItemClickListener(this);\n\t}\n\n\t@SuppressLint(\"InflateParams\")\n\tpublic void onItemClick(AdapterView<?> arg0, View convrtView, int position,\n\t\t\tlong arg3) {\n\n\t\tfinal int pos = position - 1;\n\t\tfinal AlertDialog.Builder dialog = new AlertDialog.Builder(\n\t\t\t\tgetActivity());\n\t\tLayoutInflater inflater = LayoutInflater.from(getActivity());\n\t\tView view = inflater.inflate(R.layout.userinfo, null);\n\t\tTextView name = (TextView) view.findViewById(R.id.user_name);\n\t\tTextView steps = (TextView) view.findViewById(R.id.user_steps);\n\t\tTextView number = (TextView) view.findViewById(R.id.user_number);\n\t\tTextView sex = (TextView) view.findViewById(R.id.user_sex);\n\t\tImageView picture = (ImageView) view.findViewById(R.id.user_picture);\n\n\t\tsex.setText(users.get(pos).getSex());\n\t\tBitmap bitmap = toRoundBitmap.toRoundBitmap(PictureUtil\n\t\t\t\t.Byte2Bitmap(users.get(pos).getPicture()));\n\t\tpicture.setImageBitmap(bitmap);\n\n\t\tsteps.setText(users.get(pos).getToday_step() + \"\");\n\t\tnumber.setText((position) + \"\");\n\n\t\tdialog.setView(view);\n\t\tif (users.get(pos).getObjectId().equals(MainActivity.myObjectId)) {\n\t\t\tdialog.setPositiveButton(\"确认\", null);\n\t\t\tname.setText(users.get(pos).getName() + \"(自己)\");\n\t\t} else {\n\t\t\tname.setText(users.get(pos).getName());\n\t\t\tdialog.setNegativeButton(\"删除\",\n\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t\t\t\t\tpedometerDB.deleteUser(users.get(pos));\n\t\t\t\t\t\t\tGroup group = pedometerDB.loadGroup(users.get(pos)\n\t\t\t\t\t\t\t\t\t.getGroupId());\n\t\t\t\t\t\t\tgroup.setMember_number(group.getMember_number() - 1);\n\t\t\t\t\t\t\tgroup.setTotal_number(group.getTotal_number()\n\t\t\t\t\t\t\t\t\t- users.get(pos).getToday_step());\n\t\t\t\t\t\t\tpedometerDB.updateGroup(group);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\tdialog.setPositiveButton(\"确认\", null);\n\t\t}\n\t\tdialog.setCancelable(false);\n\t\tdialog.show();\n\t}\n\n\t@Override\n\tpublic void onReflash() {\n\t\tHandler handler = new Handler();\n\t\thandler.postDelayed(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t// 获取最新数据\n\t\t\t\tusers = pedometerDB.lodListUsers();\n\t\t\t\t// 通知界面显示\n\t\t\t\tshowList();\n\t\t\t\t// 通知listview 刷新数据完毕；\n\t\t\t\tlistView.reflashComplete();\n\t\t\t}\n\t\t}, 2000);\n\t}\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/fragment/PK/FragmentPK_2.java",
    "content": "package com.bit.pedometer.ui.fragment.PK;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\n\nimport android.support.v4.app.Fragment;\nimport android.content.Intent;\nimport android.os.Bundle;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.ExpandableListView;\nimport android.widget.ExpandableListView.OnChildClickListener;\n\nimport com.bit.pedometer.R;\nimport com.bit.pedometer.data.db.PedometerDB;\nimport com.bit.pedometer.ui.fragment.tools.ExpandableListViewAdapter;\nimport com.bit.pedometer.data.bean.Group;\nimport com.bit.pedometer.data.bean.User;\n\npublic class FragmentPK_2 extends Fragment implements OnChildClickListener {\n\n\tprivate View view;\n\tprivate ExpandableListView listView;\n\tprivate ExpandableListViewAdapter eAdapter;\n\tprivate List<Group> list;\n\tprivate HashMap<Group, List<User>> userMap;\n\tprivate List<User> userList;\n\tprivate PedometerDB pedometerDB;\n\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.pk_2, container, false);\n\t\tinit();\n\t\tprepareData();\n\t\tshowData();\n\t\treturn view;\n\t}\n\n\t@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t\tprepareData();\n\t\tshowData();\n\t}\n\t@Override\n\tpublic void onPause() {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onPause();\n\t}\n\n\tprivate void showData() {\n\t\tif (eAdapter == null) {\n\t\t\teAdapter = new ExpandableListViewAdapter(getActivity(), list,\n\t\t\t\t\tuserMap, listView);\n\t\t\tlistView.setAdapter(eAdapter);\n\t\t} else {\n\t\t\teAdapter.changeExpandableList(list, userMap);\n\t\t}\n\t}\n\n\tprivate void init() {\n\t\tlistView = (ExpandableListView) view.findViewById(R.id.pk_2_listview);\n\t\tuserMap = new HashMap<Group, List<User>>();\n\t\tpedometerDB = PedometerDB.getInstance(getActivity());\n\t\tlist = new ArrayList<Group>();\n\t\tuserList = new ArrayList<User>();\n\t\tlistView.setOnChildClickListener(this);\n\t}\n\n\tprivate void prepareData() {\n\t\tlist = pedometerDB.loadListGroup();\n\t\tuserList = pedometerDB.lodListUsers();\n\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\tList<User> mUser = new ArrayList<User>();\n\t\t\tfor (int j = 0; j < userList.size(); j++) {\n\t\t\t\tif (userList.get(j).getGroupId() == list.get(i).getID()) {\n\t\t\t\t\tmUser.add(userList.get(j));\n\t\t\t\t\tuserMap.put(list.get(i), mUser);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}\n\n\t@Override\n\tpublic boolean onChildClick(ExpandableListView parent, View v,\n\t\t\tint groupPosition, int childPosition, long id) {\n\t\tUser user = userMap.get(list.get(groupPosition)).get(childPosition);\n\t\tIntent intent = new Intent(getActivity(), FragmentPK_memberset.class);\n\t\t// Toast.makeText(getActivity(), user.getName(),\n\t\t// Toast.LENGTH_SHORT).show();\n\t\tintent.putExtra(\"user_data\", user);\n\t\tstartActivity(intent);\n\t\tgetActivity().overridePendingTransition(R.anim.slide_bottom_in,\n\t\t\t\tR.anim.slide_top_out);\n\t\treturn false;\n\t}\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/fragment/PK/FragmentPK_addmember.java",
    "content": "package com.bit.pedometer.ui.fragment.PK;\n\nimport java.util.List;\n\nimport cn.bmob.v3.Bmob;\n\nimport com.bit.pedometer.ui.activity.MainActivity;\nimport com.bit.pedometer.R;\nimport com.bit.pedometer.data.db.PedometerDB;\nimport com.bit.pedometer.ui.fragment.tools.MyAdapter;\nimport com.bit.pedometer.ui.fragment.tools.ReFlashListView;\nimport com.bit.pedometer.ui.fragment.tools.ReFlashListView.IReflashListener;\nimport com.bit.pedometer.data.bean.Step;\nimport com.bit.pedometer.data.bean.User;\nimport com.bit.pedometer.common.utils.BmobUtil;\nimport com.bit.pedometer.common.utils.BmobUtil.BmobQueryListener;\nimport com.bit.pedometer.common.utils.BmobUtil.BmobSaveAndUpdataListener;\n\nimport android.app.ProgressDialog;\nimport android.os.Bundle;\nimport android.support.v4.app.FragmentActivity;\nimport android.view.View;\nimport android.view.View.OnClickListener;\nimport android.view.Window;\nimport android.widget.ImageView;\nimport android.widget.Toast;\n\npublic class FragmentPK_addmember extends FragmentActivity implements\n\t\tOnClickListener, IReflashListener {\n\tprivate ImageView back;\n\tprivate ReFlashListView memberList;\n\tprivate MyAdapter myAdapter;\n\tprivate User user;\n\tprivate List<Step> steps;\n\tprivate PedometerDB pedometerdb;\n\tprivate ProgressDialog progressDialog;\n\tprivate boolean flag = false;\n\n\t@Override\n\tprotected void onCreate(Bundle arg0) {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onCreate(arg0);\n\t\tthis.requestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tsetContentView(R.layout.member_add);\n\t\tinit();\n\t\tqueryAll();\n\t}\n\n\tprivate void init() {\n\t\tBmob.initialize(this, \"c153449e638703134b8fe75c52210bc7\");\n\t\tback = (ImageView) findViewById(R.id.member_add_back);\n\t\tmemberList = (ReFlashListView) findViewById(R.id.member_add_list);\n\t\tpedometerdb = PedometerDB.getInstance(this);\n\t\tuser = pedometerdb.loadFirstUser();\n\t\tsteps = pedometerdb.loadListSteps();\n\t\tshowProgressDialog();\n\n\t\tBmobUtil.saveBmob(user, new BmobSaveAndUpdataListener() {\n\t\t\t@Override\n\t\t\tpublic void onFinishedupdata(User user) {\n\t\t\t\tToast.makeText(FragmentPK_addmember.this, \"向服务器更新自己信息\",\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onFinishedSave(User user) {\n\n\t\t\t\tToast.makeText(FragmentPK_addmember.this, \"成功连接服务器\",\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\tpedometerdb.changeObjectId(user);\n\t\t\t\tMainActivity.myObjectId = user.getObjectId();\n\t\t\t\tfor (int i = 0; i < steps.size(); i++) {\n\t\t\t\t\tStep step = steps.get(i);\n\t\t\t\t\tstep.setUserId(user.getObjectId());\n\t\t\t\t\tpedometerdb.changeuserId(step);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onFailure(String str) {\n\t\t\t\tToast.makeText(FragmentPK_addmember.this, str,\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\n\t\t\t}\n\t\t}, this);\n\t\tback.setOnClickListener(this);\n\t\tmemberList.setInterface(this);\n\n\t}\n\n\tprivate void queryAll() {\n\t\tBmobUtil.queryBmob(new BmobQueryListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onQuerySuccess(List<User> users) {\n\t\t\t\t// Toast.makeText(FragmentPK_addmember.this,\n\t\t\t\t// user_list.get(0).getName() + \"\", Toast.LENGTH_SHORT)\n\t\t\t\t// .show();\n\t\t\t\tmyAdapter = new MyAdapter(FragmentPK_addmember.this, users,\n\t\t\t\t\t\tmemberList);\n\t\t\t\tmemberList.setAdapter(myAdapter);\n\t\t\t\tcloseProgressDialog();\n\t\t\t\tif (flag) {\n\t\t\t\t\tmemberList.reflashComplete();\n\t\t\t\t\tflag = false;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onFailure(String str) {\n\t\t\t\tToast.makeText(FragmentPK_addmember.this, \"连接不上服务器\",\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\tcloseProgressDialog();\n\t\t\t\tFragmentPK_addmember.this.finish();\n\n\t\t\t}\n\t\t}, this);\n\n\t}\n\n\t/**\n\t * 显示进度对话框\n\t */\n\tprivate void showProgressDialog() {\n\t\tif (progressDialog == null) {\n\t\t\tprogressDialog = new ProgressDialog(this);\n\t\t\tprogressDialog.setMessage(\"正在加载...\");\n\t\t\tprogressDialog.setCanceledOnTouchOutside(false);\n\t\t}\n\t\tprogressDialog.show();\n\t}\n\n\t/**\n\t * 关闭进度对话框\n\t */\n\tprivate void closeProgressDialog() {\n\t\tif (progressDialog != null) {\n\t\t\tprogressDialog.dismiss();\n\t\t}\n\t}\n\n\t@Override\n\tpublic void onClick(View arg0) {\n\t\tswitch (arg0.getId()) {\n\t\tcase R.id.member_add_back:\n\t\t\tthis.finish();\n\t\t\tbreak;\n\t\tcase R.id.member_add_list_button:\n\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t@Override\n\tpublic void onReflash() {\n\n\t\tqueryAll();\n\t\tflag = true;\n\n\t}\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/fragment/PK/FragmentPK_memberset.java",
    "content": "package com.bit.pedometer.ui.fragment.PK;\n\nimport com.bit.pedometer.R;\nimport com.bit.pedometer.data.db.PedometerDB;\nimport com.bit.pedometer.ui.fragment.tools.MyNumberPicker;\nimport com.bit.pedometer.ui.fragment.tools.PictureUtil;\nimport com.bit.pedometer.ui.fragment.tools.ToRoundBitmap;\nimport com.bit.pedometer.data.bean.Group;\nimport com.bit.pedometer.data.bean.User;\n\nimport android.graphics.Bitmap;\nimport android.os.Bundle;\nimport android.support.v4.app.FragmentActivity;\nimport android.view.View;\nimport android.view.View.OnClickListener;\nimport android.view.Window;\nimport android.widget.Button;\nimport android.widget.ImageView;\nimport android.widget.TextView;\n\npublic class FragmentPK_memberset extends FragmentActivity implements\n\t\tOnClickListener {\n\n\tprivate User user;\n\tprivate ImageView picture;\n\tprivate TextView name;\n\tprivate ImageView sexImage;\n\tprivate TextView weight;\n\tprivate TextView steps;\n\tprivate MyNumberPicker nPicker;\n\tprivate Button btn1;//OK按钮，确定\n\tprivate Button btn2;//NO按钮，取消当前操作\n\tprivate Group group;\n\tprivate PedometerDB pedometerDB;\n\tprivate int groNum;\n\tprivate ToRoundBitmap toRoundBitmap;\n\n\t@Override\n\tprotected void onCreate(Bundle bundle) {\n\t\tsuper.onCreate(bundle);\n\t\tthis.requestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tsetContentView(R.layout.membet_set);\n\t\tinit();\n\n\t}\n\n\tprivate void init() {\n\t\ttoRoundBitmap = ToRoundBitmap.getInstance(this);\n\t\tpicture = (ImageView) findViewById(R.id.member_picture);\n\t\tname = (TextView) findViewById(R.id.member_name);\n\t\tsexImage = (ImageView) findViewById(R.id.member_sexpic);\n\t\tweight = (TextView) findViewById(R.id.member_weight);\n\t\tsteps = (TextView) findViewById(R.id.member_steps);\n\t\tnPicker = (MyNumberPicker) findViewById(R.id.member_numberPicker);\n\t\tbtn1 = (Button) findViewById(R.id.member_button1);\n\t\tbtn2 = (Button) findViewById(R.id.member_button2);\n\n\t\tuser = (User) getIntent().getSerializableExtra(\"user_data\");\n\t\tBitmap bitmap = toRoundBitmap.toRoundBitmap(PictureUtil\n\t\t\t\t.Byte2Bitmap(user.getPicture()));\n\t\tpicture.setImageBitmap(bitmap);\n//\t\tif (user.getPicture() != null) {\n//\t\t\t\n//\t\t\ttry {\n//\t\t\t\tbitmap = ToRoundBitmap\n//\t\t\t\t\t\t.toRoundBitmap(BitmapFactory.decodeStream(this\n//\t\t\t\t\t\t\t\t.getContentResolver().openInputStream(\n//\t\t\t\t\t\t\t\t\t\tUri.parse(user.getPicture()))));\n//\t\t\t\tpicture.setImageBitmap(bitmap);\n//\t\t\t} catch (FileNotFoundException e) {\n//\t\t\t\t// TODO Auto-generated catch block\n//\t\t\t\te.printStackTrace();\n//\t\t\t}\n//\t\t} else {\n//\t\t\tResources default_picture = this.getResources();\n//\t\t\tbitmap = ToRoundBitmap.toRoundBitmap(BitmapFactory.decodeResource(\n//\t\t\t\t\tdefault_picture, R.drawable.default_picture));\n//\t\t\tpicture.setImageBitmap(bitmap);\n//\t\t}\n\t\tname.setText(user.getName());\n\t\tif (user.getSex().equals(\"男\")) {\n\t\t\tsexImage.setImageResource(R.drawable.male_set);\n\t\t} else {\n\t\t\tsexImage.setImageResource(R.drawable.female_set);\n\t\t}\n\t\tweight.setText(user.getWeight() + \"\");\n\t\tsteps.setText(user.getToday_step() + \"\");\n\n\t\tnPicker.setFocusable(true);\n\t\tnPicker.setFocusableInTouchMode(true);\n\t\tnPicker.setMaxValue(3);\n\t\tnPicker.setValue(user.getGroupId());\n\t\tnPicker.setMinValue(1);\n\n\t\tbtn1.setOnClickListener(this);\n\t\tbtn2.setOnClickListener(this);\n\n\t}\n\n\t@Override\n\tpublic void onClick(View arg0) {\n\t\tswitch (arg0.getId()) {\n\t\tcase R.id.member_button1:\n\t\t\tpedometerDB = PedometerDB.getInstance(this);//实例化数据库操作类\n\t\t\tgroup = pedometerDB.loadGroup(user.getGroupId());//取出当前成员所在的组，方便随后的修改\n\t\t\tgroNum = nPicker.getValue();//选择移动的组数\n\t\t\t//如果移动组数则执行下列的语句\n\t\t\tif (groNum != user.getGroupId()) {\n\t\t\t\t\n\t\t\t\tgroup.setMember_number(group.getMember_number() - 1);\n\t\t\t\tgroup.setTotal_number(group.getTotal_number()\n\t\t\t\t\t\t- user.getToday_step());\n\t\t\t\tpedometerDB.updateGroup(group);\n\t\t\t\t\n\t\t\t\tGroup group1 = pedometerDB.loadGroup(groNum);\n\t\t\t\tgroup1.setMember_number(group1.getMember_number() + 1);\n\t\t\t\tgroup1.setTotal_number(group1.getTotal_number()\n\t\t\t\t\t\t+ user.getToday_step());\n\t\t\t\tpedometerDB.updateGroup(group1);\n\t\t\t\t\n\t\t\t\tuser.setGroupId(groNum);\n\t\t\t\tpedometerDB.updateUser(user);\n\t\t\t}\n\t\t\tthis.finish();\n\n\t\t\tbreak;\n\t\tcase R.id.member_button2:\n\n\t\t\tthis.finish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\n\t}\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/fragment/onekeyshare/CustomerLogo.java",
    "content": "/*\n * Offical Website:http://www.ShareSDK.cn\n * Support QQ: 4006852216\n * Offical Wechat Account:ShareSDK   (We will inform you our updated news at the first time by Wechat, if we release a new version. If you get any problem, you can also contact us with Wechat, we will reply you within 24 hours.)\n *\n * Copyright (c) 2013 ShareSDK.cn. All rights reserved.\n */\n\npackage com.bit.pedometer.ui.fragment.onekeyshare;\n\nimport android.graphics.Bitmap;\nimport android.view.View.OnClickListener;\n\n/** 九宫格自定义的图标对象 */\npublic class CustomerLogo {\n\tpublic String label;\n\tpublic Bitmap logo;\n\tpublic OnClickListener listener;\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/fragment/onekeyshare/EditPage.java",
    "content": "/*\n * Offical Website:http://www.ShareSDK.cn\n * Support QQ: 4006852216\n * Offical Wechat Account:ShareSDK   (We will inform you our updated news at the first time by Wechat, if we release a new version. If you get any problem, you can also contact us with Wechat, we will reply you within 24 hours.)\n *\n * Copyright (c) 2013 ShareSDK.cn. All rights reserved.\n */\n\npackage com.bit.pedometer.ui.fragment.onekeyshare;\n\nimport static cn.sharesdk.framework.utils.R.*;\nimport java.io.File;\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport android.app.Activity;\nimport android.content.Context;\nimport android.graphics.Bitmap;\nimport android.graphics.BitmapFactory;\nimport android.graphics.Typeface;\nimport android.os.Message;\nimport android.os.Handler.Callback;\nimport android.text.Editable;\nimport android.text.TextUtils;\nimport android.text.TextWatcher;\nimport android.util.TypedValue;\nimport android.view.Gravity;\nimport android.view.View;\nimport android.view.View.OnClickListener;\nimport android.view.Window;\nimport android.view.WindowManager;\nimport android.view.inputmethod.InputMethodManager;\nimport android.widget.Button;\nimport android.widget.EditText;\nimport android.widget.FrameLayout;\nimport android.widget.HorizontalScrollView;\nimport android.widget.ImageView;\nimport android.widget.LinearLayout;\nimport android.widget.TextView;\nimport android.widget.ImageView.ScaleType;\nimport android.widget.LinearLayout.LayoutParams;\nimport android.widget.Toast;\nimport cn.sharesdk.framework.FakeActivity;\nimport cn.sharesdk.framework.Platform;\nimport cn.sharesdk.framework.ShareSDK;\nimport cn.sharesdk.framework.TitleLayout;\nimport cn.sharesdk.framework.utils.UIHandler;\n\n/**\n * Photo-text Sharing will be handling in this page\n * <p>\n * note:\n * wechat, yixin, qzone, etc. are shared in their clients, not in this page\n */\npublic class EditPage extends FakeActivity implements OnClickListener, TextWatcher, Callback {\n\tprivate static final int MAX_TEXT_COUNT = 140;\n\tprivate static final int MSG_PLATFORM_LIST_GOT = 1;\n\tprivate HashMap<String, Object> reqData;\n\tprivate OnekeyShare parent;\n\tprivate LinearLayout llPage;\n\tprivate TitleLayout llTitle;\n\t// share content editor\n\tprivate EditText etContent;\n\t// Words counter\n\tprivate TextView tvCounter;\n\t// the pin\n\tprivate ImageView ivPin;\n\t// shared image container\n\tprivate ImageView ivImage;\n\tprivate Bitmap image;\n\tprivate boolean shareImage;\n\tprivate LinearLayout llPlat;\n\tprivate LinearLayout llAt;\n\t// platform list\n\tprivate Platform[] platformList;\n\tprivate View[] views;\n\t// set to display as a dialog\n\tprivate boolean dialogMode;\n\n\tpublic void setShareData(HashMap<String, Object> data) {\n\t\treqData = data;\n\t}\n\n\tpublic void setParent(OnekeyShare parent) {\n\t\tthis.parent = parent;\n\t}\n\n\t/** set to display as a dialog */\n\tpublic void setDialogMode() {\n\t\tdialogMode = true;\n\t}\n\n\tpublic void setActivity(Activity activity) {\n\t\tsuper.setActivity(activity);\n\t\tif (dialogMode) {\n\t\t\tactivity.setTheme(android.R.style.Theme_Dialog);\n\t\t\tactivity.requestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\t}\n\t\tactivity.getWindow().setSoftInputMode(\n\t\t\t       WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n\t}\n\n\tpublic void onCreate() {\n\t\tif (reqData == null) {\n\t\t\tfinish();\n\t\t\treturn;\n\t\t}\n\n\t\tinitPageView();\n\t\tactivity.setContentView(llPage);\n\t\tonTextChanged(etContent.getText(), 0, etContent.length(), 0);\n\n\t\t// requests platform list and remove platforms share in their clients\n\t\tnew Thread(){\n\t\t\tpublic void run() {\n\t\t\t\tplatformList = ShareSDK.getPlatformList(activity);\n\t\t\t\tif (platformList == null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tArrayList<Platform> list = new ArrayList<Platform>();\n\t\t\t\tfor (Platform plat : platformList) {\n\t\t\t\t\tString name = plat.getName();\n\t\t\t\t\tif (ShareCore.isUseClientToShare(activity, name)) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tlist.add(plat);\n\t\t\t\t}\n\t\t\t\tplatformList = new Platform[list.size()];\n\t\t\t\tfor (int i = 0; i < platformList.length; i++) {\n\t\t\t\t\tplatformList[i] = list.get(i);\n\t\t\t\t}\n\n\t\t\t\tUIHandler.sendEmptyMessage(MSG_PLATFORM_LIST_GOT, EditPage.this);\n\t\t\t}\n\t\t}.start();\n\t}\n\n\tprivate void initPageView() {\n\t\tllPage = new LinearLayout(getContext());\n\t\tllPage.setBackgroundColor(0xff323232);\n\t\tllPage.setOrientation(LinearLayout.VERTICAL);\n\n\t\t// title bar\n\t\tllTitle = new TitleLayout(getContext());\n\t\tint resId = getBitmapRes(activity, \"title_back\");\n\t\tif (resId > 0) {\n\t\t\tllTitle.setBackgroundResource(resId);\n\t\t}\n\t\tllTitle.getBtnBack().setOnClickListener(this);\n\t\tresId = getStringRes(activity, \"multi_share\");\n\t\tif (resId > 0) {\n\t\t\tllTitle.getTvTitle().setText(resId);\n\t\t}\n\t\tllTitle.getBtnRight().setVisibility(View.VISIBLE);\n\t\tresId = getStringRes(activity, \"share\");\n\t\tif (resId > 0) {\n\t\t\tllTitle.getBtnRight().setText(resId);\n\t\t}\n\t\tllTitle.getBtnRight().setOnClickListener(this);\n\t\tllTitle.setLayoutParams(new LinearLayout.LayoutParams(\n\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));\n\t\tllPage.addView(llTitle);\n\n\t\tFrameLayout flPage = new FrameLayout(getContext());\n\t\tLinearLayout.LayoutParams lpFl = new LinearLayout.LayoutParams(\n\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);\n\t\tlpFl.weight = 1;\n\t\tflPage.setLayoutParams(lpFl);\n\t\tllPage.addView(flPage);\n\n\t\t// page body\n\t\tLinearLayout llBody = new LinearLayout(getContext());\n\t\tllBody.setOrientation(LinearLayout.VERTICAL);\n\t\tFrameLayout.LayoutParams lpLl = new FrameLayout.LayoutParams(\n\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);\n\t\tlpLl.gravity = Gravity.LEFT | Gravity.TOP;\n\t\tllBody.setLayoutParams(lpLl);\n\t\tflPage.addView(llBody);\n\n\t\t// the pin\n\t\tivPin = new ImageView(getContext());\n\t\tresId = getBitmapRes(activity, \"pin\");\n\t\tif (resId > 0) {\n\t\t\tivPin.setImageResource(resId);\n\t\t}\n\t\tint dp_80 = cn.sharesdk.framework.utils.R.dipToPx(getContext(), 80);\n\t\tint dp_36 = cn.sharesdk.framework.utils.R.dipToPx(getContext(), 36);\n\t\tFrameLayout.LayoutParams lpPin = new FrameLayout.LayoutParams(dp_80, dp_36);\n\t\tlpPin.topMargin = cn.sharesdk.framework.utils.R.dipToPx(getContext(), 6);\n\t\tlpPin.gravity = Gravity.RIGHT | Gravity.TOP;\n\t\tivPin.setLayoutParams(lpPin);\n\t\tflPage.addView(ivPin);\n\n\t\tImageView ivShadow = new ImageView(getContext());\n\t\tresId = getBitmapRes(activity, \"title_shadow\");\n\t\tif (resId > 0) {\n\t\t\tivShadow.setBackgroundResource(resId);\n\t\t}\n\t\tFrameLayout.LayoutParams lpSd = new FrameLayout.LayoutParams(\n\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);\n\t\tivShadow.setLayoutParams(lpSd);\n\t\tflPage.addView(ivShadow);\n\n\t\tLinearLayout llInput = new LinearLayout(getContext());\n\t\tllInput.setMinimumHeight(cn.sharesdk.framework.utils.R.dipToPx(getContext(), 150));\n\t\tresId = getBitmapRes(activity, \"edittext_back\");\n\t\tif (resId > 0) {\n\t\t\tllInput.setBackgroundResource(resId);\n\t\t}\n\t\tLinearLayout.LayoutParams lpInput = new LinearLayout.LayoutParams(\n\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);\n\t\tint dp_3 = cn.sharesdk.framework.utils.R.dipToPx(getContext(), 3);\n\t\tlpInput.setMargins(dp_3, dp_3, dp_3, dp_3);\n\t\tlpInput.weight = 1;\n\t\tllInput.setLayoutParams(lpInput);\n\t\tllBody.addView(llInput);\n\n\t\t// platform logos\n\t\tLinearLayout llToolBar = new LinearLayout(getContext());\n\t\tresId = getBitmapRes(activity, \"share_tb_back\");\n\t\tif (resId > 0) {\n\t\t\tllToolBar.setBackgroundResource(resId);\n\t\t}\n\t\tLinearLayout.LayoutParams lpTb = new LinearLayout.LayoutParams(\n\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);\n\t\tint dp_4 = cn.sharesdk.framework.utils.R.dipToPx(getContext(), 4);\n\t\tlpTb.setMargins(dp_4, 0, dp_4, dp_4);\n\t\tllToolBar.setLayoutParams(lpTb);\n\t\tllBody.addView(llToolBar);\n\n\t\tLinearLayout llContent = new LinearLayout(getContext());\n\t\tllContent.setOrientation(LinearLayout.VERTICAL);\n\t\tLinearLayout.LayoutParams lpEt = new LinearLayout.LayoutParams(\n\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);\n\t\tlpEt.weight = 1;\n\t\tllContent.setLayoutParams(lpEt);\n\t\tllInput.addView(llContent);\n\n\t\t// share content editor\n\t\tetContent = new EditText(getContext());\n\t\tetContent.setGravity(Gravity.LEFT | Gravity.TOP);\n\t\tetContent.setText(String.valueOf(reqData.get(\"text\")));\n\t\tetContent.addTextChangedListener(this);\n\t\tetContent.setLayoutParams(lpEt);\n\t\tllContent.addView(etContent);\n\n\t\tString platform = String.valueOf(reqData.get(\"platform\"));\n\t\tcheckAtMth(llContent, platform);\n\n\t\tint dp_74 = cn.sharesdk.framework.utils.R.dipToPx(getContext(), 74);\n\t\tint dp_16 = cn.sharesdk.framework.utils.R.dipToPx(getContext(), 16);\n\t\tString imagePath = String.valueOf(reqData.get(\"imagePath\"));\n\t\tif(!TextUtils.isEmpty(imagePath) && new File(imagePath).exists()){\n\t\t\tLinearLayout llRight = new LinearLayout(getContext());\n\t\t\tllRight.setOrientation(LinearLayout.VERTICAL);\n\t\t\tllRight.setLayoutParams(new LinearLayout.LayoutParams(\n\t\t\t\t\tLayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT));\n\t\t\tllInput.addView(llRight);\n\n\t\t\t// shared image container\n\t\t\tivImage = new ImageView(getContext());\n\t\t\tresId = getBitmapRes(activity, \"btn_back_nor\");\n\t\t\tif (resId > 0) {\n\t\t\t\tivImage.setBackgroundResource(resId);\n\t\t\t}\n\t\t\tivImage.setScaleType(ScaleType.CENTER_INSIDE);\n\t\t\tivImage.setVisibility(View.GONE);\n\t\t\tivImage.setVisibility(View.VISIBLE);\n\t\t\ttry {\n\t\t\t\tshareImage = true;\n\t\t\t\timage = cn.sharesdk.framework.utils.R.getBitmap(imagePath);\n\t\t\t\tivImage.setImageBitmap(image);\n\t\t\t} catch(Throwable t) {\n\t\t\t\tSystem.gc();\n\t\t\t\ttry {\n\t\t\t\t\timage = cn.sharesdk.framework.utils.R.getBitmap(imagePath, 2);\n\t\t\t\t\tivImage.setImageBitmap(image);\n\t\t\t\t} catch(Throwable t1) {\n\t\t\t\t\tt1.printStackTrace();\n\t\t\t\t\tshareImage = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tivImage.setPadding(dp_4, dp_4, dp_4, dp_4);\n\t\t\tLinearLayout.LayoutParams lpImage = new LinearLayout.LayoutParams(dp_74, dp_74);\n\t\t\tint dp_8 = cn.sharesdk.framework.utils.R.dipToPx(getContext(), 8);\n\t\t\tlpImage.setMargins(0, dp_16, dp_8, 0);\n\t\t\tivImage.setLayoutParams(lpImage);\n\t\t\tllRight.addView(ivImage);\n\t\t\tif(!shareImage){\n\t\t\t\tivPin.setVisibility(View.GONE);\n\t\t\t\tivImage.setVisibility(View.GONE);\n\t\t\t}\n\t\t\tivImage.setOnClickListener(this);\n\t\t}else {\n\t\t\tshareImage = false;\n\t\t\tivPin.setVisibility(View.GONE);\n\t\t}\n\n\t\t// shared image container\n\t\tif(shareImage){\n\t\t\tButton btn = new Button(getContext());\n\t\t\tbtn.setTag(\"img_cancel\");\n\t\t\tbtn.setOnClickListener(this);\n\t\t\tresId = getBitmapRes(activity, \"img_cancel\");\n\t\t\tif (resId > 0) {\n\t\t\t\tbtn.setBackgroundResource(resId);\n\t\t\t}\n\t\t\tint dp_20 = cn.sharesdk.framework.utils.R.dipToPx(getContext(), 20);\n\t\t\tint dp_83 = cn.sharesdk.framework.utils.R.dipToPx(getContext(), 83);\n\t\t\tint dp_13 = cn.sharesdk.framework.utils.R.dipToPx(getContext(), 13);\n\t\t\tFrameLayout.LayoutParams lpBtn = new FrameLayout.LayoutParams(dp_20, dp_20);\n\t\t\tlpBtn.topMargin = dp_83;\n\t\t\tlpBtn.rightMargin = dp_13;\n\t\t\tlpBtn.gravity = Gravity.RIGHT | Gravity.TOP;\n\t\t\tbtn.setPadding(dp_4, dp_4, dp_4, dp_4);\n\t\t\tbtn.setLayoutParams(lpBtn);\n\t\t\tflPage.addView(btn);\n\t\t}\n\n\t\t// Words counter\n\t\ttvCounter = new TextView(getContext());\n\t\ttvCounter.setText(String.valueOf(MAX_TEXT_COUNT));\n\t\ttvCounter.setTextColor(0xffcfcfcf);\n\t\ttvCounter.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 15);\n\t\ttvCounter.setTypeface(Typeface.DEFAULT_BOLD);\n\t\tFrameLayout.LayoutParams lpCounter = new FrameLayout.LayoutParams(\n\t\t\t\tLayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\tlpCounter.bottomMargin = dp_74;\n\t\tlpCounter.gravity = Gravity.RIGHT | Gravity.BOTTOM;\n\n\t\ttvCounter.setPadding(0, 0, dp_16, 0);\n\t\ttvCounter.setLayoutParams(lpCounter);\n\t\tflPage.addView(tvCounter);\n\n\t\tTextView tvShareTo = new TextView(getContext());\n\t\tresId = getStringRes(activity, \"share_to\");\n\t\tif (resId > 0) {\n\t\t\ttvShareTo.setText(resId);\n\t\t}\n\t\ttvShareTo.setTextColor(0xffcfcfcf);\n\t\ttvShareTo.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 15);\n\t\tint dp_9 = cn.sharesdk.framework.utils.R.dipToPx(getContext(), 9);\n\t\tLinearLayout.LayoutParams lpShareTo = new LinearLayout.LayoutParams(\n\t\t\t\tLayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\tlpShareTo.gravity = Gravity.CENTER_VERTICAL;\n\t\tlpShareTo.setMargins(dp_9, 0, 0, 0);\n\t\ttvShareTo.setLayoutParams(lpShareTo);\n\t\tllToolBar.addView(tvShareTo);\n\n\t\tHorizontalScrollView sv = new HorizontalScrollView(getContext());\n\t\tsv.setHorizontalScrollBarEnabled(false);\n\t\tsv.setHorizontalFadingEdgeEnabled(false);\n\t\tLinearLayout.LayoutParams lpSv = new LinearLayout.LayoutParams(\n\t\t\t\tLayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\tlpSv.setMargins(dp_9, dp_9, dp_9, dp_9);\n\t\tsv.setLayoutParams(lpSv);\n\t\tllToolBar.addView(sv);\n\n\t\tllPlat = new LinearLayout(getContext());\n\t\tllPlat.setLayoutParams(new HorizontalScrollView.LayoutParams(\n\t\t\t\tLayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT));\n\t\tsv.addView(llPlat);\n\t}\n\n\t// if platform selected form platform gridview is SinaWeibo,\n\t// TencentWeibo, Facebook, or Twitter, there will be a button\n\t// in the left-bottom of the page, which provides At-friends function\n\tprivate void checkAtMth(LinearLayout llInput, String platform) {\n\t\tif (\"SinaWeibo\".equals(platform) || \"TencentWeibo\".equals(platform)\n\t\t\t\t|| \"Facebook\".equals(platform) || \"Twitter\".equals(platform)) {\n\t\t\tllAt= new LinearLayout(getContext());\n\t\t\tFrameLayout.LayoutParams lpAt = new FrameLayout.LayoutParams(\n\t\t\t\t\tLayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\t\tlpAt.leftMargin = cn.sharesdk.framework.utils.R.dipToPx(getContext(), 10);\n\t\t\tlpAt.bottomMargin = cn.sharesdk.framework.utils.R.dipToPx(getContext(), 10);\n\t\t\tlpAt.gravity = Gravity.LEFT | Gravity.BOTTOM;\n\t\t\tllAt.setLayoutParams(lpAt);\n\t\t\tllAt.setOnClickListener(this);\n\t\t\tllInput.addView(llAt);\n\n\t\t\tTextView tvAt = new TextView(getContext());\n\t\t\tint resId = getBitmapRes(activity, \"btn_back_nor\");\n\t\t\tif (resId > 0) {\n\t\t\t\ttvAt.setBackgroundResource(resId);\n\t\t\t}\n\t\t\tint dp_32 = cn.sharesdk.framework.utils.R.dipToPx(getContext(), 32);\n\t\t\ttvAt.setLayoutParams(new LinearLayout.LayoutParams(dp_32, dp_32));\n\t\t\ttvAt.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 18);\n\t\t\ttvAt.setText(\"@\");\n\t\t\tint dp_2 = cn.sharesdk.framework.utils.R.dipToPx(getContext(), 2);\n\t\t\ttvAt.setPadding(0, 0, 0, dp_2);\n\t\t\ttvAt.setTypeface(Typeface.DEFAULT_BOLD);\n\t\t\ttvAt.setTextColor(0xff000000);\n\t\t\ttvAt.setGravity(Gravity.CENTER);\n\t\t\tllAt.addView(tvAt);\n\n\t\t\tTextView tvName = new TextView(getContext());\n\t\t\ttvName.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 18);\n\t\t\ttvName.setTextColor(0xff000000);\n\t\t\tresId = getStringRes(activity, \"list_friends\");\n\t\t\tString text = getContext().getString(resId, getName(platform));\n\t\t\ttvName.setText(text);\n\t\t\tLinearLayout.LayoutParams lpName = new LinearLayout.LayoutParams(\n\t\t\t\t\tLayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\t\tlpName.gravity = Gravity.CENTER_VERTICAL;\n\t\t\ttvName.setLayoutParams(lpName);\n\t\t\tllAt.addView(tvName);\n\t\t}\n\t}\n\n\tprivate String getName(String platform) {\n\t\tif (platform == null) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tint resId = cn.sharesdk.framework.utils.R.getStringRes(getContext(), platform);\n\t\treturn getContext().getString(resId);\n\t}\n\n\tpublic void onClick(View v) {\n\t\tif (v.equals(ivImage)) {\n\t\t\tif (image != null && !image.isRecycled()) {\n\t\t\t\tPicViewer pv = new PicViewer();\n\t\t\t\tpv.setImageBitmap(image);\n\t\t\t\tpv.show(activity, null);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif (v.equals(llTitle.getBtnBack())) {\n\t\t\tPlatform plat = null;\n\t\t\tfor (int i = 0; i < views.length; i++) {\n\t\t\t\tif (views[i].getVisibility() == View.INVISIBLE) {\n\t\t\t\t\tplat = platformList[i];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// a statistics of Cancel-sharing\n\t\t\tif (plat != null) {\n\t\t\t\tShareSDK.logDemoEvent(5, plat);\n\t\t\t}\n\t\t\tfinish();\n\t\t\treturn;\n\t\t}\n\n\t\t// a statistics of Cancel-sharing\n\t\tif (v.equals(llTitle.getBtnRight())) {\n\t\t\tString text = etContent.getText().toString();\n\t\t\treqData.put(\"text\", text);\n\t\t\tif(!shareImage){\n\t\t\t\treqData.put(\"imagePath\", null);\n\t\t\t}\n\n\t\t\tHashMap<Platform, HashMap<String, Object>> editRes\n\t\t\t\t\t= new HashMap<Platform, HashMap<String,Object>>();\n\t\t\tboolean selected = false;\n\t\t\tfor (int i = 0; i < views.length; i++) {\n\t\t\t\tif (views[i].getVisibility() != View.VISIBLE) {\n\t\t\t\t\teditRes.put(platformList[i], reqData);\n\t\t\t\t\tselected = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (selected) {\n\t\t\t\tif (parent != null) {\n\t\t\t\t\tparent.share(editRes);\n\t\t\t\t}\n\t\t\t\tfinish();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint resId = getStringRes(activity, \"select_one_plat_at_least\");\n\t\t\t\tif (resId > 0) {\n\t\t\t\t\tToast.makeText(getContext(), resId, Toast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif (v.equals(llAt)) {\n\t\t\tFollowList subPage = new FollowList();\n\t\t\tString platform = String.valueOf(reqData.get(\"platform\"));\n\t\t\tsubPage.setPlatform(ShareSDK.getPlatform(activity, platform));\n\t\t\tsubPage.setBackPage(this);\n\t\t\tsubPage.show(activity, null);\n\t\t\treturn;\n\t\t}\n\n\t\t// remove the photo to share\n\t\tif(\"img_cancel\".equals(v.getTag())){\n\t\t\tv.setVisibility(View.GONE);\n\t\t\tivPin.setVisibility(View.GONE);\n\t\t\tivImage.setVisibility(View.GONE);\n\t\t\tshareImage = false;\n\t\t}\n\n\t\tif (v instanceof FrameLayout) {\n\t\t\t((FrameLayout) v).getChildAt(1).performClick();\n\t\t\treturn;\n\t\t}\n\n\t\tif (v.getVisibility() == View.INVISIBLE) {\n\t\t\tv.setVisibility(View.VISIBLE);\n\t\t}\n\t\telse {\n\t\t\tv.setVisibility(View.INVISIBLE);\n\t\t}\n\t}\n\n\tpublic boolean handleMessage(Message msg) {\n\t\tswitch(msg.what) {\n\t\t\tcase MSG_PLATFORM_LIST_GOT: {\n\t\t\t\tafterPlatformListGot();\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/** display platform list */\n\tpublic void afterPlatformListGot() {\n\t\tString name = String.valueOf(reqData.get(\"platform\"));\n\t\tint size = platformList == null ? 0 : platformList.length;\n\t\tviews = new View[size];\n\n\t\tfinal int dp_36 = cn.sharesdk.framework.utils.R.dipToPx(getContext(), 36);\n\t\tLinearLayout.LayoutParams lpItem = new LinearLayout.LayoutParams(dp_36, dp_36);\n\t\tfinal int dp_9 = cn.sharesdk.framework.utils.R.dipToPx(getContext(), 9);\n\t\tlpItem.setMargins(0, 0, dp_9, 0);\n\t\tFrameLayout.LayoutParams lpMask = new FrameLayout.LayoutParams(\n\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);\n\t\tlpMask.gravity = Gravity.LEFT | Gravity.TOP;\n\t\tint selection = 0;\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tFrameLayout fl = new FrameLayout(getContext());\n\t\t\tfl.setLayoutParams(lpItem);\n\t\t\tif (i >= size - 1) {\n\t\t\t\tfl.setLayoutParams(new LinearLayout.LayoutParams(dp_36, dp_36));\n\t\t\t}\n\t\t\tllPlat.addView(fl);\n\t\t\tfl.setOnClickListener(this);\n\n\t\t\tImageView iv = new ImageView(getContext());\n\t\t\tiv.setScaleType(ScaleType.CENTER_INSIDE);\n\t\t\tiv.setImageBitmap(getPlatLogo(platformList[i]));\n\t\t\tiv.setLayoutParams(new FrameLayout.LayoutParams(\n\t\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));\n\t\t\tfl.addView(iv);\n\n\t\t\tviews[i] = new View(getContext());\n\t\t\tviews[i].setBackgroundColor(0xcfffffff);\n\t\t\tviews[i].setOnClickListener(this);\n\t\t\tif (name != null && name.equals(platformList[i].getName())) {\n\t\t\t\tviews[i].setVisibility(View.INVISIBLE);\n\t\t\t\tselection = i;\n\n\t\t\t\t// a statistics of Sharing\n\t\t\t\tShareSDK.logDemoEvent(3, platformList[i]);\n\t\t\t}\n\t\t\tviews[i].setLayoutParams(lpMask);\n\t\t\tfl.addView(views[i]);\n\t\t}\n\n\t\tfinal int postSel = selection;\n\t\tUIHandler.sendEmptyMessageDelayed(0, 333, new Callback() {\n\t\t\tpublic boolean handleMessage(Message msg) {\n\t\t\t\tHorizontalScrollView hsv = (HorizontalScrollView)llPlat.getParent();\n\t\t\t\thsv.scrollTo(postSel * (dp_36 + dp_9), 0);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate Bitmap getPlatLogo(Platform plat) {\n\t\tif (plat == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tString name = plat.getName();\n\t\tif (name == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tString resName = \"logo_\" + plat.getName();\n\t\tint resId = getBitmapRes(activity, resName);\n\t\treturn BitmapFactory.decodeResource(activity.getResources(), resId);\n\t}\n\n\tpublic void beforeTextChanged(CharSequence s, int start, int count,\n\t\t\tint after) {\n\n\t}\n\n\tpublic void onTextChanged(CharSequence s, int start, int before, int count) {\n\t\tint remain = MAX_TEXT_COUNT - etContent.length();\n\t\ttvCounter.setText(String.valueOf(remain));\n\t\ttvCounter.setTextColor(remain > 0 ? 0xffcfcfcf : 0xffff0000);\n\t}\n\n\tpublic void afterTextChanged(Editable s) {\n\n\t}\n\n\tpublic void onResult(ArrayList<String> selected) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (String sel : selected) {\n\t\t\tsb.append('@').append(sel).append(' ');\n\t\t}\n\t\tetContent.append(sb.toString());\n\t}\n\n\tpublic void finish() {\n\t\tInputMethodManager imm = null;\n\t\ttry {\n\t\t\timm = (InputMethodManager) activity.getSystemService(\n\t\t\t\t\tContext.INPUT_METHOD_SERVICE);\n\t\t} catch (Throwable t) {\n\t\t\tt.printStackTrace();\n\t\t\timm = null;\n\t\t}\n\n\t\tif (imm != null) {\n\t\t\timm.hideSoftInputFromWindow(etContent.getWindowToken(), 0);\n\t\t}\n\n\t\tsuper.finish();\n\t}\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/fragment/onekeyshare/FollowList.java",
    "content": "/*\n * Offical Website:http://www.ShareSDK.cn\n * Support QQ: 4006852216\n * Offical Wechat Account:ShareSDK   (We will inform you our updated news at the first time by Wechat, if we release a new version. If you get any problem, you can also contact us with Wechat, we will reply you within 24 hours.)\n *\n * Copyright (c) 2013 ShareSDK.cn. All rights reserved.\n */\n\npackage com.bit.pedometer.ui.fragment.onekeyshare;\n\nimport static cn.sharesdk.framework.utils.R.*;\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport m.framework.ui.widget.asyncview.AsyncImageView;\nimport m.framework.ui.widget.asyncview.BitmapProcessor;\nimport m.framework.ui.widget.pulltorefresh.PullToRefreshListAdapter;\nimport m.framework.ui.widget.pulltorefresh.PullToRefreshView;\nimport cn.sharesdk.framework.FakeActivity;\nimport cn.sharesdk.framework.Platform;\nimport cn.sharesdk.framework.PlatformActionListener;\nimport cn.sharesdk.framework.TitleLayout;\nimport cn.sharesdk.framework.utils.UIHandler;\nimport android.app.Activity;\nimport android.content.Context;\nimport android.graphics.Bitmap;\nimport android.graphics.BitmapFactory;\nimport android.graphics.Canvas;\nimport android.os.Message;\nimport android.os.Handler.Callback;\nimport android.util.TypedValue;\nimport android.view.Gravity;\nimport android.view.View;\nimport android.view.View.OnClickListener;\nimport android.view.ViewGroup;\nimport android.widget.AdapterView;\nimport android.widget.FrameLayout;\nimport android.widget.ImageView;\nimport android.widget.LinearLayout;\nimport android.widget.ProgressBar;\nimport android.widget.AdapterView.OnItemClickListener;\nimport android.widget.LinearLayout.LayoutParams;\nimport android.widget.TextView;\n\n/** Request a list of friends or followings */\npublic class FollowList extends FakeActivity implements OnClickListener, OnItemClickListener {\n\tprivate TitleLayout llTitle;\n\tprivate Platform platform;\n\tprivate FollowAdapter adapter;\n\tprivate EditPage page;\n\n\tpublic void setPlatform(Platform platform) {\n\t\tthis.platform = platform;\n\t}\n\n\tpublic void onCreate() {\n\t\tLinearLayout llPage = new LinearLayout(getContext());\n\t\tllPage.setBackgroundColor(0xfff5f5f5);\n\t\tllPage.setOrientation(LinearLayout.VERTICAL);\n\t\tactivity.setContentView(llPage);\n\n\t\t// title bar\n\t\tllTitle = new TitleLayout(getContext());\n\t\tint resId = getBitmapRes(getContext(), \"title_back\");\n\t\tif (resId > 0) {\n\t\t\tllTitle.setBackgroundResource(resId);\n\t\t}\n\t\tllTitle.getBtnBack().setOnClickListener(this);\n\t\tresId = getStringRes(getContext(), \"multi_share\");\n\t\tif (resId > 0) {\n\t\t\tllTitle.getTvTitle().setText(resId);\n\t\t}\n\t\tllTitle.getBtnRight().setVisibility(View.VISIBLE);\n\t\tresId = getStringRes(getContext(), \"finish\");\n\t\tif (resId > 0) {\n\t\t\tllTitle.getBtnRight().setText(resId);\n\t\t}\n\t\tllTitle.getBtnRight().setOnClickListener(this);\n\t\tllTitle.setLayoutParams(new LinearLayout.LayoutParams(\n\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));\n\t\tllPage.addView(llTitle);\n\n\t\tFrameLayout flPage = new FrameLayout(getContext());\n\t\tLinearLayout.LayoutParams lpFl = new LinearLayout.LayoutParams(\n\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);\n\t\tlpFl.weight = 1;\n\t\tflPage.setLayoutParams(lpFl);\n\t\tllPage.addView(flPage);\n\n\t\t// the list of friends or followings\n\t\tPullToRefreshView followList = new PullToRefreshView(getContext());\n\t\tFrameLayout.LayoutParams lpLv = new FrameLayout.LayoutParams(\n\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);\n\t\tfollowList.setLayoutParams(lpLv);\n\t\tflPage.addView(followList);\n\t\tadapter = new FollowAdapter(followList);\n\t\tadapter.setPlatform(platform);\n\t\tfollowList.setAdapter(adapter);\n\t\tadapter.getListView().setOnItemClickListener(this);\n\n\t\tImageView ivShadow = new ImageView(getContext());\n\t\tresId = getBitmapRes(getContext(), \"title_shadow\");\n\t\tif (resId > 0) {\n\t\t\tivShadow.setBackgroundResource(resId);\n\t\t}\n\t\tFrameLayout.LayoutParams lpSd = new FrameLayout.LayoutParams(\n\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);\n\t\tivShadow.setLayoutParams(lpSd);\n\t\tflPage.addView(ivShadow);\n\n\t\t// request data\n\t\tfollowList.performPulling(true);\n\t}\n\n\tpublic void onClick(View v) {\n\t\tString name = platform.getName();\n\t\tif (v.equals(llTitle.getBtnRight())) {\n\t\t\tArrayList<String> selected = new ArrayList<String>();\n\t\t\tif (\"SinaWeibo\".equals(name)) {\n\t\t\t\tfor (int i = 0, size = adapter.getCount(); i < size; i++) {\n\t\t\t\t\tif (adapter.getItem(i).checked) {\n\t\t\t\t\t\tselected.add(adapter.getItem(i).screeName);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (\"TencentWeibo\".equals(name)) {\n\t\t\t\tfor (int i = 0, size = adapter.getCount(); i < size; i++) {\n\t\t\t\t\tif (adapter.getItem(i).checked) {\n\t\t\t\t\t\tselected.add(adapter.getItem(i).uid);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (\"Facebook\".equals(name)) {\n\t\t\t\tfor (int i = 0, size = adapter.getCount(); i < size; i++) {\n\t\t\t\t\tif (adapter.getItem(i).checked) {\n\t\t\t\t\t\tselected.add(\"[\" + adapter.getItem(i).uid + \"]\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (\"Twitter\".equals(name)) {\n\t\t\t\tfor (int i = 0, size = adapter.getCount(); i < size; i++) {\n\t\t\t\t\tif (adapter.getItem(i).checked) {\n\t\t\t\t\t\tselected.add(adapter.getItem(i).uid);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tpage.onResult(selected);\n\t\t}\n\n\t\tfinish();\n\t}\n\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\t\tFollowing following = adapter.getItem(position);\n\t\tfollowing.checked = !following.checked;\n\t\tadapter.notifyDataSetChanged();\n\t}\n\n\tpublic void setBackPage(EditPage page) {\n\t\tthis.page = page;\n\t}\n\n\tprivate static class FollowAdapter extends PullToRefreshListAdapter\n\t\t\timplements PlatformActionListener, Callback {\n\t\tprivate int curPage;\n\t\tprivate ArrayList<Following> follows;\n\t\tprivate HashMap<String, Following> map;\n\t\tprivate boolean hasNext;\n\t\tprivate Platform platform;\n\t\tprivate PRTHeader llHeader;\n\t\tprivate Bitmap bmChd;\n\t\tprivate Bitmap bmUnch;\n\n\t\tpublic FollowAdapter(PullToRefreshView view) {\n\t\t\tsuper(view);\n\t\t\tcurPage = -1;\n\t\t\thasNext = true;\n\t\t\tmap = new HashMap<String, Following>();\n\t\t\tfollows = new ArrayList<Following>();\n\n\t\t\tllHeader = new PRTHeader(getContext());\n\n\t\t\tint resId = getBitmapRes(getContext(), \"auth_follow_cb_chd\");\n\t\t\tif (resId > 0) {\n\t\t\t\tbmChd = BitmapFactory.decodeResource(view.getResources(), resId);\n\t\t\t}\n\t\t\tresId = getBitmapRes(getContext(), \"auth_follow_cb_unc\");\n\t\t\tif (resId > 0) {\n\t\t\t\tbmUnch = BitmapFactory.decodeResource(view.getResources(), resId);\n\t\t\t}\n\t\t}\n\n\t\tpublic void setPlatform(Platform platform) {\n\t\t\tthis.platform = platform;\n\t\t\tplatform.setPlatformActionListener(this);\n\t\t}\n\n\t\tprivate void next() {\n\t\t\tif (hasNext) {\n\t\t\t\tplatform.listFriend(15, curPage + 1, null);\n\t\t\t}\n\t\t}\n\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\tFollowListItem item = null;\n\t\t\tif (convertView == null) {\n\t\t\t\tLinearLayout llItem = new LinearLayout(parent.getContext());\n\t\t\t\titem = new FollowListItem();\n\t\t\t\tllItem.setTag(item);\n\t\t\t\tconvertView = llItem;\n\n\t\t\t\titem.aivIcon = new AsyncImageView(getContext());\n\t\t\t\tint dp_52 = cn.sharesdk.framework.utils.R.dipToPx(getContext(), 52);\n\t\t\t\tint dp_10 = cn.sharesdk.framework.utils.R.dipToPx(parent.getContext(), 10);\n\t\t\t\tint dp_5 = cn.sharesdk.framework.utils.R.dipToPx(parent.getContext(), 5);\n\t\t\t\tLinearLayout.LayoutParams lpIcon = new LinearLayout.LayoutParams(dp_52, dp_52);\n\t\t\t\tlpIcon.gravity = Gravity.CENTER_VERTICAL;\n\t\t\t\tlpIcon.setMargins(dp_10, dp_5, dp_10, dp_5);\n\t\t\t\titem.aivIcon.setLayoutParams(lpIcon);\n\t\t\t\tllItem.addView(item.aivIcon);\n\n\t\t\t\tLinearLayout llText = new LinearLayout(parent.getContext());\n\t\t\t\tllText.setPadding(0, dp_10, dp_10, dp_10);\n\t\t\t\tllText.setOrientation(LinearLayout.VERTICAL);\n\t\t\t\tLinearLayout.LayoutParams lpText = new LinearLayout.LayoutParams(\n\t\t\t\t\t\tLayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\t\t\tlpText.gravity = Gravity.CENTER_VERTICAL;\n\t\t\t\tlpText.weight = 1;\n\t\t\t\tllText.setLayoutParams(lpText);\n\t\t\t\tllItem.addView(llText);\n\n\t\t\t\titem.tvName = new TextView(parent.getContext());\n\t\t\t\titem.tvName.setTextColor(0xff000000);\n\t\t\t\titem.tvName.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 18);\n\t\t\t\titem.tvName.setSingleLine();\n\t\t\t\tllText.addView(item.tvName);\n\n\t\t\t\titem.tvSign = new TextView(parent.getContext());\n\t\t\t\titem.tvSign.setTextColor(0x7f000000);\n\t\t\t\titem.tvSign.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 14);\n\t\t\t\titem.tvSign.setSingleLine();\n\t\t\t\tllText.addView(item.tvSign);\n\n\t\t\t\titem.ivCheck = new ImageView(parent.getContext());\n\t\t\t\titem.ivCheck.setPadding(0, 0, dp_10, 0);\n\t\t\t\tLinearLayout.LayoutParams lpCheck = new LinearLayout.LayoutParams(\n\t\t\t\t\t\tLayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\t\t\tlpCheck.gravity = Gravity.CENTER_VERTICAL;\n\t\t\t\titem.ivCheck.setLayoutParams(lpCheck);\n\t\t\t\tllItem.addView(item.ivCheck);\n\t\t\t} else {\n\t\t\t\titem = (FollowListItem) convertView.getTag();\n\t\t\t}\n\n\t\t\tFollowing following = getItem(position);\n\t\t\titem.tvName.setText(following.screeName);\n\t\t\titem.tvSign.setText(following.description);\n\t\t\titem.ivCheck.setImageBitmap(following.checked ? bmChd : bmUnch);\n\t\t\tif (isFling()) {\n\t\t\t\tBitmap bm = BitmapProcessor.getBitmapFromCache(following.icon);\n\t\t\t\tif (bm != null && !bm.isRecycled()) {\n\t\t\t\t\titem.aivIcon.setImageBitmap(bm);\n\t\t\t\t} else {\n\t\t\t\t\titem.aivIcon.execute(null, AsyncImageView.DEFAULT_TRANSPARENT);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\titem.aivIcon.execute(following.icon);\n\t\t\t}\n\n\t\t\tif (position == getCount() - 1) {\n\t\t\t\tnext();\n\t\t\t}\n\t\t\treturn convertView;\n\t\t}\n\n\t\tpublic Following getItem(int position) {\n\t\t\treturn follows.get(position);\n\t\t}\n\n\t\tpublic long getItemId(int position) {\n\t\t\treturn position;\n\t\t}\n\n\t\tpublic int getCount() {\n\t\t\treturn follows == null ? 0 : follows.size();\n\t\t}\n\n\t\tpublic View getHeaderView() {\n\t\t\treturn llHeader;\n\t\t}\n\n\t\tpublic void onPullDown(int percent) {\n\t\t\tllHeader.onPullDown(percent);\n\t\t}\n\n\t\tpublic void onRequest() {\n\t\t\tllHeader.onRequest();\n\t\t\tcurPage = -1;\n\t\t\thasNext = true;\n\t\t\tmap.clear();\n\t\t\tnext();\n\t\t}\n\n\t\tpublic void onCancel(Platform plat, int action) {\n\t\t\tUIHandler.sendEmptyMessage(-1, this);\n\t\t}\n\n\t\tpublic void onComplete(Platform plat, int action, HashMap<String, Object> res) {\n\t\t\tArrayList<Following> data = parseList(res);\n\t\t\tif (data != null && data.size() > 0) {\n\t\t\t\tcurPage++;\n\t\t\t\tMessage msg = new Message();\n\t\t\t\tmsg.what = 1;\n\t\t\t\tmsg.obj = data;\n\t\t\t\tUIHandler.sendMessage(msg, this);\n\t\t\t}\n\t\t}\n\n\t\tpublic void onError(Platform plat, int action, Throwable t) {\n\t\t\tt.printStackTrace();\n\t\t}\n\n\t\tprivate ArrayList<Following> parseList(HashMap<String, Object> res) {\n\t\t\tif (res == null || res.size() <= 0) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tArrayList<Following> data = new ArrayList<Following>();\n\t\t\tif (\"SinaWeibo\".equals(platform.getName())) {\n\t\t\t\t// users[id, name, description]\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tArrayList<HashMap<String, Object>> users\n\t\t\t\t\t\t= (ArrayList<HashMap<String,Object>>) res.get(\"users\");\n\t\t\t\tfor (HashMap<String, Object> user : users) {\n\t\t\t\t\tString uid = String.valueOf(user.get(\"id\"));\n\t\t\t\t\tif (!map.containsKey(uid)) {\n\t\t\t\t\t\tFollowing following = new Following();\n\t\t\t\t\t\tfollowing.uid = uid;\n\t\t\t\t\t\tfollowing.screeName = String.valueOf(user.get(\"name\"));\n\t\t\t\t\t\tfollowing.description = String.valueOf(user.get(\"description\"));\n\t\t\t\t\t\tfollowing.icon = String.valueOf(user.get(\"profile_image_url\"));\n\t\t\t\t\t\tmap.put(following.uid, following);\n\t\t\t\t\t\tdata.add(following);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\thasNext = (Integer) res.get(\"total_number\") > map.size();\n\t\t\t}\n\t\t\telse if (\"TencentWeibo\".equals(platform.getName())) {\n\t\t\t\thasNext = ((Integer)res.get(\"hasnext\") == 0);\n\t\t\t\t// info[nick, name, tweet[text]]\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tArrayList<HashMap<String, Object>> infos\n\t\t\t\t\t\t= (ArrayList<HashMap<String,Object>>) res.get(\"info\");\n\t\t\t\tfor (HashMap<String, Object> info : infos) {\n\t\t\t\t\tString uid = String.valueOf(info.get(\"name\"));\n\t\t\t\t\tif (!map.containsKey(uid)) {\n\t\t\t\t\t\tFollowing following = new Following();\n\t\t\t\t\t\tfollowing.screeName = String.valueOf(info.get(\"nick\"));\n\t\t\t\t\t\tfollowing.uid = uid;\n\t\t\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\t\t\tArrayList<HashMap<String, Object>> tweets\n\t\t\t\t\t\t\t\t= (ArrayList<HashMap<String,Object>>) info.get(\"tweet\");\n\t\t\t\t\t\tfor (int i = 0; i < tweets.size();) {\n\t\t\t\t\t\t\tHashMap<String, Object> tweet = tweets.get(i);\n\t\t\t\t\t\t\tfollowing.description = String.valueOf(tweet.get(\"text\"));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfollowing.icon = String.valueOf(info.get(\"head\")) + \"/100\";\n\t\t\t\t\t\tmap.put(following.uid, following);\n\t\t\t\t\t\tdata.add(following);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (\"Facebook\".equals(platform.getName())) {\n\t\t\t\t// data[id, name]\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tArrayList<HashMap<String, Object>> datas\n\t\t\t\t\t\t= (ArrayList<HashMap<String,Object>>) res.get(\"data\");\n\t\t\t\tfor (HashMap<String, Object> d : datas) {\n\t\t\t\t\tString uid = String.valueOf(d.get(\"id\"));\n\t\t\t\t\tif (!map.containsKey(uid)) {\n\t\t\t\t\t\tFollowing following = new Following();\n\t\t\t\t\t\tfollowing.uid = uid;\n\t\t\t\t\t\tfollowing.screeName = String.valueOf(d.get(\"name\"));\n\t\t\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\t\t\tHashMap<String, Object> picture = (HashMap<String, Object>) d.get(\"picture\");\n\t\t\t\t\t\tif (picture != null) {\n\t\t\t\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\t\t\t\tHashMap<String, Object> pData = (HashMap<String, Object>) picture.get(\"data\");\n\t\t\t\t\t\t\tif (d != null) {\n\t\t\t\t\t\t\t\tfollowing.icon = String.valueOf(pData.get(\"url\"));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmap.put(following.uid, following);\n\t\t\t\t\t\tdata.add(following);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tHashMap<String, Object> paging = (HashMap<String, Object>) res.get(\"paging\");\n\t\t\t\thasNext = paging.containsKey(\"next\");\n\t\t\t}\n\t\t\telse if (\"Twitter\".equals(platform.getName())) {\n\t\t\t\t// users[screen_name, name, description]\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tArrayList<HashMap<String, Object>> users\n\t\t\t\t\t\t= (ArrayList<HashMap<String,Object>>) res.get(\"users\");\n\t\t\t\tfor (HashMap<String, Object> user : users) {\n\t\t\t\t\tString uid = String.valueOf(user.get(\"screen_name\"));\n\t\t\t\t\tif (!map.containsKey(uid)) {\n\t\t\t\t\t\tFollowing following = new Following();\n\t\t\t\t\t\tfollowing.uid = uid;\n\t\t\t\t\t\tfollowing.screeName = String.valueOf(user.get(\"name\"));\n\t\t\t\t\t\tfollowing.description = String.valueOf(user.get(\"description\"));\n\t\t\t\t\t\tfollowing.icon = String.valueOf(user.get(\"profile_image_url\"));\n\t\t\t\t\t\tmap.put(following.uid, following);\n\t\t\t\t\t\tdata.add(following);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn data;\n\t\t}\n\n\t\tpublic boolean handleMessage(Message msg) {\n\t\t\tif (msg.what < 0) {\n\t\t\t\t((Activity) getContext()).finish();\n\t\t\t} else {\n\t\t\t\tif (curPage <= 0) {\n\t\t\t\t\tfollows.clear();\n\t\t\t\t}\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tArrayList<Following> data = (ArrayList<Following>) msg.obj;\n\t\t\t\tfollows.addAll(data);\n\t\t\t\tnotifyDataSetChanged();\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tpublic void onReversed() {\n\t\t\tsuper.onReversed();\n\t\t\tllHeader.reverse();\n\t\t}\n\n\t}\n\n\tprivate static class FollowListItem {\n\t\tpublic AsyncImageView aivIcon;\n\t\tpublic TextView tvName;\n\t\tpublic TextView tvSign;\n\t\tpublic ImageView ivCheck;\n\t}\n\n\tprivate static class Following {\n\t\tpublic boolean checked;\n\t\tpublic String screeName;\n\t\tpublic String description;\n\t\tpublic String uid;\n\t\tpublic String icon;\n\t}\n\n\tprivate static class PRTHeader extends LinearLayout {\n\t\tprivate TextView tvHeader;\n\t\tprivate RotateImageView ivArrow;\n\t\tprivate ProgressBar pbRefreshing;\n\n\t\tpublic PRTHeader(Context context) {\n\t\t\tsuper(context);\n\t\t\tsetOrientation(VERTICAL);\n\n\t\t\tLinearLayout llInner = new LinearLayout(context);\n\t\t\tLinearLayout.LayoutParams lpInner = new LinearLayout.LayoutParams(\n\t\t\t\t\tLayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\t\tlpInner.gravity = Gravity.CENTER_HORIZONTAL;\n\t\t\taddView(llInner, lpInner);\n\n\t\t\tivArrow = new RotateImageView(context);\n\t\t\tint resId = getBitmapRes(context, \"ssdk_oks_ptr_ptr\");\n\t\t\tif (resId > 0) {\n\t\t\t\tivArrow.setImageResource(resId);\n\t\t\t}\n\t\t\tint dp_32 = dipToPx(context, 32);\n\t\t\tLayoutParams lpIv = new LayoutParams(dp_32, dp_32);\n\t\t\tlpIv.gravity = Gravity.CENTER_VERTICAL;\n\t\t\tllInner.addView(ivArrow, lpIv);\n\n\t\t\tpbRefreshing = new ProgressBar(context);\n\t\t\tllInner.addView(pbRefreshing, lpIv);\n\t\t\tpbRefreshing.setVisibility(View.GONE);\n\n\t\t\ttvHeader = new TextView(getContext());\n\t\t\ttvHeader.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 18);\n\t\t\ttvHeader.setGravity(Gravity.CENTER);\n\t\t\tint dp_10 = cn.sharesdk.framework.utils.R.dipToPx(getContext(), 10);\n\t\t\ttvHeader.setPadding(dp_10, dp_10, dp_10, dp_10);\n\t\t\ttvHeader.setTextColor(0xff000000);\n\t\t\tLayoutParams lpTv = new LayoutParams(\n\t\t\t\t\tLayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\t\tlpTv.gravity = Gravity.CENTER_VERTICAL;\n\t\t\tllInner.addView(tvHeader, lpTv);\n\t\t}\n\n\t\tpublic void onPullDown(int percent) {\n\t\t\tif (percent > 100) {\n\t\t\t\tint degree = (percent - 100) * 180 / 20;\n\t\t\t\tif (degree > 180) {\n\t\t\t\t\tdegree = 180;\n\t\t\t\t}\n\t\t\t\tif (degree < 0) {\n\t\t\t\t\tdegree = 0;\n\t\t\t\t}\n\t\t\t\tivArrow.setRotation(degree);\n\t\t\t} else {\n\t\t\t\tivArrow.setRotation(0);\n\t\t\t}\n\n\t\t\tif (percent < 100) {\n\t\t\t\tint resId = getStringRes(getContext(), \"pull_to_refresh\");\n\t\t\t\tif (resId > 0) {\n\t\t\t\t\ttvHeader.setText(resId);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tint resId = getStringRes(getContext(), \"release_to_refresh\");\n\t\t\t\tif (resId > 0) {\n\t\t\t\t\ttvHeader.setText(resId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tpublic void onRequest() {\n\t\t\tivArrow.setVisibility(View.GONE);\n\t\t\tpbRefreshing.setVisibility(View.VISIBLE);\n\t\t\tint resId = getStringRes(getContext(), \"refreshing\");\n\t\t\tif (resId > 0) {\n\t\t\t\ttvHeader.setText(resId);\n\t\t\t}\n\t\t}\n\n\t\tpublic void reverse() {\n\t\t\tpbRefreshing.setVisibility(View.GONE);\n\t\t\tivArrow.setRotation(180);\n\t\t\tivArrow.setVisibility(View.VISIBLE);\n\t\t}\n\n\t}\n\n\tprivate static class RotateImageView extends ImageView {\n\t\tprivate int rotation;\n\n\t\tpublic RotateImageView(Context context) {\n\t\t\tsuper(context);\n\t\t}\n\n\t\tpublic void setRotation(int degree) {\n\t\t\trotation = degree;\n\t\t\tinvalidate();\n\t\t}\n\n\t\tprotected void onDraw(Canvas canvas) {\n\t\t\tcanvas.rotate(rotation, getWidth() / 2, getHeight() / 2);\n\t\t\tsuper.onDraw(canvas);\n\t\t}\n\n\t}\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/fragment/onekeyshare/OnekeyShare.java",
    "content": "/*\n * Offical Website:http://www.ShareSDK.cn\n * Support QQ: 4006852216\n * Offical Wechat Account:ShareSDK   (We will inform you our updated news at the first time by Wechat, if we release a new version. If you get any problem, you can also contact us with Wechat, we will reply you within 24 hours.)\n *\n * Copyright (c) 2013 ShareSDK.cn. All rights reserved.\n */\n\npackage com.bit.pedometer.ui.fragment.onekeyshare;\n\nimport static cn.sharesdk.framework.utils.R.getBitmapRes;\nimport static cn.sharesdk.framework.utils.R.getStringRes;\n\nimport java.io.File;\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.Map.Entry;\n\nimport android.app.Notification;\nimport android.app.NotificationManager;\nimport android.app.PendingIntent;\nimport android.content.Context;\nimport android.content.Intent;\nimport android.content.res.Configuration;\nimport android.graphics.Bitmap;\nimport android.os.Message;\nimport android.os.Handler.Callback;\nimport android.text.TextUtils;\nimport android.util.TypedValue;\nimport android.view.Gravity;\nimport android.view.KeyEvent;\nimport android.view.MotionEvent;\nimport android.view.View;\nimport android.view.View.OnClickListener;\nimport android.view.animation.Animation;\nimport android.view.animation.TranslateAnimation;\nimport android.view.animation.Animation.AnimationListener;\nimport android.widget.Button;\nimport android.widget.FrameLayout;\nimport android.widget.LinearLayout;\nimport android.widget.Toast;\nimport android.widget.FrameLayout.LayoutParams;\nimport cn.sharesdk.framework.FakeActivity;\nimport cn.sharesdk.framework.Platform;\nimport cn.sharesdk.framework.PlatformActionListener;\nimport cn.sharesdk.framework.ShareSDK;\nimport cn.sharesdk.framework.utils.UIHandler;\n\n/**\n * entrance of onekeyshare\n * <p>\n * by setting different setter parameter, then call the Show method to start the shortcut to share\n */\npublic class OnekeyShare extends FakeActivity implements\n\t\tOnClickListener, PlatformActionListener, Callback {\n\tprivate static final int MSG_TOAST = 1;\n\tprivate static final int MSG_ACTION_CCALLBACK = 2;\n\tprivate static final int MSG_CANCEL_NOTIFY = 3;\n\t// page container\n\tprivate FrameLayout flPage;\n\t// gridview of platform list\n\tprivate PlatformGridView grid;\n\t// cancel button\n\tprivate Button btnCancel;\n\t// sliding up animation\n\tprivate Animation animShow;\n\t// sliding down animation\n\tprivate Animation animHide;\n\tprivate boolean finishing;\n\tprivate boolean canceled;\n\tprivate HashMap<String, Object> reqMap;\n\tprivate ArrayList<CustomerLogo> customers;\n\tprivate int notifyIcon;\n\tprivate String notifyTitle;\n\tprivate boolean silent;\n\tprivate PlatformActionListener callback;\n\tprivate ShareContentCustomizeCallback customizeCallback;\n\tprivate boolean dialogMode;\n\tprivate boolean disableSSO;\n\n\tpublic OnekeyShare() {\n\t\treqMap = new HashMap<String, Object>();\n\t\tcustomers = new ArrayList<CustomerLogo>();\n\t\tcallback = this;\n\t}\n\n\tpublic void show(Context context) {\n\t\tsuper.show(context, null);\n\t}\n\n\t/** icon and text to notify after sharing */\n\tpublic void setNotification(int icon, String title) {\n\t\tnotifyIcon = icon;\n\t\tnotifyTitle = title;\n\t}\n\n\t/** short message address or email address */\n\tpublic void setAddress(String address) {\n\t\treqMap.put(\"address\", address);\n\t}\n\n\t/** title of share content */\n\tpublic void setTitle(String title) {\n\t\treqMap.put(\"title\", title);\n\t}\n\n\t/** the url of title */\n\tpublic void setTitleUrl(String titleUrl) {\n\t\treqMap.put(\"titleUrl\", titleUrl);\n\t}\n\n\t/** share content */\n\tpublic void setText(String text) {\n\t\treqMap.put(\"text\", text);\n\t}\n\n\t/** returns share content */\n\tpublic String getText() {\n\t\treturn reqMap.containsKey(\"text\") ? String.valueOf(reqMap.get(\"text\")) : null;\n\t}\n\n\t/** local path of the image to share */\n\tpublic void setImagePath(String imagePath) {\n\t\tif(!TextUtils.isEmpty(imagePath))\n\t\t\treqMap.put(\"imagePath\", imagePath);\n\t}\n\n\t/** url of the image to share */\n\tpublic void setImageUrl(String imageUrl) {\n\t\tif (!TextUtils.isEmpty(imageUrl))\n\t\t\treqMap.put(\"imageUrl\", imageUrl);\n\t}\n\n\t/** webpage link to share in wechat and yixin etc.*/\n \tpublic void setUrl(String url) {\n\t\treqMap.put(\"url\", url);\n\t}\n\n \t/** local path of the file to share in wechat */\n\tpublic void setFilePath(String filePath) {\n\t\treqMap.put(\"filePath\", filePath);\n\t}\n\n\t/** comment field of platform renren */\n\tpublic void setComment(String comment) {\n\t\treqMap.put(\"comment\", comment);\n\t}\n\n\t/** app name or site name of your program */\n\tpublic void setSite(String site) {\n\t\treqMap.put(\"site\", site);\n\t}\n\n\t/** the url of the website or appname */\n\tpublic void setSiteUrl(String siteUrl) {\n\t\treqMap.put(\"siteUrl\", siteUrl);\n\t}\n\n\t/** location name */\n\tpublic void setVenueName(String venueName) {\n\t\treqMap.put(\"venueName\", venueName);\n\t}\n\n\t/** description of your sharing location */\n\tpublic void setVenueDescription(String venueDescription) {\n\t\treqMap.put(\"venueDescription\", venueDescription);\n\t}\n\n\t/** latitude */\n\tpublic void setLatitude(float latitude) {\n\t\treqMap.put(\"latitude\", latitude);\n\t}\n\n\t/** longitude */\n\tpublic void setLongitude(float longitude) {\n\t\treqMap.put(\"longitude\", longitude);\n\t}\n\n\t/** determine whether to share directly */\n\tpublic void setSilent(boolean silent) {\n\t\tthis.silent = silent;\n\t}\n\n\t/** Setting the selected platform of EditPage when initializing */\n\tpublic void setPlatform(String platform) {\n\t\treqMap.put(\"platform\", platform);\n\t}\n\n\t/** setting custom external callback */\n\tpublic void setCallback(PlatformActionListener callback) {\n\t\tthis.callback = callback;\n\t}\n\n\t/** returns sharing callback */\n\tpublic PlatformActionListener getCallback() {\n\t\treturn callback;\n\t}\n\n\t/** setting the share content customizing callback for sharing process */\n\tpublic void setShareContentCustomizeCallback(ShareContentCustomizeCallback callback) {\n\t\tcustomizeCallback = callback;\n\t}\n\n\t/** returns share content customizing callback */\n\tpublic ShareContentCustomizeCallback getShareContentCustomizeCallback() {\n\t\treturn customizeCallback;\n\t}\n\n\t/** add a custom icon and its click event listener */\n\tpublic void setCustomerLogo(Bitmap logo, String label, OnClickListener ocListener) {\n\t\tCustomerLogo cl = new CustomerLogo();\n\t\tcl.label = label;\n\t\tcl.logo = logo;\n\t\tcl.listener = ocListener;\n\t\tcustomers.add(cl);\n\t}\n\n\t/** disable SSO authorizing before sharing */\n\tpublic void disableSSOWhenAuthorize() {\n\t\tdisableSSO = true;\n\t}\n\n\t/** set the display mode of editpage to be the dialog mode */\n\tpublic void setDialogMode() {\n\t\tdialogMode = true;\n\t\treqMap.put(\"dialogMode\", dialogMode);\n\t}\n\n\tpublic void onCreate() {\n\t\t// display mode of onekeyshare is controled by the field of platform and silent,\n\t\t// if platform is set, platform gridview won't be display, onekeyshare will jump to editpage directly\n\t\t// if silent is true, onekeyshare will skip the editpage and shares directly\n\t\t// the class only determines the value of platform, because after PlatformGridView is shown, all events will be passed into it\n\t\t// when platform is set, and silent is true, onekeyshare will share the selected platform directly\n\t\t// when platform is set, and silent is false, onekeyshare will determine whether to share by the client of the platform or not\n\t\tHashMap<String, Object> copy = new HashMap<String, Object>();\n\t\tcopy.putAll(reqMap);\n\t\tif (copy.containsKey(\"platform\")) {\n\t\t\tString name = String.valueOf(copy.get(\"platform\"));\n\t\t\tif (silent) {\n\t\t\t\tHashMap<Platform, HashMap<String, Object>> shareData\n\t\t\t\t\t\t= new HashMap<Platform, HashMap<String,Object>>();\n\t\t\t\tshareData.put(ShareSDK.getPlatform(activity, name), copy);\n\t\t\t\tshare(shareData);\n\t\t\t} else if (ShareCore.isUseClientToShare(activity, name)) {\n\t\t\t\tHashMap<Platform, HashMap<String, Object>> shareData\n\t\t\t\t\t\t= new HashMap<Platform, HashMap<String,Object>>();\n\t\t\t\tshareData.put(ShareSDK.getPlatform(activity, name), copy);\n\t\t\t\tshare(shareData);\n\t\t\t} else {\n\t\t\t\tEditPage page = new EditPage();\n\t\t\t\tpage.setShareData(copy);\n\t\t\t\tpage.setParent(this);\n\t\t\t\tif (dialogMode) {\n\t\t\t\t\tpage.setDialogMode();\n\t\t\t\t}\n\t\t\t\tpage.show(activity, null);\n\t\t\t}\n\t\t\tfinish();\n\t\t\treturn;\n\t\t}\n\n\t\tfinishing = false;\n\t\tcanceled = false;\n\t\tinitPageView();\n\t\tinitAnim();\n\t\tactivity.setContentView(flPage);\n\n\t\t// set the data for platform gridview\n\t\tgrid.setData(copy, silent);\n\t\tgrid.setCustomerLogos(customers);\n\t\tgrid.setParent(this);\n\t\tbtnCancel.setOnClickListener(this);\n\n\t\t// display gridviews\n\t\tflPage.clearAnimation();\n\t\tflPage.startAnimation(animShow);\n\n\t\t// a statistics of opening the platform gridview\n\t\tShareSDK.logDemoEvent(1, null);\n\t}\n\n\tprivate void initPageView() {\n\t\tflPage = new FrameLayout(getContext());\n\t\tflPage.setOnClickListener(this);\n\n\t\t// container of the platform gridview\n\t\tLinearLayout llPage = new LinearLayout(getContext()) {\n\t\t\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\tllPage.setOrientation(LinearLayout.VERTICAL);\n\t\tint resId = getBitmapRes(getContext(), \"share_vp_back\");\n\t\tif (resId > 0) {\n\t\t\tllPage.setBackgroundResource(resId);\n\t\t}\n\t\tFrameLayout.LayoutParams lpLl = new FrameLayout.LayoutParams(\n\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);\n\t\tlpLl.gravity = Gravity.BOTTOM;\n\t\tllPage.setLayoutParams(lpLl);\n\t\tflPage.addView(llPage);\n\n\t\t// gridview\n\t\tgrid = new PlatformGridView(getContext());\n\t\tLinearLayout.LayoutParams lpWg = new LinearLayout.LayoutParams(\n\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);\n\t\tgrid.setLayoutParams(lpWg);\n\t\tllPage.addView(grid);\n\n\t\t// cancel button\n\t\tbtnCancel = new Button(getContext());\n\t\tbtnCancel.setTextColor(0xffffffff);\n\t\tbtnCancel.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 20);\n\t\tresId = getStringRes(getContext(), \"cancel\");\n\t\tif (resId > 0) {\n\t\t\tbtnCancel.setText(resId);\n\t\t}\n\t\tbtnCancel.setPadding(0, 0, 0, cn.sharesdk.framework.utils.R.dipToPx(getContext(), 5));\n\t\tresId = getBitmapRes(getContext(), \"btn_cancel_back\");\n\t\tif (resId > 0) {\n\t\t\tbtnCancel.setBackgroundResource(resId);\n\t\t}\n\t\tLinearLayout.LayoutParams lpBtn = new LinearLayout.LayoutParams(\n\t\t\t\tLayoutParams.MATCH_PARENT, cn.sharesdk.framework.utils.R.dipToPx(getContext(), 45));\n\t\tint dp_10 = cn.sharesdk.framework.utils.R.dipToPx(getContext(), 10);\n\t\tlpBtn.setMargins(dp_10, dp_10, dp_10, dp_10);\n\t\tbtnCancel.setLayoutParams(lpBtn);\n\t\tllPage.addView(btnCancel);\n\t}\n\n\tprivate void initAnim() {\n\t\tanimShow = new TranslateAnimation(\n\t\t\t\tAnimation.RELATIVE_TO_SELF, 0,\n\t\t\t\tAnimation.RELATIVE_TO_SELF, 0,\n\t\t\t\tAnimation.RELATIVE_TO_SELF, 1,\n\t\t\t\tAnimation.RELATIVE_TO_SELF, 0);\n\t\tanimShow.setDuration(300);\n\n\t\tanimHide = new TranslateAnimation(\n\t\t\t\tAnimation.RELATIVE_TO_SELF, 0,\n\t\t\t\tAnimation.RELATIVE_TO_SELF, 0,\n\t\t\t\tAnimation.RELATIVE_TO_SELF, 0,\n\t\t\t\tAnimation.RELATIVE_TO_SELF, 1);\n\t\tanimHide.setDuration(300);\n\t}\n\n\tpublic void onClick(View v) {\n\t\tif (v.equals(flPage) || v.equals(btnCancel)) {\n\t\t\tcanceled = true;\n\t\t\tfinish();\n\t\t}\n\t}\n\n\tpublic boolean onKeyEvent(int keyCode, KeyEvent event) {\n\t\tif (keyCode == KeyEvent.KEYCODE_BACK) {\n\t\t\tcanceled = true;\n\t\t}\n\t\treturn super.onKeyEvent(keyCode, event);\n\t}\n\n\tpublic void onConfigurationChanged(Configuration newConfig) {\n\t\tif (grid != null) {\n\t\t\tgrid.onConfigurationChanged();\n\t\t}\n\t}\n\n\tpublic void finish() {\n\t\tif (finishing) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (animHide == null) {\n\t\t\tfinishing = true;\n\t\t\tsuper.finish();\n\t\t\treturn;\n\t\t}\n\n\t\t// a statistics of cancel sharing\n\t\tif (canceled) {\n\t\t\tShareSDK.logDemoEvent(2, null);\n\t\t}\n\t\tfinishing = true;\n\t\tanimHide.setAnimationListener(new AnimationListener() {\n\t\t\tpublic void onAnimationStart(Animation animation) {\n\n\t\t\t}\n\n\t\t\tpublic void onAnimationRepeat(Animation animation) {\n\n\t\t\t}\n\n\t\t\tpublic void onAnimationEnd(Animation animation) {\n\t\t\t\tflPage.setVisibility(View.GONE);\n\t\t\t\tOnekeyShare.super.finish();\n\t\t\t}\n\t\t});\n\t\tflPage.clearAnimation();\n\t\tflPage.startAnimation(animHide);\n\t}\n\n\t/** execute the loop of share */\n\tpublic void share(HashMap<Platform, HashMap<String, Object>> shareData) {\n\t\tboolean started = false;\n\t\tfor (Entry<Platform, HashMap<String, Object>> ent : shareData.entrySet()) {\n\t\t\tPlatform plat = ent.getKey();\n\t\t\tplat.SSOSetting(disableSSO);\n\t\t\tString name = plat.getName();\n\t\t\tboolean isWechat = \"WechatMoments\".equals(name) || \"Wechat\".equals(name)\n\t\t\t\t\t|| \"WechatFavorite\".equals(name);\n\t\t\tif (isWechat && !plat.isValid()) {\n\t\t\t\tMessage msg = new Message();\n\t\t\t\tmsg.what = MSG_TOAST;\n\t\t\t\tint resId = getStringRes(getContext(), \"wechat_client_inavailable\");\n\t\t\t\tmsg.obj = activity.getString(resId);\n\t\t\t\tUIHandler.sendMessage(msg, this);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tboolean isGooglePlus = \"GooglePlus\".equals(name);\n\t\t\tif (isGooglePlus && !plat.isValid()) {\n\t\t\t\tMessage msg = new Message();\n\t\t\t\tmsg.what = MSG_TOAST;\n\t\t\t\tint resId = getStringRes(getContext(), \"google_plus_client_inavailable\");\n\t\t\t\tmsg.obj = activity.getString(resId);\n\t\t\t\tUIHandler.sendMessage(msg, this);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tboolean isQQ = \"QQ\".equals(name);\n\t\t\tif (isQQ && !plat.isValid()) {\n\t\t\t\tMessage msg = new Message();\n\t\t\t\tmsg.what = MSG_TOAST;\n\t\t\t\tint resId = getStringRes(getContext(), \"qq_client_inavailable\");\n\t\t\t\tmsg.obj = activity.getString(resId);\n\t\t\t\tUIHandler.sendMessage(msg, this);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tboolean isPinterest = \"Pinterest\".equals(name);\n\t\t\tif (isPinterest && !plat.isValid()) {\n\t\t\t\tMessage msg = new Message();\n\t\t\t\tmsg.what = MSG_TOAST;\n\t\t\t\tint resId = getStringRes(getContext(), \"pinterest_client_inavailable\");\n\t\t\t\tmsg.obj = activity.getString(resId);\n\t\t\t\tUIHandler.sendMessage(msg, this);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tboolean isInstagram = \"Instagram\".equals(name);\n\t\t\tif (isInstagram && !plat.isValid()) {\n\t\t\t\tMessage msg = new Message();\n\t\t\t\tmsg.what = MSG_TOAST;\n\t\t\t\tint resId = getStringRes(getContext(), \"instagram_client_inavailable\");\n\t\t\t\tmsg.obj = activity.getString(resId);\n\t\t\t\tUIHandler.sendMessage(msg, this);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tboolean isYixin = \"YixinMoments\".equals(name) || \"Yixin\".equals(name);\n\t\t\tif (isYixin && !plat.isValid()) {\n\t\t\t\tMessage msg = new Message();\n\t\t\t\tmsg.what = MSG_TOAST;\n\t\t\t\tint resId = getStringRes(getContext(), \"yixin_client_inavailable\");\n\t\t\t\tmsg.obj = activity.getString(resId);\n\t\t\t\tUIHandler.sendMessage(msg, this);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tHashMap<String, Object> data = ent.getValue();\n\t\t\tint shareType = Platform.SHARE_TEXT;\n\t\t\tString imagePath = String.valueOf(data.get(\"imagePath\"));\n\t\t\tif (imagePath != null && (new File(imagePath)).exists()) {\n\t\t\t\tshareType = Platform.SHARE_IMAGE;\n\t\t\t\tif (imagePath.endsWith(\".gif\")) {\n\t\t\t\t\tshareType = Platform.SHARE_EMOJI;\n\t\t\t\t} else if (data.containsKey(\"url\") && !TextUtils.isEmpty(data.get(\"url\").toString())) {\n\t\t\t\t\tshareType = Platform.SHARE_WEBPAGE;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tObject imageUrl = data.get(\"imageUrl\");\n\t\t\t\tif (imageUrl != null && !TextUtils.isEmpty(String.valueOf(imageUrl))) {\n\t\t\t\t\tshareType = Platform.SHARE_IMAGE;\n\t\t\t\t\tif (String.valueOf(imageUrl).endsWith(\".gif\")) {\n\t\t\t\t\t\tshareType = Platform.SHARE_EMOJI;\n\t\t\t\t\t} else if (data.containsKey(\"url\") && !TextUtils.isEmpty(data.get(\"url\").toString())) {\n\t\t\t\t\t\tshareType = Platform.SHARE_WEBPAGE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tdata.put(\"shareType\", shareType);\n\n\t\t\tif (!started) {\n\t\t\t\tstarted = true;\n\t\t\t\tif (equals(callback)) {\n\t\t\t\t\tint resId = getStringRes(getContext(), \"sharing\");\n\t\t\t\t\tif (resId > 0) {\n\t\t\t\t\t\tshowNotification(2000, getContext().getString(resId));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfinish();\n\t\t\t}\n\t\t\tplat.setPlatformActionListener(callback);\n\t\t\tShareCore shareCore = new ShareCore();\n\t\t\tshareCore.setShareContentCustomizeCallback(customizeCallback);\n\t\t\tshareCore.share(plat, data);\n\t\t}\n\t}\n\n\tpublic void onComplete(Platform platform, int action,\n\t\t\tHashMap<String, Object> res) {\n\t\tMessage msg = new Message();\n\t\tmsg.what = MSG_ACTION_CCALLBACK;\n\t\tmsg.arg1 = 1;\n\t\tmsg.arg2 = action;\n\t\tmsg.obj = platform;\n\t\tUIHandler.sendMessage(msg, this);\n\t}\n\n\tpublic void onError(Platform platform, int action, Throwable t) {\n\t\tt.printStackTrace();\n\n\t\tMessage msg = new Message();\n\t\tmsg.what = MSG_ACTION_CCALLBACK;\n\t\tmsg.arg1 = 2;\n\t\tmsg.arg2 = action;\n\t\tmsg.obj = t;\n\t\tUIHandler.sendMessage(msg, this);\n\n\t\t// a statistics of cancel sharing\n\t\tShareSDK.logDemoEvent(4, platform);\n\t}\n\n\tpublic void onCancel(Platform platform, int action) {\n\t\tMessage msg = new Message();\n\t\tmsg.what = MSG_ACTION_CCALLBACK;\n\t\tmsg.arg1 = 3;\n\t\tmsg.arg2 = action;\n\t\tmsg.obj = platform;\n\t\tUIHandler.sendMessage(msg, this);\n\t}\n\n\tpublic boolean handleMessage(Message msg) {\n\t\tswitch(msg.what) {\n\t\t\tcase MSG_TOAST: {\n\t\t\t\tString text = String.valueOf(msg.obj);\n\t\t\t\tToast.makeText(activity, text, Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t\tbreak;\n\t\t\tcase MSG_ACTION_CCALLBACK: {\n\t\t\t\tswitch (msg.arg1) {\n\t\t\t\t\tcase 1: {\n\t\t\t\t\t\t// success\n\t\t\t\t\t\tint resId = getStringRes(getContext(), \"share_completed\");\n\t\t\t\t\t\tif (resId > 0) {\n\t\t\t\t\t\t\tshowNotification(2000, getContext().getString(resId));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2: {\n\t\t\t\t\t\t// failed\n\t\t\t\t\t\tString expName = msg.obj.getClass().getSimpleName();\n\t\t\t\t\t\tif (\"WechatClientNotExistException\".equals(expName)\n\t\t\t\t\t\t\t\t|| \"WechatTimelineNotSupportedException\".equals(expName)\n\t\t\t\t\t\t\t\t|| \"WechatFavoriteNotSupportedException\".equals(expName)) {\n\t\t\t\t\t\t\tint resId = getStringRes(getContext(), \"wechat_client_inavailable\");\n\t\t\t\t\t\t\tif (resId > 0) {\n\t\t\t\t\t\t\t\tshowNotification(2000, getContext().getString(resId));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (\"GooglePlusClientNotExistException\".equals(expName)) {\n\t\t\t\t\t\t\tint resId = getStringRes(getContext(), \"google_plus_client_inavailable\");\n\t\t\t\t\t\t\tif (resId > 0) {\n\t\t\t\t\t\t\t\tshowNotification(2000, getContext().getString(resId));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (\"QQClientNotExistException\".equals(expName)) {\n\t\t\t\t\t\t\tint resId = getStringRes(getContext(), \"qq_client_inavailable\");\n\t\t\t\t\t\t\tif (resId > 0) {\n\t\t\t\t\t\t\t\tshowNotification(2000, getContext().getString(resId));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (\"YixinClientNotExistException\".equals(expName)\n\t\t\t\t\t\t\t\t|| \"YixinTimelineNotSupportedException\".equals(expName)) {\n\t\t\t\t\t\t\tint resId = getStringRes(getContext(), \"yixin_client_inavailable\");\n\t\t\t\t\t\t\tif (resId > 0) {\n\t\t\t\t\t\t\t\tshowNotification(2000, getContext().getString(resId));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tint resId = getStringRes(getContext(), \"share_failed\");\n\t\t\t\t\t\t\tif (resId > 0) {\n\t\t\t\t\t\t\t\tshowNotification(2000, getContext().getString(resId));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3: {\n\t\t\t\t\t\t// canceled\n\t\t\t\t\t\tint resId = getStringRes(getContext(), \"share_canceled\");\n\t\t\t\t\t\tif (resId > 0) {\n\t\t\t\t\t\t\tshowNotification(2000, getContext().getString(resId));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t\tcase MSG_CANCEL_NOTIFY: {\n\t\t\t\tNotificationManager nm = (NotificationManager) msg.obj;\n\t\t\t\tif (nm != null) {\n\t\t\t\t\tnm.cancel(msg.arg1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\treturn false;\n\t}\n\n\t// notify the share result\n\t@SuppressWarnings(\"deprecation\")\n\tprivate void showNotification(long cancelTime, String text) {\n\t\ttry {\n\t\t\tContext app = getContext().getApplicationContext();\n\t\t\tNotificationManager nm = (NotificationManager) app\n\t\t\t\t\t.getSystemService(Context.NOTIFICATION_SERVICE);\n\t\t\tfinal int id = Integer.MAX_VALUE / 13 + 1;\n\t\t\tnm.cancel(id);\n\n\t\t\tlong when = System.currentTimeMillis();\n\t\t\tNotification notification = new Notification(notifyIcon, text, when);\n\t\t\tPendingIntent pi = PendingIntent.getActivity(app, 0, new Intent(), 0);\n//\t\t\tnotification.setLatestEventInfo(app, notifyTitle, text, pi);\n\t\t\tnotification.flags = Notification.FLAG_AUTO_CANCEL;\n\t\t\tnm.notify(id, notification);\n\n\t\t\tif (cancelTime > 0) {\n\t\t\t\tMessage msg = new Message();\n\t\t\t\tmsg.what = MSG_CANCEL_NOTIFY;\n\t\t\t\tmsg.obj = nm;\n\t\t\t\tmsg.arg1 = id;\n\t\t\t\tUIHandler.sendMessageDelayed(msg, cancelTime, this);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/fragment/onekeyshare/PicViewer.java",
    "content": "/*\n * Offical Website:http://www.ShareSDK.cn\n * Support QQ: 4006852216\n * Offical Wechat Account:ShareSDK   (We will inform you our updated news at the first time by Wechat, if we release a new version. If you get any problem, you can also contact us with Wechat, we will reply you within 24 hours.)\n *\n * Copyright (c) 2013 ShareSDK.cn. All rights reserved.\n */\n\n\npackage com.bit.pedometer.ui.fragment.onekeyshare;\n\nimport android.graphics.Bitmap;\nimport android.view.View;\nimport android.view.View.OnClickListener;\nimport android.widget.ImageView;\nimport android.widget.ImageView.ScaleType;\nimport cn.sharesdk.framework.FakeActivity;\n\n/** Preview photo to be shared page */\npublic class PicViewer extends FakeActivity implements OnClickListener {\n\tprivate ImageView ivViewer;\n\tprivate Bitmap pic;\n\n\t/** set the picture */\n\tpublic void setImageBitmap(Bitmap pic) {\n\t\tthis.pic = pic;\n\t\tif (ivViewer != null) {\n\t\t\tivViewer.setImageBitmap(pic);\n\t\t}\n\t}\n\n\tpublic void onCreate() {\n\t\tivViewer = new ImageView(activity);\n\t\tivViewer.setScaleType(ScaleType.CENTER_INSIDE);\n\t\tivViewer.setBackgroundColor(0xc0000000);\n\t\tivViewer.setOnClickListener(this);\n\t\tactivity.setContentView(ivViewer);\n\t\tif (pic != null && !pic.isRecycled()) {\n\t\t\tivViewer.setImageBitmap(pic);\n\t\t}\n\t}\n\n\tpublic void onClick(View v) {\n\t\tfinish();\n\t}\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/fragment/onekeyshare/PlatformGridView.java",
    "content": "/*\n * Offical Website:http://www.ShareSDK.cn\n * Support QQ: 4006852216\n * Offical Wechat Account:ShareSDK   (We will inform you our updated news at the first time by Wechat, if we release a new version. If you get any problem, you can also contact us with Wechat, we will reply you within 24 hours.)\n *\n * Copyright (c) 2013 ShareSDK.cn. All rights reserved.\n */\n\npackage com.bit.pedometer.ui.fragment.onekeyshare;\n\nimport static cn.sharesdk.framework.utils.R.getBitmapRes;\n\nimport java.lang.reflect.Method;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.HashMap;\nimport java.util.List;\nimport m.framework.ui.widget.viewpager.ViewPagerAdapter;\nimport m.framework.ui.widget.viewpager.ViewPagerClassic;\nimport android.content.Context;\nimport android.graphics.Bitmap;\nimport android.graphics.BitmapFactory;\nimport android.os.Build;\nimport android.os.Handler.Callback;\nimport android.os.Message;\nimport android.util.AttributeSet;\nimport android.util.TypedValue;\nimport android.view.Gravity;\nimport android.view.View;\nimport android.view.View.OnClickListener;\nimport android.view.ViewGroup;\nimport android.widget.ImageView;\nimport android.widget.ImageView.ScaleType;\nimport android.widget.LinearLayout;\nimport android.widget.TextView;\nimport cn.sharesdk.framework.Platform;\nimport cn.sharesdk.framework.ShareSDK;\nimport cn.sharesdk.framework.utils.UIHandler;\n\n/** platform logo list gridview */\npublic class PlatformGridView extends LinearLayout implements\n\t\tOnClickListener, Callback {\n\tprivate static final int MSG_PLATFORM_LIST_GOT = 1;\n\t// grids in each line\n\tprivate int LINE_PER_PAGE;\n\t// lines in each page\n\tprivate int COLUMN_PER_LINE;\n\t// grids in each page\n\tprivate int PAGE_SIZE;\n\t// grids container\n\tprivate ViewPagerClassic pager;\n\t// indicators\n\tprivate ImageView[] points;\n\tprivate Bitmap grayPoint;\n\tprivate Bitmap whitePoint;\n\t// Determine whether don't jump editpage and share directly\n\tprivate boolean silent;\n\t// platforms\n\tprivate Platform[] platformList;\n\t// data to share\n\tprivate HashMap<String, Object> reqData;\n\tprivate OnekeyShare parent;\n\tprivate ArrayList<CustomerLogo> customers;\n\n\tpublic PlatformGridView(Context context) {\n\t\tsuper(context);\n\t\tinit(context);\n\t}\n\n\tpublic PlatformGridView(Context context, AttributeSet attrs) {\n\t\tsuper(context, attrs);\n\t\tinit(context);\n\t}\n\n\tprivate void init(final Context context) {\n\t\tcalPageSize();\n\t\tsetOrientation(VERTICAL);\n\n\t\tpager = new ViewPagerClassic(context);\n\t\tdisableOverScrollMode(pager);\n\t\tpager.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));\n\t\taddView(pager);\n\n\t\t// in order to have a better UI effect, opening a thread request the list of platforms\n\t\tnew Thread(){\n\t\t\tpublic void run() {\n\t\t\t\tplatformList = ShareSDK.getPlatformList(context);\n\t\t\t\tif (platformList == null) {\n\t\t\t\t\tplatformList = new Platform[0];\n\t\t\t\t}\n\t\t\t\tUIHandler.sendEmptyMessage(MSG_PLATFORM_LIST_GOT, PlatformGridView.this);\n\t\t\t}\n\t\t}.start();\n\t}\n\n\tprivate void calPageSize() {\n\t\tfloat scrW = cn.sharesdk.framework.utils.R.getScreenWidth(getContext());\n\t\tfloat scrH = cn.sharesdk.framework.utils.R.getScreenHeight(getContext());\n\t\tfloat whR = scrW / scrH;\n\t\tif (whR < 0.6) {\n\t\t\tCOLUMN_PER_LINE = 3;\n\t\t\tLINE_PER_PAGE = 3;\n\t\t} else if (whR < 0.75) {\n\t\t\tCOLUMN_PER_LINE = 3;\n\t\t\tLINE_PER_PAGE = 2;\n\t\t} else {\n\t\t\tLINE_PER_PAGE = 1;\n\t\t\tif (whR >= 1.75) {\n\t\t\t\tCOLUMN_PER_LINE = 6;\n\t\t\t} else if (whR >= 1.5) {\n\t\t\t\tCOLUMN_PER_LINE = 5;\n\t\t\t} else if (whR >= 1.3) {\n\t\t\t\tCOLUMN_PER_LINE = 4;\n\t\t\t} else {\n\t\t\t\tCOLUMN_PER_LINE = 3;\n\t\t\t}\n\t\t}\n\t\tPAGE_SIZE = COLUMN_PER_LINE * LINE_PER_PAGE;\n\t}\n\n\tpublic boolean handleMessage(Message msg) {\n\t\tswitch (msg.what) {\n\t\t\tcase MSG_PLATFORM_LIST_GOT: {\n\t\t\t\tafterPlatformListGot();\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\treturn false;\n\t}\n\n\t// initializes the girdview of platforms\n\tpublic void afterPlatformListGot() {\n\t\tPlatformAdapter adapter = new PlatformAdapter(this);\n\t\tpager.setAdapter(adapter);\n\t\tint pageCount = 0;\n\t\tif (platformList != null) {\n\t\t\tint cusSize = customers == null ? 0 : customers.size();\n\t\t\tint platSize = platformList == null ? 0 : platformList.length;\n\t\t\tint size = platSize + cusSize;\n\t\t\tpageCount = size / PAGE_SIZE;\n\t\t\tif (size % PAGE_SIZE > 0) {\n\t\t\t\tpageCount++;\n\t\t\t}\n\t\t}\n\t\tpoints = new ImageView[pageCount];\n\t\tif (points.length <= 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tContext context = getContext();\n\t\tLinearLayout llPoints = new LinearLayout(context);\n\t\t// if the total number of pages exceeds 1, we set the page indicators\n\t\tllPoints.setVisibility(pageCount > 1 ? View.VISIBLE: View.GONE);\n\t\tLayoutParams lpLl = new LayoutParams(\n\t\t\t\tLayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\tlpLl.gravity = Gravity.CENTER_HORIZONTAL;\n\t\tllPoints.setLayoutParams(lpLl);\n\t\taddView(llPoints);\n\n\t\tint dp_5 = cn.sharesdk.framework.utils.R.dipToPx(context, 5);\n\t\tint resId = getBitmapRes(getContext(), \"gray_point\");\n\t\tif (resId > 0) {\n\t\t\tgrayPoint = BitmapFactory.decodeResource(getResources(), resId);\n\t\t}\n\t\tresId = getBitmapRes(getContext(), \"white_point\");\n\t\tif (resId > 0) {\n\t\t\twhitePoint = BitmapFactory.decodeResource(getResources(), resId);\n\t\t}\n\t\tfor (int i = 0; i < pageCount; i++) {\n\t\t\tpoints[i] = new ImageView(context);\n\t\t\tpoints[i].setScaleType(ScaleType.CENTER_INSIDE);\n\t\t\tpoints[i].setImageBitmap(grayPoint);\n\t\t\tLayoutParams lpIv = new LayoutParams(dp_5, dp_5);\n\t\t\tlpIv.setMargins(dp_5, dp_5, dp_5, 0);\n\t\t\tpoints[i].setLayoutParams(lpIv);\n\t\t\tllPoints.addView(points[i]);\n\t\t}\n\t\tint curPage = pager.getCurrentScreen();\n\t\tpoints[curPage].setImageBitmap(whitePoint);\n\t}\n\n\t/** after the screen rotates, this method will be called to refresh the list of gridviews */\n\tpublic void onConfigurationChanged() {\n\t\tint curFirst = pager.getCurrentScreen() * PAGE_SIZE;\n\t\tcalPageSize();\n\t\tint newPage = curFirst / PAGE_SIZE;\n\n\t\tremoveViewAt(1);\n\t\tafterPlatformListGot();\n\n\t\tpager.setCurrentScreen(newPage);\n\t}\n\n\tpublic void setData(HashMap<String, Object> data, boolean silent) {\n\t\treqData = data;\n\t\tthis.silent = silent;\n\t}\n\n\t/** Set the Click event of the custom icon */\n\tpublic void setCustomerLogos(ArrayList<CustomerLogo> customers) {\n\t\tthis.customers = customers;\n\t}\n\n\t/** Sets the callback page sharing operations */\n\tpublic void setParent(OnekeyShare parent) {\n\t\tthis.parent = parent;\n\t}\n\n\tpublic void onClick(View v) {\n\t\tPlatform plat = (Platform) v.getTag();\n\t\tif (plat != null) {\n\t\t\tif (silent) {\n\t\t\t\tHashMap<Platform, HashMap<String, Object>> shareData\n\t\t\t\t\t\t= new HashMap<Platform, HashMap<String,Object>>();\n\t\t\t\tshareData.put(plat, reqData);\n\t\t\t\tparent.share(shareData);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tString name = plat.getName();\n\t\t\treqData.put(\"platform\", name);\n\t\t\t// EditPage don't support Wechat, google+, QQ, pinterest, short message and email,\n\t\t\t// these performs always share directly\n\t\t\tif (ShareCore.isUseClientToShare(getContext(), name)) {\n\t\t\t\tHashMap<Platform, HashMap<String, Object>> shareData\n\t\t\t\t\t\t= new HashMap<Platform, HashMap<String,Object>>();\n\t\t\t\tshareData.put(plat, reqData);\n\t\t\t\tparent.share(shareData);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// jump in editpage to share\n\t\t\tEditPage page = new EditPage();\n\t\t\tpage.setShareData(reqData);\n\t\t\tpage.setParent(parent);\n\t\t\tif (\"true\".equals(String.valueOf(reqData.get(\"dialogMode\")))) {\n\t\t\t\tpage.setDialogMode();\n\t\t\t}\n\t\t\tpage.show(parent.getContext(), null);\n\t\t\tparent.finish();\n\t\t}\n\t}\n\n\t// Disable the flashing effect when viewpages sliding to left/right edge\n\tprivate void disableOverScrollMode(View view) {\n\t\tif (Build.VERSION.SDK_INT < 9) {\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tMethod m = View.class.getMethod(\"setOverScrollMode\",\n\t\t\t\t\tnew Class[] { Integer.TYPE });\n\t\t\tm.setAccessible(true);\n\t\t\tm.invoke(view, new Object[] { Integer.valueOf(2) });\n\t\t} catch (Throwable t) {\n\t\t\tt.printStackTrace();\n\t\t}\n\t}\n\n\t/** gridview adapter */\n\tprivate static class PlatformAdapter extends ViewPagerAdapter {\n\t\tprivate GridView[] girds;\n\t\tprivate List<Object> logos;\n\t\tprivate OnClickListener callback;\n\t\tprivate int lines;\n\t\tprivate PlatformGridView platformGridView;\n\n\t\tpublic PlatformAdapter(PlatformGridView platformGridView) {\n\t\t\tthis.platformGridView = platformGridView;\n\t\t\tlogos = new ArrayList<Object>();\n\t\t\tPlatform[] platforms = platformGridView.platformList;\n\t\t\tif (platforms != null) {\n\t\t\t\tlogos.addAll(Arrays.asList(platforms));\n\t\t\t}\n\t\t\tArrayList<CustomerLogo> customers = platformGridView.customers;\n\t\t\tif (customers != null) {\n\t\t\t\tlogos.addAll(customers);\n\t\t\t}\n\t\t\tthis.callback = platformGridView;\n\t\t\tgirds = null;\n\n\t\t\tif (logos != null) {\n\t\t\t\tint size = logos.size();\n\t\t\t\tint PAGE_SIZE = platformGridView.PAGE_SIZE;\n\t\t\t\tint pageCount = size / PAGE_SIZE;\n\t\t\t\tif (size % PAGE_SIZE > 0) {\n\t\t\t\t\tpageCount++;\n\t\t\t\t}\n\t\t\t\tgirds = new GridView[pageCount];\n\t\t\t}\n\t\t}\n\n\t\tpublic int getCount() {\n\t\t\treturn girds == null ? 0 : girds.length;\n\t\t}\n\n\t\tpublic View getView(int position, ViewGroup parent) {\n\t\t\tif (girds[position] == null) {\n\t\t\t\tint pageSize = platformGridView.PAGE_SIZE;\n\t\t\t\tint curSize = pageSize * position;\n\t\t\t\tint listSize = logos == null ? 0 : logos.size();\n\t\t\t\tif (curSize + pageSize > listSize) {\n\t\t\t\t\tpageSize = listSize - curSize;\n\t\t\t\t}\n\t\t\t\tObject[] gridBean = new Object[pageSize];\n\t\t\t\tfor (int i = 0; i < pageSize; i++) {\n\t\t\t\t\tgridBean[i] = logos.get(curSize + i);\n\t\t\t\t}\n\n\t\t\t\tif (position == 0) {\n\t\t\t\t\tint COLUMN_PER_LINE = platformGridView.COLUMN_PER_LINE;\n\t\t\t\t\tlines = gridBean.length / COLUMN_PER_LINE;\n\t\t\t\t\tif (gridBean.length % COLUMN_PER_LINE > 0) {\n\t\t\t\t\t\tlines++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tgirds[position] = new GridView(this);\n\t\t\t\tgirds[position].setData(lines, gridBean);\n\t\t\t}\n\n\t\t\treturn girds[position];\n\t\t}\n\n\t\t/** This method will be called after sliding the gridview */\n\t\tpublic void onScreenChange(int currentScreen, int lastScreen) {\n\t\t\tImageView[] points = platformGridView.points;\n\t\t\tfor (int i = 0; i < points.length; i++) {\n\t\t\t\tpoints[i].setImageBitmap(platformGridView.grayPoint);\n\t\t\t}\n\n\t\t\tpoints[currentScreen].setImageBitmap(platformGridView.whitePoint);\n\t\t}\n\n\t}\n\n\t/** a simple gridview */\n\tprivate static class GridView extends LinearLayout {\n\t\tprivate Object[] beans;\n\t\tprivate OnClickListener callback;\n\t\tprivate int lines;\n\t\tprivate PlatformAdapter platformAdapter;\n\n\t\tpublic GridView(PlatformAdapter platformAdapter) {\n\t\t\tsuper(platformAdapter.platformGridView.getContext());\n\t\t\tthis.platformAdapter = platformAdapter;\n\t\t\tthis.callback = platformAdapter.callback;\n\t\t}\n\n\t\tpublic void setData(int lines, Object[] beans) {\n\t\t\tthis.lines = lines;\n\t\t\tthis.beans = beans;\n\t\t\tinit();\n\t\t}\n\n\t\tprivate void init() {\n\t\t\tint dp_5 = cn.sharesdk.framework.utils.R.dipToPx(getContext(), 5);\n\t\t\tsetPadding(0, dp_5, 0, dp_5);\n\t\t\tsetOrientation(VERTICAL);\n\n\t\t\tint size = beans == null ? 0 : beans.length;\n\t\t\tint COLUMN_PER_LINE = platformAdapter.platformGridView.COLUMN_PER_LINE;\n\t\t\tint lineSize = size / COLUMN_PER_LINE;\n\t\t\tif (size % COLUMN_PER_LINE > 0) {\n\t\t\t\tlineSize++;\n\t\t\t}\n\t\t\tLayoutParams lp = new LayoutParams(\n\t\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);\n\t\t\tlp.weight = 1;\n\t\t\tfor (int i = 0; i < lines; i++) {\n\t\t\t\tLinearLayout llLine = new LinearLayout(getContext());\n\t\t\t\tllLine.setLayoutParams(lp);\n\t\t\t\tllLine.setPadding(dp_5, 0, dp_5, 0);\n\t\t\t\taddView(llLine);\n\n\t\t\t\tif (i >= lineSize) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (int j = 0; j < COLUMN_PER_LINE; j++) {\n\t\t\t\t\tfinal int index = i * COLUMN_PER_LINE + j;\n\t\t\t\t\tif (index >= size) {\n\t\t\t\t\t\tLinearLayout llItem = new LinearLayout(getContext());\n\t\t\t\t\t\tllItem.setLayoutParams(lp);\n\t\t\t\t\t\tllLine.addView(llItem);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tfinal LinearLayout llItem = getView(index, callback, getContext());\n\t\t\t\t\tllItem.setTag(beans[index]);\n\t\t\t\t\tllItem.setLayoutParams(lp);\n\t\t\t\t\tllLine.addView(llItem);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tprivate LinearLayout getView(int position, OnClickListener ocL, Context context) {\n\t\t\tBitmap logo;\n\t\t\tString label;\n\t\t\tOnClickListener listener;\n\t\t\tif (beans[position] instanceof Platform) {\n\t\t\t\tlogo = getIcon((Platform) beans[position]);\n\t\t\t\tlabel = getName((Platform) beans[position]);\n\t\t\t\tlistener = ocL;\n\t\t\t} else {\n\t\t\t\tlogo = ((CustomerLogo) beans[position]).logo;\n\t\t\t\tlabel = ((CustomerLogo) beans[position]).label;\n\t\t\t\tlistener = ((CustomerLogo) beans[position]).listener;\n\t\t\t}\n\n\t\t\tLinearLayout ll = new LinearLayout(context);\n\t\t\tll.setOrientation(LinearLayout.VERTICAL);\n\n\t\t\tImageView iv = new ImageView(context);\n\t\t\tint dp_5 = cn.sharesdk.framework.utils.R.dipToPx(context, 5);\n\t\t\tiv.setPadding(dp_5, dp_5, dp_5, dp_5);\n\t\t\tiv.setScaleType(ScaleType.CENTER_INSIDE);\n\t\t\tLinearLayout.LayoutParams lpIv = new LinearLayout.LayoutParams(\n\t\t\t\t\tLayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\t\tlpIv.setMargins(dp_5, dp_5, dp_5, dp_5);\n\t\t\tlpIv.gravity = Gravity.CENTER_HORIZONTAL;\n\t\t\tiv.setLayoutParams(lpIv);\n\t\t\tiv.setImageBitmap(logo);\n\t\t\tll.addView(iv);\n\n\t\t\tTextView tv = new TextView(context);\n\t\t\ttv.setTextColor(0xffffffff);\n\t\t\ttv.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 14);\n\t\t\ttv.setSingleLine();\n\t\t\ttv.setIncludeFontPadding(false);\n\t\t\tLinearLayout.LayoutParams lpTv = new LinearLayout.LayoutParams(\n\t\t\t\t\tLayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\t\tlpTv.gravity = Gravity.CENTER_HORIZONTAL;\n\t\t\tlpTv.weight = 1;\n\t\t\tlpTv.setMargins(dp_5, 0, dp_5, dp_5);\n\t\t\ttv.setLayoutParams(lpTv);\n\t\t\ttv.setText(label);\n\t\t\tll.addView(tv);\n\t\t\tll.setOnClickListener(listener);\n\n\t\t\treturn ll;\n\t\t}\n\n\t\tprivate Bitmap getIcon(Platform plat) {\n\t\t\tif (plat == null) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tString name = plat.getName();\n\t\t\tif (name == null) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tString resName = \"logo_\" + plat.getName();\n\t\t\tint resId = getBitmapRes(getContext(), resName);\n\t\t\treturn BitmapFactory.decodeResource(getResources(), resId);\n\t\t}\n\n\t\tprivate String getName(Platform plat) {\n\t\t\tif (plat == null) {\n\t\t\t\treturn \"\";\n\t\t\t}\n\n\t\t\tString name = plat.getName();\n\t\t\tif (name == null) {\n\t\t\t\treturn \"\";\n\t\t\t}\n\n\t\t\tint resId = cn.sharesdk.framework.utils.R.getStringRes(getContext(), plat.getName());\n\t\t\treturn getContext().getString(resId);\n\t\t}\n\n\t}\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/fragment/onekeyshare/ShareContentCustomizeCallback.java",
    "content": "package com.bit.pedometer.ui.fragment.onekeyshare;\n\nimport cn.sharesdk.framework.Platform;\n\npublic interface ShareContentCustomizeCallback {\n\n\tpublic void onShare(Platform platform, Platform.ShareParams paramsToShare);\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/fragment/onekeyshare/ShareCore.java",
    "content": "/*\n * Offical Website:http://www.ShareSDK.cn\n * Support QQ: 4006852216\n * Offical Wechat Account:ShareSDK   (We will inform you our updated news at the first time by Wechat, if we release a new version. If you get any problem, you can also contact us with Wechat, we will reply you within 24 hours.)\n *\n * Copyright (c) 2013 ShareSDK.cn. All rights reserved.\n */\n\npackage com.bit.pedometer.ui.fragment.onekeyshare;\n\nimport java.lang.reflect.Field;\nimport java.util.HashMap;\nimport java.util.Map.Entry;\n\nimport android.content.Context;\nimport android.text.TextUtils;\nimport cn.sharesdk.framework.Platform;\nimport cn.sharesdk.framework.ShareSDK;\n\n/**\n * ShareCore the actual export of OnekeyShare, which reflects\n * the pass in HashMap to a {@link ShareParams} of the target platform,\n * and shares it\n */\npublic class ShareCore {\n\tprivate ShareContentCustomizeCallback customizeCallback;\n\n\t/**\n\t * add a customize share content callback which will be\n\t * involved before the target platform sharing\n\t */\n\tpublic void setShareContentCustomizeCallback(ShareContentCustomizeCallback callback) {\n\t\tcustomizeCallback = callback;\n\t}\n\n\t/** perform sharing */\n\tpublic boolean share(Platform plat, HashMap<String, Object> data) {\n\t\tif (plat == null || data == null) {\n\t\t\treturn false;\n\t\t}\n\n\t\tPlatform.ShareParams sp = null;\n\t\ttry {\n\t\t\tsp = getShareParams(plat, data);\n\t\t} catch(Throwable t) {\n\t\t\tsp = null;\n\t\t}\n\n\t\tif (sp != null) {\n\t\t\tif (customizeCallback != null) {\n\t\t\t\tcustomizeCallback.onShare(plat, sp);\n\t\t\t}\n\t\t\tplat.share(sp);\n\t\t}\n\t\treturn true;\n\t}\n\n\tprivate Platform.ShareParams getShareParams(Platform plat,\n\t\t\tHashMap<String, Object> data) throws Throwable {\n\t\tString className = plat.getClass().getName() + \"$ShareParams\";\n\t\tClass<?> cls = Class.forName(className);\n\t\tif (cls == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tObject sp = cls.newInstance();\n\t\tif (sp == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tfor (Entry<String, Object> ent : data.entrySet()) {\n\t\t\tObject value= ent.getValue();\n\t\t\tif (value == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (value instanceof String) {\n\t\t\t\tString strValue = (String) value;\n\t\t\t\tif (TextUtils.isEmpty(strValue)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tField fld = cls.getField(ent.getKey());\n\t\t\t\tif (fld != null) {\n\t\t\t\t\tfld.setAccessible(true);\n\t\t\t\t\tfld.set(sp, value);\n\t\t\t\t}\n\t\t\t} catch(Throwable t) {}\n\t\t}\n\n\t\treturn (Platform.ShareParams) sp;\n\t}\n\n\t/** Determine whether the platform shares by its client or not */\n\tpublic static boolean isUseClientToShare(Context context, String platform) {\n\t\tif (\"Wechat\".equals(platform) || \"WechatMoments\".equals(platform)\n\t\t\t\t|| \"WechatFavorite\".equals(platform) || \"ShortMessage\".equals(platform)\n\t\t\t\t|| \"Email\".equals(platform) || \"GooglePlus\".equals(platform)\n\t\t\t\t|| \"QQ\".equals(platform) || \"Pinterest\".equals(platform)\n\t\t\t\t|| \"Instagram\".equals(platform) || \"Yixin\".equals(platform)\n\t\t\t\t|| \"YixinMoments\".equals(platform) || \"QZone\".equals(platform)) {\n\t\t\treturn true;\n\t\t} else if (\"Evernote\".equals(platform)) {\n\t\t\tPlatform plat = ShareSDK.getPlatform(context, platform);\n\t\t\tif (\"true\".equals(plat.getDevinfo(\"ShareByAppClient\"))) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/** Determine whether the platform can authorize */\n\tpublic static boolean canAuthorize(Context context, String platform) {\n\t\tif (\"Wechat\".equals(platform) || \"WechatMoments\".equals(platform)\n\t\t\t\t|| \"WechatFavorite\".equals(platform) || \"ShortMessage\".equals(platform)\n\t\t\t\t|| \"Email\".equals(platform) || \"GooglePlus\".equals(platform)\n\t\t\t\t|| \"QQ\".equals(platform) || \"Pinterest\".equals(platform)\n\t\t\t\t|| \"Yixin\".equals(platform) || \"YixinMoments\".equals(platform)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/fragment/tools/DisplayUtil.java",
    "content": "package com.bit.pedometer.ui.fragment.tools;\n\nimport android.content.Context;\n\npublic class DisplayUtil {\n\n\t /**\n     * 将px值转换为dip或dp值，保证尺寸大小不变\n     * \n     * @param pxValue\n     * @param scale\n     *            （DisplayMetrics类中属性density）\n     * @return\n     */ \n    public static int px2dip(Context context, float pxValue) { \n        final float scale = context.getResources().getDisplayMetrics().density; \n        return (int) (pxValue / scale + 0.5f); \n    } \n   \n    /**\n     * 将dip或dp值转换为px值，保证尺寸大小不变\n     * \n     * @param dipValue\n     * @param scale\n     *            （DisplayMetrics类中属性density）\n     * @return\n     */ \n    public static int dip2px(Context context, float dipValue) { \n        final float scale = context.getResources().getDisplayMetrics().density; \n        return (int) (dipValue * scale + 0.5f); \n    } \n   \n    /**\n     * 将px值转换为sp值，保证文字大小不变\n     * \n     * @param pxValue\n     * @param fontScale\n     *            （DisplayMetrics类中属性scaledDensity）\n     * @return\n     */ \n    public static int px2sp(Context context, float pxValue) { \n        final float fontScale = context.getResources().getDisplayMetrics().scaledDensity; \n        return (int) (pxValue / fontScale + 0.5f); \n    } \n   \n    /**\n     * 将sp值转换为px值，保证文字大小不变\n     * \n     * @param spValue\n     * @param fontScale\n     *            （DisplayMetrics类中属性scaledDensity）\n     * @return\n     */ \n    public static int sp2px(Context context, float spValue) { \n        final float fontScale = context.getResources().getDisplayMetrics().scaledDensity; \n        return (int) (spValue * fontScale + 0.5f); \n    } \n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/fragment/tools/ExpandableListViewAdapter.java",
    "content": "package com.bit.pedometer.ui.fragment.tools;\n\nimport java.util.HashMap;\nimport java.util.List;\n\nimport com.bit.pedometer.R;\nimport com.bit.pedometer.data.bean.Group;\nimport com.bit.pedometer.data.bean.User;\n\nimport android.annotation.SuppressLint;\nimport android.content.Context;\nimport android.graphics.Bitmap;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.BaseExpandableListAdapter;\nimport android.widget.ExpandableListView;\nimport android.widget.ImageView;\nimport android.widget.TextView;\n\npublic class ExpandableListViewAdapter extends BaseExpandableListAdapter {\n\n\tprivate Context context;\n\tprivate List<Group> group;\n\tprivate HashMap<Group, List<User>> user;\n\tprivate ExpandableListView accordion;\n\tprivate int last;\n\tprivate ToRoundBitmap toRoundBitmap;\n\n\t// private int[] drawables = new int[] { R.drawable.head1, R.drawable.head2,\n\t// R.drawable.head3, R.drawable.head4, R.drawable.head5,\n\t// R.drawable.head6, R.drawable.head8, R.drawable.head9,\n\t// R.drawable.head10 };\n\n\tpublic ExpandableListViewAdapter(Context context, List<Group> group,\n\t\t\tHashMap<Group, List<User>> user, ExpandableListView accordion) {\n\t\tthis.context = context;\n\t\tthis.group = group;\n\t\tthis.user = user;\n\t\tthis.accordion = accordion;\n\t\ttoRoundBitmap = ToRoundBitmap.getInstance(context);\n\n\t}\n\tpublic void changeExpandableList(List<Group> group,\n\t\t\tHashMap<Group, List<User>> user){\n\t\tthis.group = group;\n\t\tthis.user = user;\n\t\tthis.notifyDataSetChanged();\n\t}\n\n\t@Override\n\tpublic Object getChild(int groupPosition, int childPosititon) {\n\t\t// Log.d(\"tag1\", \"in child get \");\n\t\treturn this.user.get(this.group.get(groupPosition)).get(childPosititon);\n\t}\n\n\t@Override\n\tpublic long getChildId(int groupPosition, int childPosition) {\n\t\treturn childPosition;\n\t}\n\n\tprivate class ViewChildHolder {\n\t\tTextView nameTextView;\n\t\tTextView stepsTextView;\n\t\tImageView imageView;\n\t\tBitmap bitmap;\n\t\t\n\t}\n\n\t@SuppressLint(\"SimpleDateFormat\")\n\t@Override\n\tpublic View getChildView(int groupPosition, final int childPosition,\n\t\t\tboolean isLastChild, View convertView, ViewGroup parent) {\n\n\t\tfinal User childUser = (User) getChild(groupPosition, childPosition);\n\t\t// Log.d(\"tag1\", \"Childview Displayed\");\n\t\tView view;\n\t\tViewChildHolder viewHolder;\n\t\tif (convertView == null) {\n\t\t\tview = LayoutInflater.from(context).inflate(\n\t\t\t\t\tR.layout.group_member_list, null);\n\t\t\tviewHolder = new ViewChildHolder();\n\t\t\tviewHolder.nameTextView = (TextView) view\n\t\t\t\t\t.findViewById(R.id.group_member_name);\n\t\t\tviewHolder.stepsTextView = (TextView) view\n\t\t\t\t\t.findViewById(R.id.group_memeber_number);\n\t\t\tviewHolder.imageView = (ImageView) view\n\t\t\t\t\t.findViewById(R.id.group_member_pic);\n\t\t\tviewHolder.bitmap = toRoundBitmap.toRoundBitmap(PictureUtil\n\t\t\t\t\t.Byte2Bitmap(childUser.getPicture()));\n\t\t\tview.setTag(viewHolder);\n\t\t\t\n\t\t}else {\n\t\t\tview = convertView;\n\t\t\tviewHolder = (ViewChildHolder) view.getTag();\n\t\t}\n\t\tviewHolder.nameTextView.setText(childUser.getName());\n\t\tviewHolder.stepsTextView.setText(childUser.getToday_step() + \"\");\n\t\tviewHolder.imageView.setImageBitmap(viewHolder.bitmap);\n\t\treturn view;\n\t}\n\n\t@Override\n\tpublic int getChildrenCount(int groupPosition) {\n\t\tList<User> j = this.user.get(group.get(groupPosition));\n\t\tif (j != null) {\n\t\t\treturn this.user.get(group.get(groupPosition)).size();\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}\n\n\t@Override\n\tpublic Object getGroup(int groupPosition) {\n\t\t// Log.d(\"tag1\", \"打开-----------\");\n\t\treturn this.group.get(groupPosition);\n\t}\n\n\t@Override\n\tpublic int getGroupCount() {\n\t\t// Log.d(\"tag1\", \"in grp count\");\n\t\treturn this.group.size();\n\t}\n\n\t@Override\n\tpublic long getGroupId(int groupPosition) {\n\t\t// Log.d(\"tag1\", \"in grp Id\");\n\t\treturn groupPosition;\n\t}\n\n\t@Override\n\tpublic View getGroupView(int groupPosition, boolean isExpanded,\n\t\t\tView convertView, ViewGroup parent) {\n\t\tGroup group = (Group) getGroup(groupPosition);\n\t\tView view;\n\t\tViewGroupHolder viewHolder;\n\t\tif (convertView == null) {\n\t\t\tview = LayoutInflater.from(context).inflate(R.layout.group_list,\n\t\t\t\t\tnull);\n\t\t\tviewHolder = new ViewGroupHolder();\n\t\t\tviewHolder.nameTextView = (TextView) view\n\t\t\t\t\t.findViewById(R.id.group_number);\n\n\t\t\tviewHolder.stepsTextView = (TextView) view\n\t\t\t\t\t.findViewById(R.id.average_number);\n\t\t\tview.setTag(viewHolder);\n\t\t} else {\n\t\t\tview = convertView;\n\t\t\tviewHolder = (ViewGroupHolder) view.getTag();\n\t\t}\n\n\t\tviewHolder.nameTextView.setText(group.getID() + \"\");\n\t\tif (group.getMember_number() == 0) {\n\t\t\tviewHolder.stepsTextView.setText(\"0\");\n\t\t} else {\n\t\t\tviewHolder.stepsTextView.setText(group.getTotal_number()\n\t\t\t\t\t/ group.getMember_number() + \"\");\n\t\t}\n\n\t\treturn view;\n\t}\n\n\tprivate class ViewGroupHolder {\n\t\tTextView nameTextView;\n\t\tTextView stepsTextView;\n\t}\n\n\t@Override\n\tpublic boolean hasStableIds() {\n\t\t// Log.d(\"tag1\", \"111111111\");\n\t\treturn false;\n\t}\n\n\t@Override\n\tpublic boolean isChildSelectable(int groupPosition, int childPosition) {\n\t\t// Log.d(\"tag1\", \"22222222222\");\n\t\treturn true;\n\t}\n\n\t@Override\n\tpublic void onGroupExpanded(int groupPosition) {\n\t\tsuper.onGroupExpanded(groupPosition);\n\t\tif (groupPosition != last) {\n\t\t\taccordion.collapseGroup(last);\n\t\t}\n\n\t\tlast = groupPosition;\n\t}\n}"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/fragment/tools/MyAdapter.java",
    "content": "package com.bit.pedometer.ui.fragment.tools;\n\nimport java.util.List;\n\nimport com.bit.pedometer.R;\nimport com.bit.pedometer.data.db.PedometerDB;\nimport com.bit.pedometer.data.bean.Group;\nimport com.bit.pedometer.data.bean.User;\n\nimport android.content.Context;\nimport android.graphics.Bitmap;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.View.OnClickListener;\nimport android.view.ViewGroup;\nimport android.widget.BaseAdapter;\nimport android.widget.Button;\nimport android.widget.ImageView;\nimport android.widget.TextView;\nimport android.widget.Toast;\n\npublic class MyAdapter extends BaseAdapter {\n\tprivate List<User> user_list;\n\tprivate LayoutInflater inflater;\n\tprivate Context context;\n\tprivate PedometerDB pedometerDB;\n\tprivate User user;\n\tprivate int position;\n\tprivate ReFlashListView reFlashListView;\n\tprivate ToRoundBitmap toRoundBitmap;\n\n\tpublic MyAdapter(Context context, List<User> user_list,\n\t\t\tReFlashListView reFlashListView) {\n\n\t\tthis.user_list = user_list;\n\t\tthis.inflater = LayoutInflater.from(context);\n\t\tthis.context = context;\n\t\tthis.reFlashListView = reFlashListView;\n\t\ttoRoundBitmap = ToRoundBitmap.getInstance(context);\n\t}\n\n\tpublic void onDateChange(List<User> user_list) {\n\t\tthis.user_list = user_list;\n\t\tthis.notifyDataSetChanged();\n\t}\n\n\tpublic void setPosition(int position) {\n\t\tToast.makeText(context, position + \"\", Toast.LENGTH_SHORT).show();\n\t\tthis.position = position;\n\t}\n\n\t@Override\n\tpublic int getCount() {\n\t\t// TODO Auto-generated method stub\n\t\treturn this.user_list.size();\n\t}\n\n\t@Override\n\tpublic Object getItem(int position) {\n\t\t// TODO Auto-generated method stub\n\n\t\treturn this.user_list.get(position);\n\t}\n\n\t@Override\n\tpublic long getItemId(int position) {\n\t\t// TODO Auto-generated method stub\n\n\t\treturn position;\n\t}\n\n\t@Override\n\tpublic View getView(final int position, View convertView, ViewGroup parent) {\n\t\t// TODO Auto-generated method stub\n\n\t\tuser = user_list.get(position);\n\t\tViewHolder viewHolder;\n\t\tView view;\n\t\tif (convertView == null) {\n\t\t\tview = inflater.inflate(R.layout.member_add_list, null);\n\t\t\tviewHolder = new ViewHolder();\n\t\t\tviewHolder.picture = (ImageView) view\n\t\t\t\t\t.findViewById(R.id.member_add_list_picture);\n\t\t\tviewHolder.name = (TextView) view\n\t\t\t\t\t.findViewById(R.id.member_add_list_name);\n\t\t\tviewHolder.steps = (TextView) view\n\t\t\t\t\t.findViewById(R.id.member_add_list_steps);\n\t\t\tviewHolder.add = (TextView) view.findViewById(R.id.already_add);\n\t\t\tviewHolder.btn = (Button) view\n\t\t\t\t\t.findViewById(R.id.member_add_list_button);\n\t\t\tviewHolder.bitmap = toRoundBitmap.toRoundBitmap(PictureUtil\n\t\t\t\t\t.Byte2Bitmap(user.getPicture()));\n\t\t\t;\n\t\t\tview.setTag(viewHolder);\n\t\t} else {\n\t\t\tview = convertView;\n\t\t\tviewHolder = (ViewHolder) view.getTag();\n\t\t}\n\n\t\tviewHolder.picture.setImageBitmap(viewHolder.bitmap);\n\n\t\tviewHolder.name.setText(user.getName());\n\t\tviewHolder.steps.setText(user.getToday_step() + \"\");\n\n\t\tpedometerDB = PedometerDB.getInstance(context);\n\t\tUser user1 = pedometerDB.loadUser(user.getObjectId());\n\n\t\tif (user1 != null) {\n\t\t\tviewHolder.add.setVisibility(View.VISIBLE);\n\t\t\tviewHolder.btn.setVisibility(View.GONE);\n\t\t} else {\n\t\t\tviewHolder.add.setVisibility(View.GONE);\n\t\t\tviewHolder.btn.setVisibility(View.VISIBLE);\n\t\t\tuser = user_list.get(this.position);\n\n\t\t\tviewHolder.btn.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\tuser = user_list.get(position);\n\t\t\t\t\tpedometerDB.saveUser(user);\n\t\t\t\t\tGroup group = pedometerDB.loadGroup(user.getGroupId());\n\t\t\t\t\tif (group != null) {\n\t\t\t\t\t\tgroup.setTotal_number(group.getTotal_number()\n\t\t\t\t\t\t\t\t+ user.getToday_step());\n\t\t\t\t\t\tgroup.setMember_number(group.getMember_number() + 1);\n\t\t\t\t\t\tpedometerDB.updateGroup(group);\n\t\t\t\t\t\tMyAdapter.this.notifyDataSetChanged();\n\t\t\t\t\t\treFlashListView.invalidate();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tToast.makeText(context, \"group is null \",\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn view;\n\t}\n\n\tprivate class ViewHolder {\n\t\tImageView picture;\n\t\tTextView name;\n\t\tTextView steps;\n\t\tTextView add;\n\t\tButton btn;\n\t\tBitmap bitmap;\n\t}\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/fragment/tools/MyListAdapter.java",
    "content": "package com.bit.pedometer.ui.fragment.tools;\n\nimport java.util.List;\n\nimport com.bit.pedometer.R;\nimport com.bit.pedometer.data.bean.User;\n\nimport android.content.Context;\nimport android.graphics.Bitmap;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.BaseAdapter;\nimport android.widget.ImageView;\nimport android.widget.TextView;\n\n/**\n * 这是为多人PK页面写的一个适配器。\n * \n * @author Administrator\n *\n */\npublic class MyListAdapter extends BaseAdapter {\n\tprivate Context context;\n\tprivate List<User> users;\n\tprivate ReFlashListView reFlashListView;\n\tprivate ToRoundBitmap toRoundBitmap;\n\n\tpublic MyListAdapter(Context context, List<User> users,\n\t\t\tReFlashListView reFlashListView) {\n\t\tthis.context = context;\n\t\tthis.users = users;\n\t\tthis.reFlashListView = reFlashListView;\n\t\ttoRoundBitmap = ToRoundBitmap.getInstance(context);\n\t}\n\n\tpublic void changeData(List<User> users) {\n\t\tthis.users = users;\n\t\tthis.notifyDataSetChanged();\n\t}\n\n\t@Override\n\tpublic int getCount() {\n\t\t// TODO Auto-generated method stub\n\t\treturn users.size();\n\t}\n\n\t@Override\n\tpublic User getItem(int position) {\n\t\t// TODO Auto-generated method stub\n\t\treturn users.get(position);\n\t}\n\n\t@Override\n\tpublic long getItemId(int position) {\n\t\t// TODO Auto-generated method stub\n\t\treturn position;\n\t}\n\n\t@Override\n\tpublic View getView(int position, View convertView, ViewGroup arg2) {\n\t\tUser user = getItem(position);\n\t\tView view;\n\t\tViewHolder viewHolder;\n\t\tif (convertView == null) {\n\t\t\tview = LayoutInflater.from(context).inflate(R.layout.member_list,\n\t\t\t\t\tnull);\n\t\t\tviewHolder = new ViewHolder();\n\t\t\tviewHolder.name = (TextView) view.findViewById(R.id.name);\n\t\t\tviewHolder.number = (TextView) view.findViewById(R.id.number);\n\t\t\tviewHolder.steps = (TextView) view.findViewById(R.id.steps);\n\t\t\tviewHolder.picture = (ImageView) view.findViewById(R.id.pic);\n\n\t\t\tview.setTag(viewHolder);\n\n\t\t} else {\n\t\t\tview = convertView;\n\t\t\tviewHolder = (ViewHolder) view.getTag();\n\t\t}\n\t\tviewHolder.bitmap = toRoundBitmap.toRoundBitmap(PictureUtil\n\t\t\t\t.Byte2Bitmap(user.getPicture()));\n\t\tviewHolder.name.setText(user.getName());\n\t\tviewHolder.steps.setText(user.getToday_step() + \"\");\n\t\tviewHolder.picture.setImageBitmap(viewHolder.bitmap);\n\t\tviewHolder.number.setText((position + 1) + \"\");\n\t\treturn view;\n\t}\n\n\tprivate class ViewHolder {\n\t\tImageView picture;\n\t\tTextView name;\n\t\tTextView steps;\n\t\tTextView number;\n\t\tBitmap bitmap;\n\t}\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/fragment/tools/MyNumberPicker.java",
    "content": "package com.bit.pedometer.ui.fragment.tools;\n\nimport android.content.Context;\nimport android.graphics.Color;\nimport android.util.AttributeSet;\nimport android.view.View;\nimport android.widget.EditText;\nimport android.widget.NumberPicker;\n\npublic class MyNumberPicker extends NumberPicker {\n\n\tpublic MyNumberPicker(Context context, AttributeSet attrs, int defStyle) {\n\t\tsuper(context, attrs, defStyle);\n\t\t// TODO Auto-generated constructor stub\n\t}\n\n\tpublic MyNumberPicker(Context context, AttributeSet attrs) {\n\t\tsuper(context, attrs);\n\t\t// TODO Auto-generated constructor stub\n\t}\n\n\tpublic MyNumberPicker(Context context) {\n\t\tsuper(context);\n\t\t// TODO Auto-generated constructor stub\n\t}\n\n\t@Override\n\tpublic void addView(View child) {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.addView(child);\n\t\tupdateView(child);\n\t}\n\n\t@Override\n\tpublic void addView(View child, int index,\n\t\t\tandroid.view.ViewGroup.LayoutParams params) {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.addView(child, index, params);\n\t\tupdateView(child);\n\t}\n\n\t@Override\n\tpublic void addView(View child, android.view.ViewGroup.LayoutParams params) {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.addView(child, params);\n\t\tupdateView(child);\n\t}\n\n\tpublic void updateView(View view) {\n\t\tif (view instanceof EditText) {\n\t\t\t// 这里修改字体的属性\n\t\t\t((EditText) view).setTextSize(20);\n\t\t\t((EditText) view).setTextColor(Color.BLUE);\n\t\t}\n\t}\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/fragment/tools/PictureUtil.java",
    "content": "package com.bit.pedometer.ui.fragment.tools;\n\nimport java.io.ByteArrayInputStream;\nimport java.io.ByteArrayOutputStream;\nimport java.io.IOException;\n\nimport android.graphics.Bitmap;\nimport android.graphics.Bitmap.Config;\nimport android.graphics.BitmapFactory;\nimport android.graphics.Canvas;\nimport android.graphics.PixelFormat;\nimport android.graphics.drawable.Drawable;\n\npublic class PictureUtil {\n\t\n\tpublic static Bitmap compressBmpFromBmp(Bitmap image) {  \n        ByteArrayOutputStream baos = new ByteArrayOutputStream();  \n        int options = 100;  \n        image.compress(Bitmap.CompressFormat.JPEG, 100, baos);  \n        while (baos.toByteArray().length / 1024 > 100) {   \n            baos.reset();  \n            options -= 10;  \n            image.compress(Bitmap.CompressFormat.JPEG, options, baos);  \n        }  \n        ByteArrayInputStream isBm = new ByteArrayInputStream(baos.toByteArray());  \n        Bitmap bitmap = BitmapFactory.decodeStream(isBm, null, null);  \n        return bitmap;  \n    }  \n\n\tpublic static Bitmap compressByScale(Bitmap image) {\n\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\timage.compress(Bitmap.CompressFormat.JPEG, 100, baos);\n\t\tif (baos.toByteArray().length / 1024 > 1024) {// 判断如果图片大于1M,进行压缩避免在生成图片（BitmapFactory.decodeStream）时溢出\n\t\t\tbaos.reset();// 重置baos即清空baos\n\t\t\timage.compress(Bitmap.CompressFormat.JPEG, 50, baos);// 这里压缩50%，把压缩后的数据存放到baos中\n\t\t}\n\t\tByteArrayInputStream isBm = new ByteArrayInputStream(baos.toByteArray());\n\t\tBitmapFactory.Options newOpts = new BitmapFactory.Options();\n\t\t// 开始读入图片，此时把options.inJustDecodeBounds 设回true了\n\t\tnewOpts.inJustDecodeBounds = true;\n\t\tBitmap bitmap = BitmapFactory.decodeStream(isBm, null, newOpts);\n\t\tnewOpts.inJustDecodeBounds = false;\n\t\tint w = newOpts.outWidth;\n\t\tint h = newOpts.outHeight;\n\t\t// 现在主流手机比较多是800*480分辨率，所以高和宽我们设置为\n\t\tfloat hh = 800f;// 这里设置高度为800f\n\t\tfloat ww = 480f;// 这里设置宽度为480f\n\t\t// 缩放比。由于是固定比例缩放，只用高或者宽其中一个数据进行计算即可\n\t\tint be = 1;// be=1表示不缩放\n\t\tif (w > h && w > ww) {// 如果宽度大的话根据宽度固定大小缩放\n\t\t\tbe = (int) (newOpts.outWidth / ww);\n\t\t} else if (w < h && h > hh) {// 如果高度高的话根据宽度固定大小缩放\n\t\t\tbe = (int) (newOpts.outHeight / hh);\n\t\t}\n\t\tif (be <= 0)\n\t\t\tbe = 1;\n\t\tnewOpts.inSampleSize = be;// 设置缩放比例\n\t\tnewOpts.inPreferredConfig = Config.RGB_565;// 降低图片从ARGB888到RGB565\n\t\t// 重新读入图片，注意此时已经把options.inJustDecodeBounds 设回false了\n\t\tisBm = new ByteArrayInputStream(baos.toByteArray());\n\t\tbitmap = BitmapFactory.decodeStream(isBm, null, newOpts);\n\t\treturn compressImage(bitmap);// 压缩好比例大小后再进行质量压缩\n\t}\n\n\tpublic static Bitmap compressImage(Bitmap image) {\n\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\timage.compress(Bitmap.CompressFormat.JPEG, 100, baos);// 质量压缩方法，这里100表示不压缩，把压缩后的数据存放到baos中\n\t\tint options = 100;\n\t\twhile (baos.toByteArray().length / 1024 > 100) { // 循环判断如果压缩后图片是否大于100kb,大于继续压缩\n\t\t\tbaos.reset();// 重置baos即清空baos\n\t\t\toptions -= 10;// 每次都减少10\n\t\t\timage.compress(Bitmap.CompressFormat.JPEG, options, baos);// 这里压缩options%，把压缩后的数据存放到baos中\n\n\t\t}\n\t\tByteArrayInputStream isBm = new ByteArrayInputStream(baos.toByteArray());// 把压缩后的数据baos存放到ByteArrayInputStream中\n\t\tBitmap bitmap = BitmapFactory.decodeStream(isBm, null, null);// 把ByteArrayInputStream数据生成图片\n\t\treturn bitmap;\n\t}\n\n\tpublic static byte[] Bitmap2Byte(Bitmap bitmap) {\n\t\tByteArrayOutputStream out = new ByteArrayOutputStream();\n\t\tbitmap.compress(Bitmap.CompressFormat.JPEG, 100, out);\n\t\ttry {\n\t\t\tout.flush();\n\t\t\tout.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn out.toByteArray();\n\t}\n\n\tpublic static Bitmap Byte2Bitmap(byte[] temp) {\n\t\tif (temp != null) {\n\t\t\tBitmap bitmap = BitmapFactory.decodeByteArray(temp, 0, temp.length);\n\t\t\treturn bitmap;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}\n\n\tpublic static Bitmap drawable2Bitmap(Drawable drawable) {\n\t\tint width = drawable.getIntrinsicWidth();\n\t\tint height = drawable.getIntrinsicHeight();\n\t\tBitmap bitmap = Bitmap.createBitmap(width, height, drawable\n\t\t\t\t.getOpacity() != PixelFormat.OPAQUE ? Bitmap.Config.ARGB_8888\n\t\t\t\t: Bitmap.Config.RGB_565);\n\t\tCanvas canvas = new Canvas(bitmap);\n\t\tdrawable.setBounds(0, 0, width, height);\n\t\tdrawable.draw(canvas);\n\t\treturn bitmap;\n\t}\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/fragment/tools/ReFlashListView.java",
    "content": "package com.bit.pedometer.ui.fragment.tools;\n\nimport java.text.SimpleDateFormat;\nimport java.util.Date;\n\nimport com.bit.pedometer.R;\n\nimport android.annotation.SuppressLint;\nimport android.content.Context;\nimport android.util.AttributeSet;\nimport android.util.Log;\nimport android.view.LayoutInflater;\nimport android.view.MotionEvent;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.view.animation.RotateAnimation;\nimport android.widget.AbsListView;\nimport android.widget.AbsListView.OnScrollListener;\nimport android.widget.ImageView;\nimport android.widget.LinearLayout;\nimport android.widget.ListView;\nimport android.widget.ProgressBar;\nimport android.widget.TextView;\n\npublic class ReFlashListView extends ListView implements OnScrollListener, View.OnTouchListener {\n    private View header;// 顶部布局文件；\n    int headerHeight;// 顶部布局文件的高度；\n    int firstVisibleItem;// 当前第一个可见的item的位置；\n    int visibleItemCount;\n    int totalItemCount;\n    int scrollState;// listview 当前滚动状态；\n    boolean isRemark;// 标记，当前是在listview最顶端摁下的；\n    int startY;// 摁下时的Y值；\n\n    int state;// 当前的状态；\n    final int NONE = 0;// 正常状态；\n    final int PULL = 1;// 提示下拉状态；\n    final int RELESE = 2;// 提示释放状态；\n    final int REFLASHING = 3;// 刷新状态；\n    private IReflashListener iReflashListener;// 刷新数据的接口\n\n    private LinearLayout listView;\n\n\n    public ReFlashListView(Context context, AttributeSet attrs) {\n        super(context, attrs);\n        // TODO Auto-generated constructor stub\n        initView(context);\n    }\n\n\n    /**\n     * 初始化界面，添加顶部布局文件到 listview\n     *\n     * @param context\n     */\n    private void initView(Context context) {\n        LayoutInflater inflater = LayoutInflater.from(context);\n        header = inflater.inflate(R.layout.header_layout, null);\n        measureView(header);\n        headerHeight = header.getMeasuredHeight();\n        Log.i(\"tag\", \"headerHeight = \" + headerHeight);\n        topPadding(-headerHeight);\n        this.setOnTouchListener(this);\n        this.addHeaderView(header);\n\n        this.setOnScrollListener(this);\n    }\n\n    @Override\n    protected void onLayout(boolean changed, int l, int t, int r, int b) {\n        super.onLayout(changed, l, t, r, b);\n        if (changed) {\n            listView = (LinearLayout) this.getChildAt(0);\n\n        }\n    }\n\n    /**\n     * 通知父布局，占用的宽，高；\n     *\n     * @param view\n     */\n    private void measureView(View view) {\n        ViewGroup.LayoutParams p = view.getLayoutParams();\n        if (p == null) {\n            p = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,\n                    ViewGroup.LayoutParams.WRAP_CONTENT);\n        }\n        int width = ViewGroup.getChildMeasureSpec(0, 0, p.width);\n        int height;\n        int tempHeight = p.height;\n        if (tempHeight > 0) {\n            height = MeasureSpec.makeMeasureSpec(tempHeight,\n                    MeasureSpec.EXACTLY);\n        } else {\n            height = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);\n        }\n        view.measure(width, height);\n    }\n\n    /**\n     * 设置header 布局 上边距；\n     *\n     * @param topPadding\n     */\n    private void topPadding(int topPadding) {\n        // topPadding = topPadding / 2;\n        // if (topPadding > getMeasuredHeight() / 3) {\n        // topPadding = getMeasuredHeight() / 3;\n        // }\n        header.setPadding(header.getPaddingLeft(), topPadding,\n                header.getPaddingRight(), header.getPaddingBottom());\n        header.invalidate();\n    }\n\n    @Override\n    public void onScroll(AbsListView view, int firstVisibleItem,\n                         int visibleItemCount, int totalItemCount) {\n        // TODO Auto-generated method stub\n        this.firstVisibleItem = firstVisibleItem;\n        this.visibleItemCount = visibleItemCount;\n        this.totalItemCount = totalItemCount;\n    }\n\n    @Override\n    public void onScrollStateChanged(AbsListView view, int scrollState) {\n        // TODO Auto-generated method stub\n        this.scrollState = scrollState;\n    }\n\n    @Override\n    public boolean onTouch(View v, MotionEvent ev) {\n        // TODO Auto-generated method stub\n        switch (ev.getAction()) {\n            case MotionEvent.ACTION_DOWN:\n                if (firstVisibleItem == 0) {\n                    isRemark = true;\n                    startY = (int) ev.getY();\n                }\n                break;\n\n            case MotionEvent.ACTION_MOVE:\n                onMove(ev);\n                break;\n            case MotionEvent.ACTION_UP:\n\n                if (state == RELESE) {\n                    state = REFLASHING;\n                    // 加载最新数据；\n                    reflashViewByState();\n                    iReflashListener.onReflash();\n                } else if (state == PULL) {\n\n                    state = NONE;\n                    isRemark = false;\n                    reflashViewByState();\n                }\n                break;\n        }\n        return false;\n    }\n\n\n    /**\n     * 判断移动过程操作；\n     *\n     * @param ev\n     */\n    private void onMove(MotionEvent ev) {\n        if (!isRemark) {\n            return;\n        }\n        int tempY = (int) ev.getY();\n        int space = tempY - startY;\n        int topPadding = (space / 2) - headerHeight;\n        switch (state) {\n            case NONE:\n                if (space > 0) {\n                    state = PULL;\n                    reflashViewByState();\n                }\n                break;\n            case PULL:\n                topPadding(topPadding);\n                if (space > headerHeight + 30\n                        && scrollState == SCROLL_STATE_TOUCH_SCROLL) {\n                    state = RELESE;\n                    reflashViewByState();\n                }\n                break;\n            case RELESE:\n                topPadding(topPadding);\n                if (space < headerHeight + 30) {\n                    state = PULL;\n                    reflashViewByState();\n                } else if (space <= 0) {\n                    state = NONE;\n                    isRemark = false;\n                    reflashViewByState();\n                }\n                break;\n        }\n    }\n\n    /**\n     * 根据当前状态，改变界面显示；\n     */\n    private void reflashViewByState() {\n        TextView tip = (TextView) header.findViewById(R.id.tip);\n        ImageView arrow = (ImageView) header.findViewById(R.id.arrow);\n        ProgressBar progress = (ProgressBar) header.findViewById(R.id.progress);\n        RotateAnimation anim = new RotateAnimation(0, 180,\n                RotateAnimation.RELATIVE_TO_SELF, 0.5f,\n                RotateAnimation.RELATIVE_TO_SELF, 0.5f);\n        anim.setDuration(500);\n        anim.setFillAfter(true);\n        RotateAnimation anim1 = new RotateAnimation(180, 0,\n                RotateAnimation.RELATIVE_TO_SELF, 0.5f,\n                RotateAnimation.RELATIVE_TO_SELF, 0.5f);\n        anim1.setDuration(500);\n        anim1.setFillAfter(true);\n        switch (state) {\n            case NONE:\n                arrow.clearAnimation();\n                topPadding(-headerHeight);\n                break;\n\n            case PULL:\n                arrow.setVisibility(View.VISIBLE);\n                progress.setVisibility(View.GONE);\n                tip.setText(\"下拉可以刷新！\");\n                arrow.clearAnimation();\n                arrow.setAnimation(anim1);\n                break;\n            case RELESE:\n                arrow.setVisibility(View.VISIBLE);\n                progress.setVisibility(View.GONE);\n                tip.setText(\"松开可以刷新！\");\n                arrow.clearAnimation();\n                arrow.setAnimation(anim);\n                break;\n            case REFLASHING:\n                topPadding(50);\n                arrow.setVisibility(View.GONE);\n                progress.setVisibility(View.VISIBLE);\n                tip.setText(\"正在刷新...\");\n                arrow.clearAnimation();\n                break;\n        }\n    }\n\n    /**\n     * 获取完数据；\n     */\n    @SuppressLint(\"SimpleDateFormat\")\n    public void reflashComplete() {\n        state = NONE;\n        isRemark = false;\n        reflashViewByState();\n        TextView lastupdatetime = (TextView) header\n                .findViewById(R.id.lastupdate_time);\n        SimpleDateFormat format = new SimpleDateFormat(\"yyyy年MM月dd日 hh:mm:ss\");\n        Date date = new Date(System.currentTimeMillis());\n        String time = format.format(date);\n        lastupdatetime.setText(time);\n    }\n\n    public void setInterface(IReflashListener iReflashListener) {\n        this.iReflashListener = iReflashListener;\n    }\n\n\n    /**\n     * 刷新数据接口\n     *\n     * @author Administrator\n     */\n    public interface IReflashListener {\n        public void onReflash();\n    }\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/fragment/tools/ToRoundBitmap.java",
    "content": "package com.bit.pedometer.ui.fragment.tools;\n\nimport android.content.Context;\nimport android.graphics.Bitmap;\nimport android.graphics.Canvas;\nimport android.graphics.Paint;\nimport android.graphics.PorterDuffXfermode;\nimport android.graphics.Rect;\nimport android.graphics.RectF;\nimport android.graphics.Bitmap.Config;\nimport android.graphics.PorterDuff.Mode;\n\npublic class ToRoundBitmap {\n\n\tprivate static ToRoundBitmap toRoundBitmap;\n\n\tprivate ToRoundBitmap(Context context) {\n\t}\n\n\tpublic static ToRoundBitmap getInstance(Context context) {\n\t\tif (toRoundBitmap == null) {\n\t\t\ttoRoundBitmap = new ToRoundBitmap(context);\n\t\t}\n\n\t\treturn toRoundBitmap;\n\t}\n\n\tpublic Bitmap toRoundBitmap(Bitmap bitmap) {\n\t\tint width = bitmap.getWidth();\n\t\tint height = bitmap.getHeight();\n\t\tfloat roundPx;\n\t\tfloat left, top, right, bottom, dst_left, dst_top, dst_right, dst_bottom;\n\t\tif (width <= height) {\n\t\t\troundPx = width / 2;\n\n\t\t\tleft = 0;\n\t\t\ttop = 0;\n\t\t\tright = width;\n\t\t\tbottom = width;\n\n\t\t\theight = width;\n\n\t\t\tdst_left = 0;\n\t\t\tdst_top = 0;\n\t\t\tdst_right = width;\n\t\t\tdst_bottom = width;\n\t\t} else {\n\t\t\troundPx = height / 2;\n\n\t\t\tfloat clip = (width - height) / 2;\n\n\t\t\tleft = clip;\n\t\t\tright = width - clip;\n\t\t\ttop = 0;\n\t\t\tbottom = height;\n\t\t\twidth = height;\n\n\t\t\tdst_left = 0;\n\t\t\tdst_top = 0;\n\t\t\tdst_right = height;\n\t\t\tdst_bottom = height;\n\t\t}\n\n\t\tBitmap output = Bitmap.createBitmap(width, height, Config.ARGB_8888);\n\t\tCanvas canvas = new Canvas(output);\n\n\t\tfinal Paint paint = new Paint();\n\t\tfinal Rect src = new Rect((int) left, (int) top, (int) right,\n\t\t\t\t(int) bottom);\n\t\tfinal Rect dst = new Rect((int) dst_left, (int) dst_top,\n\t\t\t\t(int) dst_right, (int) dst_bottom);\n\t\tfinal RectF rectF = new RectF(dst);\n\n\t\tpaint.setAntiAlias(true);// 设置画笔无锯齿\n\n\t\tcanvas.drawARGB(0, 0, 0, 0); // 填充整个Canvas\n\n\t\t// 以下有两种方法画圆,drawRounRect和drawCircle\n\t\tcanvas.drawRoundRect(rectF, roundPx, roundPx, paint);// 画圆角矩形，第一个参数为图形显示区域，第二个参数和第三个参数分别是水平圆角半径和垂直圆角半径。\n\t\t// canvas.drawCircle(roundPx, roundPx, roundPx, paint);\n\n\t\tpaint.setXfermode(new PorterDuffXfermode(Mode.SRC_IN));// 设置两张图片相交时的模式,参考http://trylovecatch.iteye.com/blog/1189452\n\t\tcanvas.drawBitmap(bitmap, src, dst, paint); // 以Mode.SRC_IN模式合并bitmap和已经draw了的Circle\n\n\t\treturn output;\n\t}\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/view/CircleBar.java",
    "content": "package com.bit.pedometer.ui.view;\n\nimport com.bit.pedometer.ui.fragment.tools.DisplayUtil;\nimport com.bit.pedometer.data.bean.Weather;\n\nimport android.annotation.SuppressLint;\nimport android.content.Context;\nimport android.graphics.Canvas;\nimport android.graphics.Color;\nimport android.graphics.Paint;\nimport android.graphics.Rect;\nimport android.graphics.RectF;\nimport android.graphics.Paint.Align;\nimport android.graphics.Paint.Style;\nimport android.util.AttributeSet;\nimport android.view.View;\nimport android.view.animation.Animation;\nimport android.view.animation.Transformation;\n\n/**\n * 这是继承view的一个重新绘图的圆圈的一个类 Author: liyachao email:296777513@qq.com Date: 2015-1-5\n * Time: 下午2:39\n */\npublic class CircleBar extends View {\n\n\tprivate RectF mColorWheelRectangle = new RectF();// 圆圈的矩形范围\n\tprivate Paint mDefaultWheelPaint;// 绘制底部灰色圆圈的画笔\n\tprivate Paint mColorWheelPaint;// 绘制蓝色扇形的画笔\n\tprivate Paint textPaint;// 中间文字的画笔\n\tprivate Paint textPaint1;// 上下文字的画笔\n\tprivate float mColorWheelRadius;// 圆圈普通状态下的半径\n\tprivate float circleStrokeWidth;// 圆圈的线条粗细\n\tprivate float pressExtraStrokeWidth;// 按下状态下增加的圆圈线条增加的粗细\n\tprivate int mText;// 中间文字内容\n\tprivate int mCount;// 为了达到数字增加效果而添加的变量，他和mText其实代表一个意思\n\tprivate float mProgressAni;// 为了达到蓝色扇形增加效果而添加的变量，他和mProgress其实代表一个意思\n\tprivate float mProgress;// 扇形弧度\n\tprivate int mTextSize;// 中间文字大小\n\tprivate int mTextSize2;\n\tprivate int mTextSize1;// 上下文字大小\n\tprivate int mDistance;// 上下文字的距离\n\tprivate int mDistance1;//圆形离父布局的距离\n\tBarAnimation anim;// 动画类\n\tprivate int mType;// 根据传入的数值判断应该显示的页面\n\tprivate Weather weather;\n\tprivate int max = 10000;// 圆形所代表最大的数值\n\n\tpublic CircleBar(Context context) {\n\t\tsuper(context);\n\t\tinit();\n\t}\n\n\tpublic CircleBar(Context context, AttributeSet attrs) {\n\t\tsuper(context, attrs);\n\t\tinit();\n\t}\n\n\tpublic CircleBar(Context context, AttributeSet attrs, int defStyle) {\n\t\tsuper(context, attrs, defStyle);\n\t\tinit();\n\t}\n\n\tprivate void init() {\n\n\t\tcircleStrokeWidth = DisplayUtil.dip2px(getContext(), 20);// 圆圈的线条粗细\n\t\tmTextSize = DisplayUtil.sp2px(getContext(), 80);// 中间文字大小\n\t\tmTextSize2 = DisplayUtil.sp2px(getContext(), 50);\n\t\tmTextSize1 = DisplayUtil.sp2px(getContext(), 25);// 上下文字大小\n\t\tmDistance = DisplayUtil.dip2px(getContext(), 60);// 文字间的距离\n\t\tmDistance1 = DisplayUtil.dip2px(getContext(), 20);//圆圈离父布局的距离\n\n\t\t// 绘制蓝色扇形的画笔\n\t\tmColorWheelPaint = new Paint();\n\t\tmColorWheelPaint.setAntiAlias(true);// 抗锯齿\n\t\tmColorWheelPaint.setColor(0xFF29a6f6);// 设置颜色\n\t\tmColorWheelPaint.setStyle(Paint.Style.STROKE);// 设置空心\n\t\tmColorWheelPaint.setStrokeCap(Paint.Cap.ROUND);//设置圆形画笔\n\t\tmColorWheelPaint.setStrokeWidth(circleStrokeWidth);// 设置圆圈粗细\n\n\t\t// 绘制底部灰色圆圈的画笔\n\t\tmDefaultWheelPaint = new Paint();\n\t\tmDefaultWheelPaint.setAntiAlias(true);\n\t\tmDefaultWheelPaint.setColor(0xFFeeefef);\n\t\tmDefaultWheelPaint.setStyle(Paint.Style.STROKE);\n\t\tmDefaultWheelPaint.setStrokeWidth(circleStrokeWidth);\n\n\t\t// 中间文字的画笔\n\t\ttextPaint = new Paint(Paint.LINEAR_TEXT_FLAG);\n\t\ttextPaint.setAntiAlias(true);\n\t\ttextPaint.setColor(Color.parseColor(\"#6DCAEC\"));\n\t\ttextPaint.setStyle(Style.FILL_AND_STROKE);\n\t\ttextPaint.setTextAlign(Align.LEFT);\n\t\ttextPaint.setTextSize(mTextSize);\n\n\t\t// 上下文字的画笔\n\t\ttextPaint1 = new Paint(Paint.LINEAR_TEXT_FLAG);\n\t\ttextPaint1.setAntiAlias(true);\n\t\ttextPaint1.setColor(Color.parseColor(\"#a1a3a6\"));\n\t\ttextPaint1.setStyle(Style.FILL_AND_STROKE);\n\t\ttextPaint1.setTextAlign(Align.LEFT);\n\t\ttextPaint1.setTextSize(mTextSize1);\n\n\t\t// 中间文字内容\n\t\tmText = 0;\n\t\t// 扇形弧度\n\t\tmProgress = 0;\n\n\t\t// 动画类\n\t\tanim = new BarAnimation();\n\t\tanim.setDuration(1000);\n\n\t}\n\n\t@SuppressLint(\"DrawAllocation\")\n\t@Override\n\tprotected void onDraw(Canvas canvas) {\n\t\tint halfHeight = getHeight() / 2;\n\t\tint halfWidth = getWidth() / 2;\n\t\tint radius = halfHeight < halfWidth ? halfHeight : halfWidth;\n\t\t// 圆圈的矩形范围 绘制底部灰色圆圈的画笔\n\t\tcanvas.drawCircle(halfWidth, halfHeight, radius - mDistance1,\n\t\t\t\tmDefaultWheelPaint);\n\n\t\t// canvas.drawArc(mColorWheelRectangle, -90, 360, false,\n\t\t// mDefaultWheelPaint);\n\t\t// 为了达到蓝色扇形增加效果而添加的变量，他和mSweepAngle其实代表一个意思\n\n\t\t// mColorWheelRectangle是绘制蓝色扇形的画笔\n\t\tmColorWheelRectangle.top = halfHeight - radius + mDistance1;\n\t\tmColorWheelRectangle.bottom = halfHeight + radius - mDistance1;\n\t\tmColorWheelRectangle.left = halfWidth - radius + mDistance1;\n\t\tmColorWheelRectangle.right = halfWidth + radius - mDistance1;\n\t\t// 根据mProgressAni（角度）画扇形\n\t\tcanvas.drawArc(mColorWheelRectangle, -90, mProgressAni, false,\n\t\t\t\tmColorWheelPaint);\n\t\tRect bounds = new Rect();\n\t\tString middleText = \"\";// 中间的文字\n\t\tString upText = \"\";// 上面文字\n\t\tString downText = \"\";// 底部文字\n\n\t\tif (this.mType == 1) {// 第一个页面\n\t\t\tupText = \"步数\";\n\t\t\tdownText = \"目标:10000\";\n\t\t\tmiddleText = String.valueOf(mCount);\n\t\t} else if (this.mType == 2) {// 第二个页面\n\t\t\tupText = \"卡路里\";\n\t\t\tdownText = \"目标:10000\";\n\t\t\tmiddleText = String.valueOf(mCount);\n\t\t} else if (this.mType == 3) {// 第三个页面\n\t\t\tupText = weather.getPtime();\n\t\t\tdownText = weather.getTemp1() + \"~\" + weather.getTemp2();\n\t\t\tmiddleText = weather.getWeather();\n\t\t\ttextPaint.setTextSize(mTextSize2);\n\t\t\t// textPaint1.setTextSize(mTextSize);\n\t\t}\n\t\t// 获得当前画笔绘制文本的宽和高\n\t\ttextPaint.getTextBounds(middleText, 0, middleText.length(), bounds);\n\t\t// drawText各个属性的意思(文字,x坐标,y坐标,画笔)\n\t\tcanvas.drawText(middleText, (mColorWheelRectangle.centerX())\n\t\t\t\t- (textPaint.measureText(middleText) / 2),\n\t\t\t\tmColorWheelRectangle.centerY() + bounds.height() / 2, textPaint);\n\t\ttextPaint1.getTextBounds(upText, 0, upText.length(), bounds);\n\t\tcanvas.drawText(\n\t\t\t\tupText,\n\t\t\t\t(mColorWheelRectangle.centerX())\n\t\t\t\t\t\t- (textPaint1.measureText(upText) / 2),\n\t\t\t\tmColorWheelRectangle.centerY() + bounds.height() / 2\n\t\t\t\t\t\t- mDistance, textPaint1);\n\t\ttextPaint1.getTextBounds(downText, 0, downText.length(), bounds);\n\t\tcanvas.drawText(downText, (mColorWheelRectangle.centerX())\n\t\t\t\t- (textPaint1.measureText(downText) / 2),\n\t\t\t\tmColorWheelRectangle.centerY() + bounds.height() / 2\n\t\t\t\t\t\t+ mDistance, textPaint1);\n\t}\n\n\t// 测量父布局的大小\n\tprotected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n\t\tint height = getDefaultSize(getSuggestedMinimumHeight(),\n\t\t\t\theightMeasureSpec);\n\t\tint width = getDefaultSize(getSuggestedMinimumWidth(), widthMeasureSpec);\n\t\tint min = Math.min(width, height);\n\t\tsetMeasuredDimension(min, min);\n\t\tmColorWheelRadius = min - circleStrokeWidth - pressExtraStrokeWidth;\n\n\t\t// set方法的参数意思：left,top,right,bottom\n\t\tmColorWheelRectangle.set(circleStrokeWidth + pressExtraStrokeWidth,\n\t\t\t\tcircleStrokeWidth + pressExtraStrokeWidth, mColorWheelRadius,\n\t\t\t\tmColorWheelRadius);\n\t}\n\n\t// 对外的一个接口，用来开启动画\n\tpublic void startCustomAnimation() {\n\t\tthis.startAnimation(anim);\n\t}\n\n\t// 第三个页面用于显示天气\n\tpublic void setWeather(Weather weather) {\n\t\tthis.weather = weather;\n\t\tthis.mType = 3;\n\t\tthis.mProgress = 360;\n\t//\tthis.startCustomAnimation();\n\t\tthis.postInvalidate();\n\t}\n\n\t// 设置最大数值\n\tpublic void setMax(int max) {\n\t\tthis.max = max;\n\t}\n\n\t// 设置圆圈的进度和圆圈所显示的第几个页面\n\tpublic void setProgress(int progress, int mType) {\n\n\t\tif (this.mType != mType) {\n\t\t\tthis.startCustomAnimation();\n\t\t\tmProgress = (Float.valueOf(progress) / Float.valueOf(max)) * 360;\n\t\t\tmText = progress;\n\t\t\tthis.mType = mType;\n\t\t} else {\n\t\t\tthis.mCount = progress;\n\t\t\tthis.mProgressAni = (Float.valueOf(progress) / Float.valueOf(max)) * 360;\n\t\t}\n\n\t\tthis.postInvalidate();// 可以用子线程更新视图的方法调用。\n\t}\n\n\t/**\n\t * 继承animation的一个动画类\n\t * \n\t * @author liyachao\n\t *\n\t */\n\tpublic class BarAnimation extends Animation {\n\t\t/**\n\t\t * Initializes expand collapse animation, has two types, collapse (1)\n\t\t * and expand (0).\n\t\t * \n\t\t * @param view\n\t\t *            The view to animate\n\t\t * @param type\n\t\t *            The type of animation: 0 will expand from gone and 0 size\n\t\t *            to visible and layout size defined in xml. 1 will collapse\n\t\t *            view and set to gone\n\t\t */\n\t\t@Override\n\t\tprotected void applyTransformation(float interpolatedTime,\n\t\t\t\tTransformation t) {\n\t\t\tsuper.applyTransformation(interpolatedTime, t);\n\t\t\tif (interpolatedTime < 1.0f) {\n\t\t\t\tmProgressAni = interpolatedTime * mProgress;\n\t\t\t\tmCount = (int) (interpolatedTime * mText);\n\t\t\t} else {\n\t\t\t\tmProgressAni = mProgress;\n\t\t\t\tmCount = mText;\n\t\t\t}\n\t\t\tpostInvalidate();\n\n\t\t}\n\t}\n\n}\n"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/view/HistogramView.java",
    "content": "package com.bit.pedometer.ui.view;\n\nimport com.bit.pedometer.R;\nimport com.bit.pedometer.ui.fragment.tools.DisplayUtil;\n\nimport android.annotation.SuppressLint;\nimport android.content.Context;\nimport android.graphics.Bitmap;\nimport android.graphics.BitmapFactory;\nimport android.graphics.Canvas;\nimport android.graphics.Color;\nimport android.graphics.Paint;\nimport android.graphics.Rect;\nimport android.graphics.Paint.Align;\nimport android.util.AttributeSet;\nimport android.view.View;\nimport android.view.animation.Animation;\nimport android.view.animation.Transformation;\n\npublic class HistogramView extends View {\n\n\tprivate Paint xLinePaint;// 坐标轴 轴线 画笔：\n\tprivate Paint hLinePaint;// 坐标轴水平内部 虚线画笔\n\tprivate Paint titlePaint;// 绘制文本的画笔\n\tprivate Paint paint;// 矩形画笔 柱状图的样式信息\n\tprivate int[] progress;// 7 条\n\tprivate int[] aniProgress;// 实现动画的值\n\tprivate final int TRUE = 1;// 在柱状图上显示数字\n\tprivate int[] text;\n\tprivate Bitmap bitmap;\n\t// 坐标轴左侧的数标\n\tprivate String[] ySteps;\n\t// 坐标轴底部的星期数\n\tprivate String[] xWeeks;\n\n\tprivate HistogramAnimation ani;\n\n\tpublic HistogramView(Context context) {\n\t\tsuper(context);\n\t\tinit(context, null);\n\t}\n\n\tpublic HistogramView(Context context, AttributeSet attrs) {\n\t\tsuper(context, attrs);\n\t\t// TODO Auto-generated constructor stub\n\t\tinit(context, attrs);\n\t}\n\n\tprivate void init(Context context, AttributeSet attrs) {\n\n\t\tySteps = new String[] { \"10k\", \"7.5k\", \"5k\", \"2.5k\", \"0\" };\n\t\txWeeks = new String[] { \"周一\", \"周二\", \"周三\", \"周四\", \"周五\", \"周六\", \"周日\" };\n\t\ttext = new int[] { 0, 0, 0, 0, 0, 0, 0 };\n\t\taniProgress = new int[] { 0, 0, 0, 0, 0, 0, 0 };\n\t\tani = new HistogramAnimation();\n\t\tani.setDuration(2000);\n\n\t\txLinePaint = new Paint();\n\t\thLinePaint = new Paint();\n\t\ttitlePaint = new Paint();\n\t\tpaint = new Paint();\n\n\t\txLinePaint.setColor(Color.DKGRAY);\n\t\thLinePaint.setColor(Color.LTGRAY);\n\t\ttitlePaint.setColor(Color.BLACK);\n\t}\n\n\tpublic void setWeekd(String[] xWeeks) {\n\t\tthis.xWeeks = xWeeks;\n\t\tthis.postInvalidate();\n\t}\n\n\tpublic void setText(int[] text) {\n\n\t\tthis.text = text;\n\n\t\tthis.postInvalidate();// 可以子线程 更新视图的方法调用。\n\t}\n\n\tpublic void setProgress(int[] progress) {\n\t\tbitmap = BitmapFactory.decodeResource(getResources(),\n\t\t\t\tR.drawable.column);\n\t\tthis.progress = progress;\n\t\t// this.invalidate(); //失效的意思。\n\t\t// this.postInvalidate(); // 可以子线程 更新视图的方法调用。\n\t\tthis.startAnimation(ani);\n\t}\n\n\t@SuppressLint(\"DrawAllocation\")\n\t@Override\n\tprotected void onDraw(Canvas canvas) {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onDraw(canvas);\n\n\t\tint width = getWidth();\n\t\tint height = getHeight() - dp2px(50);\n\n\t\t// 1 绘制坐标线：startX, startY, stopX, stopY, paint\n\t\t// canvas.drawLine(50, 10, 50, height, xLinePaint);\n\n\t\tcanvas.drawLine(dp2px(30), height + dp2px(3), width - dp2px(30), height\n\t\t\t\t+ dp2px(3), xLinePaint);\n\n\t\t// 2 绘制坐标内部的水平线\n\n\t\tint leftHeight = height - dp2px(5);// 左侧外周的 需要划分的高度：\n\n\t\tint hPerHeight = leftHeight / 4;// 分成四部分\n\n\t\thLinePaint.setTextAlign(Align.CENTER);\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tcanvas.drawLine(dp2px(30), dp2px(10) + i * hPerHeight, width\n\t\t\t\t\t- dp2px(30), dp2px(10) + i * hPerHeight, hLinePaint);\n\t\t}\n\n\t\t// 3 绘制 Y 周坐标\n\n\t\ttitlePaint.setTextAlign(Align.RIGHT);\n\t\ttitlePaint.setTextSize(sp2px(12));\n\t\ttitlePaint.setAntiAlias(true);\n\t\ttitlePaint.setStyle(Paint.Style.FILL);\n\t\tfor (int i = 0; i < ySteps.length; i++) {\n\t\t\tcanvas.drawText(ySteps[i], dp2px(25), dp2px(13) + i * hPerHeight,\n\t\t\t\t\ttitlePaint);\n\t\t}\n\n\t\t// 4 绘制 X 周 做坐标\n\t\tint xAxisLength = width - dp2px(30);\n\t\tint columCount = xWeeks.length + 1;\n\t\tint step = xAxisLength / columCount;\n\n\t\tfor (int i = 0; i < columCount - 1; i++) {\n\t\t\t// text, baseX, baseY, textPaint\n\t\t\tcanvas.drawText(xWeeks[i], dp2px(25) + step * (i + 1),\n\t\t\t\t\theight + dp2px(20), titlePaint);\n\t\t}\n\n\t\t// 5 绘制矩形\n\n\t\tif (aniProgress != null && aniProgress.length > 0) {\n\t\t\tfor (int i = 0; i < aniProgress.length; i++) {// 循环遍历将7条柱状图形画出来\n\t\t\t\tint value = aniProgress[i];\n\t\t\t\tpaint.setAntiAlias(true);// 抗锯齿效果\n\t\t\t\tpaint.setStyle(Paint.Style.FILL);\n\t\t\t\tpaint.setTextSize(sp2px(15));// 字体大小\n\t\t\t\tpaint.setColor(Color.parseColor(\"#6DCAEC\"));// 字体颜色\n\t\t\t\tRect rect = new Rect();// 柱状图的形状\n\n\t\t\t\trect.left = step * (i + 1);\n\t\t\t\trect.right = dp2px(30) + step * (i + 1);\n\t\t\t\tint rh = (int) (leftHeight - leftHeight * (value / 10000.0));\n\t\t\t\trect.top = rh + dp2px(10);\n\t\t\t\trect.bottom = height;\n\n\t\t\t\t\n\n\t\t\t\tcanvas.drawBitmap(bitmap, null, rect, paint);\n\n\t\t\t\tif (this.text[i] == TRUE) {\n\t\t\t\t\tcanvas.drawText(value + \"\", dp2px(15) + step * (i + 1)\n\t\t\t\t\t\t\t- dp2px(15), rh + dp2px(5), paint);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t}\n\n\tprivate int dp2px(int value) {\n\t\treturn DisplayUtil.dip2px(getContext(), value);\n\t}\n\n\tprivate int sp2px(int value) {\n\t\treturn DisplayUtil.sp2px(getContext(), value);\n\t}\n\n\t/**\n\t * 集成animation的一个动画类\n\t * \n\t * @author 李垭超\n\t *\n\t */\n\tprivate class HistogramAnimation extends Animation {\n\t\t@Override\n\t\tprotected void applyTransformation(float interpolatedTime,\n\t\t\t\tTransformation t) {\n\t\t\tsuper.applyTransformation(interpolatedTime, t);\n\t\t\tif (interpolatedTime < 1.0f) {\n\t\t\t\tfor (int i = 0; i < aniProgress.length; i++) {\n\t\t\t\t\taniProgress[i] = (int) (progress[i] * interpolatedTime);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (int i = 0; i < aniProgress.length; i++) {\n\t\t\t\t\taniProgress[i] = progress[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\tinvalidate();\n\t\t}\n\t}\n\n}"
  },
  {
    "path": "pedometer/src/com/bit/pedometer/ui/view/MyDialog.java",
    "content": "package com.bit.pedometer.ui.view;\n\nimport android.app.Dialog;\nimport android.content.Context;\nimport android.os.Bundle;\nimport android.view.View;\nimport android.widget.TextView;\n\nimport com.bit.pedometer.R;\n\n\n/**\n * Created by Android Studio. author: liyachao Date: 15/6/22 Time: 11:40\n */\npublic class MyDialog extends Dialog {\n    Context context;\n\n    /**\n     * 提示框标题\n     */\n    private TextView dialogTitle;\n    /**\n     * 提示框内容\n     */\n    private TextView dialogContent;\n    /**\n     * 提示框同意按钮\n     */\n    private TextView dialogSure;\n    /**\n     * 提示框取消按钮\n     */\n    private TextView dialogCancel;\n\n    private String leftStr = \"取消\";\n    private String rightStr = \"确认\";\n\n    public MyDialog(Context context) {\n        super(context);\n        this.context = context;\n    }\n\n    public MyDialog(Context context, int theme) {\n        super(context, theme);\n        this.context = context;\n    }\n\n    protected MyDialog(Context context, boolean cancelable, OnCancelListener cancelListener) {\n        super(context, cancelable, cancelListener);\n        this.context = context;\n    }\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.dialog_layout);\n        dialogTitle = (TextView) findViewById(R.id.dialog_title);\n        dialogContent = (TextView) findViewById(R.id.dialog_content);\n        dialogSure = (TextView) findViewById(R.id.dialog_sure);\n        dialogCancel = (TextView) findViewById(R.id.dialog_cancel);\n\n        dialogContent.setText(content);\n        dialogTitle.setText(title);\n        dialogCancel.setText(leftStr);\n        dialogSure.setText(rightStr);\n        dialogSure.setOnClickListener(sureListener);\n        dialogCancel.setOnClickListener(cancelListener);\n    }\n\n    private String title;\n    private String content;\n    private View.OnClickListener cancelListener;\n    private View.OnClickListener sureListener;\n\n    public void setDialogTitle(String title) {\n        this.title = title;\n\n    }\n\n    public void setButtonText(String leftBtn, String rightBtn) {\n        this.leftStr = leftBtn;\n        this.rightStr = rightBtn;\n    }\n\n    public void setDialogContent(String content) {\n        this.content = content;\n    }\n\n    public void setMyOnclickListener(View.OnClickListener cancelListener\n            , View.OnClickListener sureListener) {\n        this.cancelListener = cancelListener;\n        this.sureListener = sureListener;\n\n    }\n}\n"
  },
  {
    "path": "settings.gradle",
    "content": "include ':pedometer'\n"
  }
]