Compare commits
23 Commits
master
...
xuhang_bra
Author | SHA1 | Date |
---|---|---|
ram | 2ddaa47425 | |
ram | 150c992c2f | |
ram | f934535d05 | |
ram | 901bc5957c | |
ram | 91a4e1466b | |
ram | 22eeccc855 | |
ram | e7ebadd8fb | |
ram | 6c1a742493 | |
ram | 3bafd50028 | |
ram | a18130c45e | |
ram | b3599841e9 | |
ram | 5bc0b9345d | |
ram | 8623a1e6ea | |
ram | a67a90e849 | |
ram | 39fb66d3ec | |
ram | 76e0c6fb5f | |
ram | 75771e8dbb | |
ram | 238adf5886 | |
ram | 4882dc9389 | |
ram | 3ddd9c87ef | |
ram | 71413acf82 | |
ram | 44118da4c2 | |
ram | ba7b76d1e7 |
|
@ -0,0 +1 @@
|
|||
/文档/图标.jpg
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
|
||||
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
|
||||
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="gen"/>
|
||||
<classpathentry kind="output" path="bin/classes"/>
|
||||
</classpath>
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>WeiXinOpen</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -0,0 +1,3 @@
|
|||
#Thu Mar 29 14:07:16 CST 2012
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -0,0 +1,12 @@
|
|||
#Thu May 17 12:01:16 CST 2012
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.yyy.weixin"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0" >
|
||||
|
||||
<uses-sdk android:minSdkVersion="8" />
|
||||
|
||||
<application
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name" >
|
||||
<activity
|
||||
android:label="@string/app_name"
|
||||
android:name="com.yyy.weixin.TestWeiXinOpen" >
|
||||
<intent-filter >
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name="com.yyy.weixin.OtherActivity"></activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.yyy.weixin"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0" >
|
||||
|
||||
<uses-sdk android:minSdkVersion="8" />
|
||||
|
||||
<application
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name" >
|
||||
<activity
|
||||
android:label="@string/app_name"
|
||||
android:name="com.yyy.weixin.TestWeiXinOpen" >
|
||||
<intent-filter >
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name="com.yyy.weixin.OtherActivity"></activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 161 B |
After Width: | Height: | Size: 166 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 2.1 KiB |
|
@ -0,0 +1,6 @@
|
|||
/** Automatically generated file. DO NOT MODIFY */
|
||||
package com.yyy.weixin;
|
||||
|
||||
public final class BuildConfig {
|
||||
public final static boolean DEBUG = true;
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
/* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*
|
||||
* This class was automatically generated by the
|
||||
* aapt tool from the resource data it found. It
|
||||
* should not be modified by hand.
|
||||
*/
|
||||
|
||||
package com.yyy.weixin;
|
||||
|
||||
public final class R {
|
||||
public static final class anim {
|
||||
public static final int translate_left=0x7f040000;
|
||||
public static final int translate_right=0x7f040001;
|
||||
public static final int zoom_out_enter=0x7f040002;
|
||||
public static final int zoom_out_exit=0x7f040003;
|
||||
}
|
||||
public static final class attr {
|
||||
}
|
||||
public static final class color {
|
||||
public static final int TextColor=0x7f050000;
|
||||
public static final int bgColor=0x7f050001;
|
||||
}
|
||||
public static final class drawable {
|
||||
public static final int button_bg=0x7f020000;
|
||||
public static final int ic_launcher=0x7f020001;
|
||||
public static final int page_indicator_bg=0x7f020002;
|
||||
public static final int page_indicator_focused=0x7f020003;
|
||||
public static final int page_indicator_unfocused=0x7f020004;
|
||||
public static final int show=0x7f020005;
|
||||
public static final int w01=0x7f020006;
|
||||
public static final int w02=0x7f020007;
|
||||
public static final int w03=0x7f020008;
|
||||
public static final int w04=0x7f020009;
|
||||
public static final int w05=0x7f02000a;
|
||||
public static final int w06=0x7f02000b;
|
||||
public static final int w07=0x7f02000c;
|
||||
public static final int w08=0x7f02000d;
|
||||
public static final int whatsnew_bg=0x7f02000e;
|
||||
public static final int whatsnew_btn_nor=0x7f02000f;
|
||||
public static final int whatsnew_btn_pressed=0x7f020010;
|
||||
public static final int whatsnew_left=0x7f020011;
|
||||
public static final int whatsnew_left_m=0x7f020012;
|
||||
public static final int whatsnew_right=0x7f020013;
|
||||
public static final int whatsnew_right_m=0x7f020014;
|
||||
}
|
||||
public static final class id {
|
||||
public static final int ScrollLayout=0x7f070001;
|
||||
public static final int animLayout=0x7f070005;
|
||||
public static final int leftLayout=0x7f070006;
|
||||
public static final int llayout=0x7f070004;
|
||||
public static final int mainRLayout=0x7f070000;
|
||||
public static final int rightLayout=0x7f070007;
|
||||
public static final int startBtn=0x7f070003;
|
||||
public static final int t1=0x7f070002;
|
||||
public static final int textView1=0x7f070008;
|
||||
}
|
||||
public static final class layout {
|
||||
public static final int main=0x7f030000;
|
||||
public static final int other=0x7f030001;
|
||||
}
|
||||
public static final class string {
|
||||
public static final int app_name=0x7f060001;
|
||||
public static final int hello=0x7f060000;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<lint>
|
||||
</lint>
|
|
@ -0,0 +1,40 @@
|
|||
-optimizationpasses 5
|
||||
-dontusemixedcaseclassnames
|
||||
-dontskipnonpubliclibraryclasses
|
||||
-dontpreverify
|
||||
-verbose
|
||||
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
|
||||
|
||||
-keep public class * extends android.app.Activity
|
||||
-keep public class * extends android.app.Application
|
||||
-keep public class * extends android.app.Service
|
||||
-keep public class * extends android.content.BroadcastReceiver
|
||||
-keep public class * extends android.content.ContentProvider
|
||||
-keep public class * extends android.app.backup.BackupAgentHelper
|
||||
-keep public class * extends android.preference.Preference
|
||||
-keep public class com.android.vending.licensing.ILicensingService
|
||||
|
||||
-keepclasseswithmembernames class * {
|
||||
native <methods>;
|
||||
}
|
||||
|
||||
-keepclasseswithmembers class * {
|
||||
public <init>(android.content.Context, android.util.AttributeSet);
|
||||
}
|
||||
|
||||
-keepclasseswithmembers class * {
|
||||
public <init>(android.content.Context, android.util.AttributeSet, int);
|
||||
}
|
||||
|
||||
-keepclassmembers class * extends android.app.Activity {
|
||||
public void *(android.view.View);
|
||||
}
|
||||
|
||||
-keepclassmembers enum * {
|
||||
public static **[] values();
|
||||
public static ** valueOf(java.lang.String);
|
||||
}
|
||||
|
||||
-keep class * implements android.os.Parcelable {
|
||||
public static final android.os.Parcelable$Creator *;
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
# This file is automatically generated by Android Tools.
|
||||
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
|
||||
#
|
||||
# This file must be checked in Version Control Systems.
|
||||
#
|
||||
# To customize properties used by the Ant build system use,
|
||||
# "ant.properties", and override values to adapt the script to your
|
||||
# project structure.
|
||||
|
||||
# Project target.
|
||||
target=android-20
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:fillAfter="false" >
|
||||
|
||||
<translate
|
||||
android:duration="10000"
|
||||
android:fromXDelta="-3.0"
|
||||
android:fromYDelta="0.0"
|
||||
android:toXDelta="-50.0%p"
|
||||
android:toYDelta="0.0" />
|
||||
|
||||
</set>
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:fillAfter="false" >
|
||||
|
||||
<translate
|
||||
android:duration="10000"
|
||||
android:fromXDelta="0.0"
|
||||
android:fromYDelta="0.0"
|
||||
android:toXDelta="50.0%p"
|
||||
android:toYDelta="0.0" />
|
||||
|
||||
</set>
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:interpolator="@android:anim/overshoot_interpolator" >
|
||||
|
||||
<scale
|
||||
android:duration="@android:integer/config_shortAnimTime"
|
||||
android:fromXScale="0.7"
|
||||
android:fromYScale="0.7"
|
||||
android:pivotX="50.0%"
|
||||
android:pivotY="50.0%"
|
||||
android:toXScale="1.0"
|
||||
android:toYScale="1.0" />
|
||||
|
||||
</set>
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:interpolator="@android:anim/accelerate_interpolator" >
|
||||
|
||||
<scale
|
||||
android:duration="@android:integer/config_shortAnimTime"
|
||||
android:fromXScale="1.0"
|
||||
android:fromYScale="1.0"
|
||||
android:pivotX="50.0%"
|
||||
android:pivotY="50.0%"
|
||||
android:toXScale="0.8"
|
||||
android:toYScale="0.8" />
|
||||
|
||||
<alpha
|
||||
android:duration="@android:integer/config_shortAnimTime"
|
||||
android:fromAlpha="1.0"
|
||||
android:toAlpha="0.0" />
|
||||
|
||||
</set>
|
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 161 B |
After Width: | Height: | Size: 166 B |
After Width: | Height: | Size: 871 KiB |
Before Width: | Height: | Size: 741 KiB After Width: | Height: | Size: 741 KiB |
After Width: | Height: | Size: 730 KiB |
After Width: | Height: | Size: 799 KiB |
After Width: | Height: | Size: 753 KiB |
After Width: | Height: | Size: 932 KiB |
After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.5 KiB |
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true"
|
||||
android:drawable="@drawable/whatsnew_btn_pressed" /> <!-- pressed -->
|
||||
<item android:state_focused="true"
|
||||
android:drawable="@drawable/whatsnew_btn_pressed" /> <!-- focused -->
|
||||
<item android:drawable="@drawable/whatsnew_btn_nor" /> <!-- default -->
|
||||
</selector>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_enabled="true" android:drawable="@drawable/page_indicator_unfocused" />
|
||||
<item android:state_enabled="false" android:drawable="@drawable/page_indicator_focused" />
|
||||
</selector>
|
After Width: | Height: | Size: 74 KiB |
|
@ -0,0 +1,147 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:id="@+id/mainRLayout"
|
||||
android:background="#000000"
|
||||
>
|
||||
<ImageView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:src="@drawable/show"
|
||||
/>
|
||||
<com.yyy.weixin.MyScrollLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/ScrollLayout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:visibility="visible"
|
||||
>
|
||||
<RelativeLayout android:background="@drawable/w01"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="89dp"
|
||||
android:text="微信,不只是个聊天工具"
|
||||
android:textColor="@color/TextColor"
|
||||
android:textSize="18sp" />
|
||||
</RelativeLayout>
|
||||
<RelativeLayout android:background="@drawable/w02"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
>
|
||||
<TextView
|
||||
android:id="@+id/t1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="96dp"
|
||||
android:text="第一次,你可以使用透明背景的动画表情,来表达你此刻的心情"
|
||||
android:gravity="center_horizontal"
|
||||
android:textColor="@color/TextColor"
|
||||
android:textSize="18sp" />
|
||||
</RelativeLayout>
|
||||
<RelativeLayout android:background="@drawable/w03"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
/>
|
||||
<RelativeLayout android:background="@drawable/w04"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
/>
|
||||
<RelativeLayout android:background="@drawable/w05"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
/>
|
||||
<RelativeLayout android:background="@drawable/w06"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
/>
|
||||
<RelativeLayout android:background="@drawable/w07"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
/>
|
||||
<RelativeLayout android:background="@drawable/w08"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
/>
|
||||
<RelativeLayout android:background="@drawable/w01"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
<Button
|
||||
android:id="@+id/startBtn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="98dp"
|
||||
android:text="开始我的微信生活"
|
||||
android:textSize="22sp"
|
||||
android:textColor="@color/TextColor"
|
||||
android:background="@drawable/button_bg"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingRight="20dp"
|
||||
android:paddingTop="15dp"
|
||||
android:paddingBottom="15dp"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
</com.yyy.weixin.MyScrollLayout>
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:id="@+id/llayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="24.0dip"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView android:clickable="true" android:padding="5.0dip" android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/page_indicator_bg" />
|
||||
<ImageView android:clickable="true" android:padding="5.0dip" android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/page_indicator_bg" />
|
||||
<ImageView android:clickable="true" android:padding="5.0dip" android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/page_indicator_bg" />
|
||||
<ImageView android:clickable="true" android:padding="5.0dip" android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/page_indicator_bg" />
|
||||
<ImageView android:clickable="true" android:padding="5.0dip" android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/page_indicator_bg" />
|
||||
<ImageView android:clickable="true" android:padding="5.0dip" android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/page_indicator_bg" />
|
||||
<ImageView android:clickable="true" android:padding="5.0dip" android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/page_indicator_bg" />
|
||||
<ImageView android:clickable="true" android:padding="5.0dip" android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/page_indicator_bg" />
|
||||
<ImageView android:clickable="true" android:padding="5.0dip" android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/page_indicator_bg" />
|
||||
</LinearLayout>
|
||||
<LinearLayout android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:visibility="gone"
|
||||
android:id="@+id/animLayout"
|
||||
>
|
||||
<LinearLayout
|
||||
android:id="@+id/leftLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="fill_parent">
|
||||
<ImageView android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:src="@drawable/whatsnew_left"/>
|
||||
<ImageView android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:src="@drawable/whatsnew_left_m"
|
||||
android:layout_marginLeft="-3dp"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/rightLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="fill_parent">
|
||||
<ImageView android:layout_height="fill_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:src="@drawable/whatsnew_right_m"/>
|
||||
<ImageButton android:layout_height="fill_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:src="@drawable/whatsnew_right"/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="亲,可以开始你的生活了!0.0" />
|
||||
|
||||
|
||||
</LinearLayout>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="TextColor">#FFFFFF</color>
|
||||
<color name="bgColor">#000000</color>
|
||||
</resources>
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="hello">Hello World, TestWeiXinWhatsNewActivity!</string>
|
||||
<string name="app_name">TestWeiXinOpen</string>
|
||||
|
||||
</resources>
|
|
@ -0,0 +1,200 @@
|
|||
package com.yyy.weixin;
|
||||
|
||||
import android.R.bool;
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.VelocityTracker;
|
||||
import android.view.View;
|
||||
import android.view.ViewConfiguration;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.View.MeasureSpec;
|
||||
import android.widget.Scroller;
|
||||
|
||||
public class MyScrollLayout extends ViewGroup {
|
||||
|
||||
private static final String TAG = "ScrollLayout";
|
||||
private VelocityTracker mVelocityTracker; // 用于判断甩动手势
|
||||
private static final int SNAP_VELOCITY = 600; //X轴速度基值,大于该值时进行切换
|
||||
private Scroller mScroller; // 滑动控制<EFBFBD>?
|
||||
private int mCurScreen; //当前页面为第几屏
|
||||
private int mDefaultScreen = 0;
|
||||
private float mLastMotionX;
|
||||
|
||||
|
||||
private OnViewChangeListener mOnViewChangeListener;
|
||||
|
||||
public MyScrollLayout(Context context) {
|
||||
super(context);
|
||||
// TODO Auto-generated constructor stub
|
||||
init(context);
|
||||
}
|
||||
|
||||
public MyScrollLayout(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
// TODO Auto-generated constructor stub
|
||||
init(context);
|
||||
}
|
||||
|
||||
private void init(Context context) {
|
||||
mCurScreen = mDefaultScreen;
|
||||
mScroller = new Scroller(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onLayout(boolean changed, int l, int t, int r, int b) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
Log.e("a", "a");
|
||||
if (changed) {
|
||||
int childLeft = 0;
|
||||
final int childCount = getChildCount();
|
||||
Log.e("count", childCount+"");
|
||||
for (int i = 0; i < childCount; i++) {
|
||||
final View childView = getChildAt(i);
|
||||
if (childView.getVisibility() != View.GONE) {
|
||||
final int childWidth = childView.getMeasuredWidth();
|
||||
childView.layout(childLeft, 0, childLeft + childWidth,
|
||||
childView.getMeasuredHeight());
|
||||
childLeft += childWidth;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
// TODO Auto-generated method stub
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
|
||||
Log.e("b", "b");
|
||||
final int width = MeasureSpec.getSize(widthMeasureSpec);
|
||||
|
||||
final int count = getChildCount();
|
||||
for (int i = 0; i < count; i++) {
|
||||
getChildAt(i).measure(widthMeasureSpec, heightMeasureSpec);
|
||||
}
|
||||
|
||||
scrollTo(mCurScreen * width, 0);
|
||||
|
||||
}
|
||||
|
||||
public void snapToDestination() {
|
||||
final int screenWidth = getWidth();
|
||||
|
||||
final int destScreen = (getScrollX() + screenWidth / 2) / screenWidth;
|
||||
snapToScreen(destScreen);
|
||||
}
|
||||
|
||||
//使屏幕移动到第whichScreen+1屏
|
||||
public void snapToScreen(int whichScreen) {
|
||||
|
||||
if (getScrollX() != (whichScreen * getWidth())) {
|
||||
final int delta = whichScreen * getWidth() - getScrollX();
|
||||
mScroller.startScroll(getScrollX(), 0, delta, 0,
|
||||
Math.abs(delta) * 2);
|
||||
mCurScreen = whichScreen;
|
||||
invalidate();
|
||||
|
||||
if (mOnViewChangeListener != null) {
|
||||
mOnViewChangeListener.OnViewChange(mCurScreen);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void computeScroll() {
|
||||
// TODO Auto-generated method stub
|
||||
if (mScroller.computeScrollOffset()) {
|
||||
scrollTo(mScroller.getCurrX(), mScroller.getCurrY());
|
||||
postInvalidate();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
final int action = event.getAction();
|
||||
final float x = event.getX();
|
||||
final float y = event.getY();
|
||||
|
||||
switch (action) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
|
||||
Log.i("", "onTouchEvent ACTION_DOWN");
|
||||
if (mVelocityTracker == null) {
|
||||
mVelocityTracker = VelocityTracker.obtain();
|
||||
mVelocityTracker.addMovement(event);
|
||||
}
|
||||
if (!mScroller.isFinished()) {
|
||||
mScroller.abortAnimation();
|
||||
}
|
||||
mLastMotionX = x;
|
||||
break;
|
||||
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
|
||||
int deltaX = (int) (mLastMotionX - x);
|
||||
if (IsCanMove(deltaX)) {
|
||||
if (mVelocityTracker != null) {
|
||||
mVelocityTracker.addMovement(event);
|
||||
}
|
||||
mLastMotionX = x;
|
||||
//正向或者负向移动,屏幕跟随手指移动
|
||||
scrollBy(deltaX, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
case MotionEvent.ACTION_UP:
|
||||
|
||||
int velocityX = 0;
|
||||
if (mVelocityTracker != null) {
|
||||
mVelocityTracker.addMovement(event);
|
||||
mVelocityTracker.computeCurrentVelocity(1000);
|
||||
//得到X轴方向手指移动速度
|
||||
velocityX = (int) mVelocityTracker.getXVelocity();
|
||||
}
|
||||
//velocityX为正值说明手指向右滑动,为负值说明手指向左滑动
|
||||
if (velocityX > SNAP_VELOCITY && mCurScreen > 0) {
|
||||
// Fling enough to move left
|
||||
Log.e(TAG, "snap left");
|
||||
snapToScreen(mCurScreen - 1);
|
||||
} else if (velocityX < -SNAP_VELOCITY
|
||||
&& mCurScreen < getChildCount() - 1) {
|
||||
// Fling enough to move right
|
||||
Log.e(TAG, "snap right");
|
||||
snapToScreen(mCurScreen + 1);
|
||||
} else {
|
||||
snapToDestination();
|
||||
}
|
||||
|
||||
if (mVelocityTracker != null) {
|
||||
mVelocityTracker.recycle();
|
||||
mVelocityTracker = null;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
private boolean IsCanMove(int deltaX) {
|
||||
//deltaX<0说明手指向右划
|
||||
if (getScrollX() <= 0 && deltaX < 0) {
|
||||
return false;
|
||||
}
|
||||
//deltaX>0说明手指向左划
|
||||
if (getScrollX() >= (getChildCount() - 1) * getWidth() && deltaX > 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public void SetOnViewChangeListener(OnViewChangeListener listener) {
|
||||
mOnViewChangeListener = listener;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
package com.yyy.weixin;
|
||||
|
||||
public interface OnViewChangeListener {
|
||||
public void OnViewChange(int view);
|
||||
}
|
|
@ -0,0 +1,102 @@
|
|||
package com.yyy.weixin;
|
||||
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.animation.Animation.AnimationListener;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
public class TestWeiXinOpen extends Activity implements OnViewChangeListener{
|
||||
|
||||
private MyScrollLayout mScrollLayout;
|
||||
private ImageView[] imgs;
|
||||
private int count;
|
||||
private int currentItem;
|
||||
private Button startBtn;
|
||||
private RelativeLayout mainRLayout;
|
||||
private LinearLayout pointLLayout;
|
||||
private LinearLayout leftLayout;
|
||||
private LinearLayout rightLayout;
|
||||
private LinearLayout animLayout;
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.main);
|
||||
initView();
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
mScrollLayout = (MyScrollLayout) findViewById(R.id.ScrollLayout);
|
||||
pointLLayout = (LinearLayout) findViewById(R.id.llayout);
|
||||
mainRLayout = (RelativeLayout) findViewById(R.id.mainRLayout);
|
||||
startBtn = (Button) findViewById(R.id.startBtn);
|
||||
startBtn.setOnClickListener(onClick);
|
||||
animLayout = (LinearLayout) findViewById(R.id.animLayout);
|
||||
leftLayout = (LinearLayout) findViewById(R.id.leftLayout);
|
||||
rightLayout = (LinearLayout) findViewById(R.id.rightLayout);
|
||||
count = mScrollLayout.getChildCount();
|
||||
imgs = new ImageView[count];
|
||||
for(int i = 0; i< count;i++) {
|
||||
imgs[i] = (ImageView) pointLLayout.getChildAt(i);
|
||||
imgs[i].setEnabled(true);
|
||||
imgs[i].setTag(i);
|
||||
}
|
||||
currentItem = 0;
|
||||
imgs[currentItem].setEnabled(false);
|
||||
mScrollLayout.SetOnViewChangeListener(this);
|
||||
}
|
||||
|
||||
private View.OnClickListener onClick = new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.startBtn:
|
||||
mScrollLayout.setVisibility(View.GONE);
|
||||
pointLLayout.setVisibility(View.GONE);
|
||||
animLayout.setVisibility(View.VISIBLE);
|
||||
mainRLayout.setBackgroundResource(R.drawable.whatsnew_bg);
|
||||
Animation leftOutAnimation = AnimationUtils.loadAnimation(TestWeiXinOpen.this, R.anim.translate_left);
|
||||
Animation rightOutAnimation = AnimationUtils.loadAnimation(TestWeiXinOpen.this, R.anim.translate_right);
|
||||
leftLayout.startAnimation(leftOutAnimation);
|
||||
rightLayout.startAnimation(rightOutAnimation);
|
||||
leftOutAnimation.setAnimationListener(new AnimationListener() {
|
||||
@Override
|
||||
public void onAnimationStart(Animation animation) {
|
||||
mainRLayout.setBackgroundColor(R.color.bgColor);
|
||||
}
|
||||
@Override
|
||||
public void onAnimationRepeat(Animation animation) {
|
||||
}
|
||||
@Override
|
||||
public void onAnimationEnd(Animation animation) {
|
||||
leftLayout.setVisibility(View.GONE);
|
||||
rightLayout.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@Override
|
||||
public void OnViewChange(int position) {
|
||||
setcurrentPoint(position);
|
||||
}
|
||||
|
||||
private void setcurrentPoint(int position) {
|
||||
if(position < 0 || position > count -1 || currentItem == position) {
|
||||
return;
|
||||
}
|
||||
imgs[currentItem].setEnabled(true);
|
||||
imgs[position].setEnabled(false);
|
||||
currentItem = position;
|
||||
}
|
||||
}
|
15716
代码/.metadata/.bak_0.log
10950
代码/.metadata/.log
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1.0 KiB |
|
@ -1,2 +0,0 @@
|
|||
background=#ffffff
|
||||
foreground=#000000
|
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 874 B |
|
@ -1,2 +0,0 @@
|
|||
background=#000000
|
||||
foreground=#ffffff
|
Before Width: | Height: | Size: 727 B |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1.0 KiB |
|
@ -1,2 +0,0 @@
|
|||
background=#ffffff
|
||||
foreground=#000000
|
|
@ -1,38 +0,0 @@
|
|||
*** SESSION 5月 15, 2016 09:13:42.97 --------------------------------------------
|
||||
*** SESSION 5月 15, 2016 09:20:33.31 --------------------------------------------
|
||||
*** SESSION 5月 15, 2016 09:22:04.34 --------------------------------------------
|
||||
*** SESSION 5月 15, 2016 09:51:04.91 --------------------------------------------
|
||||
*** SESSION 5月 18, 2016 09:41:46.06 --------------------------------------------
|
||||
*** SESSION 6月 08, 2016 11:24:21.88 --------------------------------------------
|
||||
*** SESSION 6月 08, 2016 11:44:57.81 --------------------------------------------
|
||||
*** SESSION 6月 16, 2016 16:06:09.82 --------------------------------------------
|
||||
*** SESSION 6月 20, 2016 19:06:36.98 --------------------------------------------
|
||||
*** SESSION 6月 20, 2016 22:59:14.51 --------------------------------------------
|
||||
*** SESSION 6月 21, 2016 00:48:22.64 --------------------------------------------
|
||||
*** SESSION 6月 21, 2016 00:53:12.21 --------------------------------------------
|
||||
*** SESSION 6月 21, 2016 01:00:38.77 --------------------------------------------
|
||||
*** SESSION 6月 21, 2016 01:06:46.07 --------------------------------------------
|
||||
*** SESSION 6月 21, 2016 01:19:21.87 --------------------------------------------
|
||||
*** SESSION 6月 21, 2016 20:38:34.52 --------------------------------------------
|
||||
*** SESSION 6月 21, 2016 21:07:29.99 --------------------------------------------
|
||||
*** SESSION 6月 21, 2016 23:23:17.66 --------------------------------------------
|
||||
*** SESSION 6月 22, 2016 11:41:29.82 --------------------------------------------
|
||||
*** SESSION 6月 22, 2016 23:14:57.36 --------------------------------------------
|
||||
*** SESSION 6月 23, 2016 15:35:19.07 --------------------------------------------
|
||||
*** SESSION 6月 23, 2016 23:30:33.92 --------------------------------------------
|
||||
*** SESSION 6月 25, 2016 10:23:01.50 --------------------------------------------
|
||||
*** SESSION 6月 25, 2016 15:03:20.65 --------------------------------------------
|
||||
*** SESSION 6月 25, 2016 16:57:34.43 --------------------------------------------
|
||||
*** SESSION 6月 25, 2016 23:17:15.15 --------------------------------------------
|
||||
*** SESSION 6月 25, 2016 23:54:48.18 --------------------------------------------
|
||||
*** SESSION 6月 25, 2016 23:58:00.54 --------------------------------------------
|
||||
*** SESSION 6月 26, 2016 00:05:42.28 --------------------------------------------
|
||||
*** SESSION 6月 26, 2016 00:10:39.87 --------------------------------------------
|
||||
*** SESSION 7月 01, 2016 22:49:10.96 --------------------------------------------
|
||||
*** SESSION 7月 02, 2016 00:10:53.99 --------------------------------------------
|
||||
*** SESSION 7月 02, 2016 08:51:43.14 --------------------------------------------
|
||||
*** SESSION 7月 04, 2016 15:52:02.68 --------------------------------------------
|
||||
*** SESSION 7月 04, 2016 17:58:21.26 --------------------------------------------
|
||||
*** SESSION 7月 05, 2016 00:44:57.89 --------------------------------------------
|
||||
*** SESSION 7月 05, 2016 08:14:55.77 --------------------------------------------
|
||||
*** SESSION 7月 05, 2016 10:21:37.73 --------------------------------------------
|
|
@ -1 +0,0 @@
|
|||
|