├── .gitignore ├── .idea ├── compiler.xml ├── copyright │ └── profiles_settings.xml ├── gradle.xml ├── markdown-navigator │ └── profiles_settings.xml ├── misc.xml ├── modules.xml ├── runConfigurations.xml └── vcs.xml ├── GIF.gif ├── GIF1.gif ├── GIF2.gif ├── README.md ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── aserbao │ │ │ └── homepager │ │ │ ├── AnimaActivity.java │ │ │ ├── BackgroundScrollView.java │ │ │ ├── CustomImageView.java │ │ │ ├── CustomRelativalayout.java │ │ │ ├── HVScrollViewTwo.java │ │ │ ├── MainActivity.java │ │ │ ├── XingxingScrollView.java │ │ │ ├── aScollView │ │ │ ├── AcrollViewActivity.java │ │ │ ├── AserbaoScrollView.java │ │ │ ├── ScollViewOne.java │ │ │ ├── ScollViewTwo.java │ │ │ └── TestScollViewOrigin.java │ │ │ ├── activitys │ │ │ └── TestActivity.java │ │ │ ├── customview │ │ │ ├── customview │ │ │ │ ├── Meteor.java │ │ │ │ └── MeteorView.java │ │ │ ├── customviewgroup │ │ │ │ └── AFlowLayout.java │ │ │ ├── flowlayout │ │ │ │ ├── FlowLayout.java │ │ │ │ ├── HorizationFlowLayout.java │ │ │ │ └── Scollflowlayout.java │ │ │ ├── meteorprocession │ │ │ │ ├── Meteor.java │ │ │ │ ├── MeteroFlake.java │ │ │ │ └── test │ │ │ │ │ └── MeterView.java │ │ │ └── snowball │ │ │ │ ├── SnowBall.java │ │ │ │ └── ohtersnowball │ │ │ │ ├── MainActivity.java │ │ │ │ ├── Random.java │ │ │ │ ├── SnowFlake.java │ │ │ │ └── SnowView.java │ │ │ ├── other │ │ │ ├── MainActivity.java │ │ │ ├── MoveFrameLayout.java │ │ │ ├── MoveView.java │ │ │ └── RoatImageView.java │ │ │ ├── scroll_view_linearlayout │ │ │ └── AScollViewLinearLayout.java │ │ │ ├── test │ │ │ ├── CirclrImageView.java │ │ │ ├── HelpScrollView.java │ │ │ └── HorizontalFloatLayoutActivity.java │ │ │ ├── ttt │ │ │ ├── BackgroundScollView.java │ │ │ ├── CustomRelativalayout.java │ │ │ ├── ScrollActivity.java │ │ │ └── ScrollActivityOld.java │ │ │ └── ui │ │ │ └── surfaveview │ │ │ ├── GameUI.java │ │ │ └── GameUI2.java │ └── res │ │ ├── anim │ │ ├── enter.xml │ │ ├── exit.xml │ │ ├── from_bottom_to_middle.xml │ │ ├── from_middle_to_bottom.xml │ │ ├── from_middle_to_top.xml │ │ ├── from_top_to_middle.xml │ │ ├── one_star_rotate.xml │ │ ├── one_start_enter.xml │ │ ├── two_star_scale_down.xml │ │ └── two_star_scale_up.xml │ │ ├── animator │ │ └── one_star_rotate.xml │ │ ├── drawable-hdpi │ │ ├── help_center.png │ │ ├── help_close.png │ │ ├── help_dian.png │ │ ├── help_guide1.png │ │ ├── help_guide2.png │ │ ├── help_left.png │ │ └── help_right.png │ │ ├── drawable-xhdpi │ │ ├── home_aperture.png │ │ ├── home_ball.png │ │ ├── home_headportrait_g.png │ │ ├── home_light.png │ │ ├── home_lightspot.png │ │ ├── home_maillist.png │ │ ├── home_qiuhuan.png │ │ ├── home_rankinglist.png │ │ ├── home_star.png │ │ ├── home_star_halo.png │ │ ├── sowin_pengyou.png │ │ ├── sowin_tongxunlu.png │ │ ├── sowin_xiantiao.png │ │ ├── sowin_yujian.png │ │ └── start1.png │ │ ├── drawable-xxhdpi │ │ ├── home_background.jpg │ │ └── home_xingxing.png │ │ ├── drawable-xxxhdpi │ │ ├── meteor.png │ │ ├── meteor1.png │ │ └── meteor2.png │ │ ├── drawable │ │ ├── help_bg.png │ │ ├── help_dian.png │ │ ├── rocketloading.gif │ │ └── tree.jpg │ │ ├── layout │ │ ├── activity_acroll_view.xml │ │ ├── activity_anima.xml │ │ ├── activity_home_page_content.xml │ │ ├── activity_home_page_content1.xml │ │ ├── activity_home_pager_cover.xml │ │ ├── activity_main.xml │ │ ├── activity_other_main.xml │ │ ├── activity_scroll.xml │ │ ├── activity_test.xml │ │ ├── activity_test2.xml │ │ ├── image_view.xml │ │ ├── metor_layout.xml │ │ └── other_snow_ball_activity_main.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── home_bubble.png │ │ ├── home_maillist.png │ │ ├── home_notice.png │ │ ├── home_qiuhuan.png │ │ ├── home_rankinglist.png │ │ ├── home_settab.png │ │ ├── home_share.png │ │ ├── home_star.png │ │ ├── home_vortex66.png │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ └── values │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── aserbao │ └── homepager │ └── ExampleUnitTest.java ├── aslibrary ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── aserbao │ │ │ └── alibrary │ │ │ └── particle │ │ │ ├── MainActivity.java │ │ │ ├── MyFragmentPagerAdapter.java │ │ │ ├── TabViewLayout.java │ │ │ ├── effect │ │ │ ├── base │ │ │ │ ├── EffectBase.java │ │ │ │ ├── EffectItem.java │ │ │ │ └── EffectScence.java │ │ │ ├── item │ │ │ │ ├── MusicPoint.java │ │ │ │ ├── RainPoint.java │ │ │ │ ├── SnowPoint.java │ │ │ │ ├── SnowPoint2.java │ │ │ │ └── Star.java │ │ │ └── scene │ │ │ │ ├── Lightning.java │ │ │ │ ├── MusicJumpScence.java │ │ │ │ ├── RainScence.java │ │ │ │ ├── Snow2Scence.java │ │ │ │ ├── SnowScence.java │ │ │ │ └── StarSkyScence.java │ │ │ ├── fragment │ │ │ ├── LightFragment.java │ │ │ ├── MusicFragment.java │ │ │ ├── RainFragment.java │ │ │ ├── SnowFragment.java │ │ │ └── StarFragment.java │ │ │ ├── util │ │ │ └── LogUtil.java │ │ │ └── widget │ │ │ ├── EffectAnimation.java │ │ │ ├── LightningAnimation.java │ │ │ ├── MusicAnimation.java │ │ │ ├── RainAnimation.java │ │ │ ├── SnowAnimation.java │ │ │ ├── SnowAnimation2.java │ │ │ └── StarSkyAnimation.java │ └── res │ │ ├── drawable-hdpi │ │ └── ic_launcher.png │ │ ├── drawable-mdpi │ │ └── ic_launcher.png │ │ ├── drawable-xhdpi │ │ └── ic_launcher.png │ │ ├── drawable-xxhdpi │ │ └── ic_launcher.png │ │ ├── drawable │ │ ├── home_item_background.xml │ │ └── tab_selector.xml │ │ ├── layout │ │ ├── activity_main.xml │ │ ├── fragment_light.xml │ │ ├── fragment_music.xml │ │ ├── fragment_rain.xml │ │ ├── fragment_rose_down.xml │ │ ├── fragment_sknow.xml │ │ ├── fragment_star.xml │ │ ├── tab_container.xml │ │ └── tab_view.xml │ │ ├── menu │ │ └── main.xml │ │ ├── values-sw600dp │ │ └── dimens.xml │ │ ├── values-sw720dp-land │ │ └── dimens.xml │ │ ├── values-v11 │ │ └── styles.xml │ │ ├── values-v14 │ │ └── styles.xml │ │ └── values │ │ ├── attrs.xml │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── aserbao │ └── aslibrary │ └── ExampleUnitTest.java ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | app/src/main.rar 11 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | -------------------------------------------------------------------------------- /.idea/markdown-navigator/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 19 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 46 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /GIF.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/GIF.gif -------------------------------------------------------------------------------- /GIF1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/GIF1.gif -------------------------------------------------------------------------------- /GIF2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/GIF2.gif -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HomePager 2 | HomePager用于检测自定义视图时使用 3 | 4 | ![](https://github.com/aserbao/HomePager/blob/master/GIF2.gif) 5 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | apply plugin: 'com.neenbedankt.android-apt' 3 | android { 4 | compileSdkVersion 25 5 | buildToolsVersion "26.0.0" 6 | defaultConfig { 7 | applicationId "com.aserbao.homepager" 8 | minSdkVersion 15 9 | targetSdkVersion 25 10 | versionCode 1 11 | versionName "1.0" 12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(include: ['*.jar'], dir: 'libs') 24 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 25 | exclude group: 'com.android.support', module: 'support-annotations' 26 | }) 27 | compile 'com.android.support:appcompat-v7:25.3.1' 28 | compile 'com.android.support.constraint:constraint-layout:1.0.2' 29 | compile 'com.jakewharton:butterknife:8.4.0' 30 | testCompile 'junit:junit:4.12' 31 | apt 'com.jakewharton:butterknife-compiler:8.4.0' 32 | compile 'com.github.bumptech.glide:glide:4.0.0' 33 | } 34 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in C:\Users\Administrator\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 28 | 29 | 30 | 31 | 34 | 35 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /app/src/main/java/com/aserbao/homepager/AnimaActivity.java: -------------------------------------------------------------------------------- 1 | package com.aserbao.homepager; 2 | 3 | import android.animation.Keyframe; 4 | import android.animation.ObjectAnimator; 5 | import android.animation.PropertyValuesHolder; 6 | import android.content.Intent; 7 | import android.support.v7.app.AppCompatActivity; 8 | import android.os.Bundle; 9 | import android.view.View; 10 | import android.view.WindowManager; 11 | import android.widget.Button; 12 | import android.widget.LinearLayout; 13 | 14 | import com.aserbao.homepager.ttt.ScrollActivity; 15 | 16 | import java.util.Random; 17 | 18 | public class AnimaActivity extends AppCompatActivity { 19 | 20 | private LinearLayout mLinearLayout; 21 | private Button mButton; 22 | 23 | @Override 24 | protected void onCreate(Bundle savedInstanceState) { 25 | super.onCreate(savedInstanceState); 26 | getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); 27 | setContentView(R.layout.activity_anima); 28 | mLinearLayout = (LinearLayout) findViewById(R.id.frame_layout); 29 | mButton = (Button) findViewById(R.id.btn_a); 30 | } 31 | 32 | @Override 33 | protected void onResume() { 34 | super.onResume(); 35 | init(); 36 | } 37 | 38 | @Override 39 | public void onWindowFocusChanged(boolean hasFocus) { 40 | super.onWindowFocusChanged(hasFocus); 41 | } 42 | 43 | private void init() { 44 | for (int i = 0; i < 15; i++) { 45 | CustomImageView CustomImageView = new CustomImageView(this); 46 | 47 | CustomImageView.setImageResource(R.drawable.start1); 48 | Random random = new Random(); 49 | int width = random.nextInt(400); 50 | int height = random.nextInt(700); 51 | CustomImageView.setX(width); 52 | CustomImageView.setY(height); 53 | CustomImageView.setMaxWidth(10); 54 | CustomImageView.setMaxHeight(10); 55 | /* int width = random.nextInt(getWindow().getDecorView().getWidth()); 56 | int height = random.nextInt(getWindow().getDecorView().getHeight());*/ 57 | // customImageView.layout(width,height,width+50,height+50); 58 | mLinearLayout.addView(CustomImageView); 59 | // customImageView.layout(width,height,width+50,height+50); 60 | } 61 | } 62 | 63 | @Override 64 | public void finish() { 65 | super.finish(); 66 | overridePendingTransition(R.anim.enter,R.anim.exit); 67 | } 68 | 69 | 70 | public void btn_onClick(View view) { 71 | startActivity(new Intent(this, ScrollActivity.class)); 72 | } 73 | static ObjectAnimator leftAndRight(View view,int delta) { 74 | 75 | PropertyValuesHolder pvhTranslateX = PropertyValuesHolder.ofKeyframe(View.TRANSLATION_X, 76 | Keyframe.ofFloat(0f, 0), 77 | Keyframe.ofFloat(.10f, -delta), 78 | Keyframe.ofFloat(.26f, delta), 79 | Keyframe.ofFloat(.42f, -delta), 80 | Keyframe.ofFloat(.58f, delta), 81 | Keyframe.ofFloat(.74f, -delta), 82 | Keyframe.ofFloat(.90f, delta), 83 | Keyframe.ofFloat(1f, 0f) 84 | ); 85 | 86 | return ObjectAnimator.ofPropertyValuesHolder(view, pvhTranslateX). 87 | setDuration(500); 88 | } 89 | ObjectAnimator upAndDown(View view, float shakeFactor) { 90 | 91 | PropertyValuesHolder pvhScaleX = PropertyValuesHolder.ofKeyframe(View.SCALE_X, 92 | Keyframe.ofFloat(0f, 1f), 93 | Keyframe.ofFloat(.1f, .9f), 94 | Keyframe.ofFloat(.2f, .9f), 95 | Keyframe.ofFloat(.3f, 1.1f), 96 | Keyframe.ofFloat(.4f, 1.1f), 97 | Keyframe.ofFloat(.5f, 1.1f), 98 | Keyframe.ofFloat(.6f, 1.1f), 99 | Keyframe.ofFloat(.7f, 1.1f), 100 | Keyframe.ofFloat(.8f, 1.1f), 101 | Keyframe.ofFloat(.9f, 1.1f), 102 | Keyframe.ofFloat(1f, 1f) 103 | ); 104 | 105 | PropertyValuesHolder pvhScaleY = PropertyValuesHolder.ofKeyframe(View.SCALE_Y, 106 | Keyframe.ofFloat(0f, 1f), 107 | Keyframe.ofFloat(.1f, .9f), 108 | Keyframe.ofFloat(.2f, .9f), 109 | Keyframe.ofFloat(.3f, 1.1f), 110 | Keyframe.ofFloat(.4f, 1.1f), 111 | Keyframe.ofFloat(.5f, 1.1f), 112 | Keyframe.ofFloat(.6f, 1.1f), 113 | Keyframe.ofFloat(.7f, 1.1f), 114 | Keyframe.ofFloat(.8f, 1.1f), 115 | Keyframe.ofFloat(.9f, 1.1f), 116 | Keyframe.ofFloat(1f, 1f) 117 | ); 118 | 119 | PropertyValuesHolder pvhRotate = PropertyValuesHolder.ofKeyframe(View.ROTATION, 120 | Keyframe.ofFloat(0f, 0f), 121 | Keyframe.ofFloat(.1f, -3f * shakeFactor), 122 | Keyframe.ofFloat(.2f, -3f * shakeFactor), 123 | Keyframe.ofFloat(.3f, 3f * shakeFactor), 124 | Keyframe.ofFloat(.4f, -3f * shakeFactor), 125 | Keyframe.ofFloat(.5f, 3f * shakeFactor), 126 | Keyframe.ofFloat(.6f, -3f * shakeFactor), 127 | Keyframe.ofFloat(.7f, 3f * shakeFactor), 128 | Keyframe.ofFloat(.8f, -3f * shakeFactor), 129 | Keyframe.ofFloat(.9f, 3f * shakeFactor), 130 | Keyframe.ofFloat(1f, 0) 131 | ); 132 | 133 | return ObjectAnimator.ofPropertyValuesHolder(view, pvhScaleX, pvhScaleY, pvhRotate). 134 | setDuration(1000); 135 | } 136 | 137 | } 138 | -------------------------------------------------------------------------------- /app/src/main/java/com/aserbao/homepager/CustomImageView.java: -------------------------------------------------------------------------------- 1 | package com.aserbao.homepager; 2 | 3 | import android.animation.ObjectAnimator; 4 | import android.content.Context; 5 | import android.support.annotation.Nullable; 6 | import android.util.AttributeSet; 7 | import android.view.animation.CycleInterpolator; 8 | import android.widget.ImageView; 9 | 10 | /** 11 | * description: 12 | * Created by aserbao on 2017/7/20. 13 | */ 14 | 15 | 16 | public class CustomImageView extends ImageView { 17 | public CustomImageView(Context context) { 18 | this(context,null); 19 | } 20 | 21 | public CustomImageView(Context context, @Nullable AttributeSet attrs) { 22 | this(context, attrs,0); 23 | } 24 | 25 | public CustomImageView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { 26 | super(context, attrs, defStyleAttr); 27 | ObjectAnimator alpha = ObjectAnimator.ofFloat(getRootView(), "alpha", 1, 0, 1); 28 | alpha.setDuration(1000); 29 | alpha.setRepeatCount(-1); 30 | alpha.setInterpolator(new CycleInterpolator(0.5f)); 31 | alpha.start(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/com/aserbao/homepager/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.aserbao.homepager; 2 | 3 | import android.animation.ObjectAnimator; 4 | import android.os.Bundle; 5 | import android.support.v7.app.AppCompatActivity; 6 | import android.view.MotionEvent; 7 | import android.view.Window; 8 | import android.view.WindowManager; 9 | import android.view.animation.LinearInterpolator; 10 | import android.widget.FrameLayout; 11 | import android.widget.ImageView; 12 | import android.widget.LinearLayout; 13 | 14 | import butterknife.BindView; 15 | import butterknife.ButterKnife; 16 | 17 | public class MainActivity extends AppCompatActivity { 18 | 19 | 20 | @BindView(R.id.one_star_background) 21 | ImageView mOneStarBackground; 22 | @BindView(R.id.one_star) 23 | ImageView mOneStar; 24 | @BindView(R.id.one_star_frame_layout) 25 | FrameLayout mOneStarFrameLayout; 26 | @BindView(R.id.two_star_line) 27 | ImageView mTwoStarLine; 28 | @BindView(R.id.two_star_text) 29 | ImageView mTwoStarText; 30 | @BindView(R.id.two_star_linear_layout) 31 | LinearLayout mTwoStarLinearLayout; 32 | @BindView(R.id.two_star) 33 | ImageView mTwoStar; 34 | @BindView(R.id.two_star_frame_layout) 35 | FrameLayout mTwoStarFrameLayout; 36 | @BindView(R.id.three_star_line) 37 | ImageView mThreeStarLine; 38 | @BindView(R.id.three_star_text) 39 | ImageView mThreeStarText; 40 | @BindView(R.id.three_star_linear_layout) 41 | LinearLayout mThreeStarLinearLayout; 42 | @BindView(R.id.three_star_light) 43 | ImageView mThreeStarLight; 44 | @BindView(R.id.three_star_light_spot) 45 | ImageView mThreeStarLightSpot; 46 | @BindView(R.id.three_star) 47 | ImageView mThreeStar; 48 | @BindView(R.id.three_star_aperture) 49 | ImageView mThreeStarAperture; 50 | @BindView(R.id.three_star_frame_layout) 51 | FrameLayout mThreeStarFrameLayout; 52 | @BindView(R.id.four_star_line) 53 | ImageView mFourStarLine; 54 | @BindView(R.id.four_star_text) 55 | ImageView mFourStarText; 56 | @BindView(R.id.four_star_linear_layout) 57 | LinearLayout mFourStarLinearLayout; 58 | @BindView(R.id.four_star) 59 | ImageView mFourStar; 60 | @BindView(R.id.four_star_frame_layout) 61 | FrameLayout mFourStarFrameLayout; 62 | @BindView(R.id.custom_relative_layout) 63 | CustomRelativalayout mCustomRelativeLayout; 64 | @BindView(R.id.background) 65 | BackgroundScrollView mBackground; 66 | private HVScrollViewTwo mHvScrollViewTwo; 67 | //=================================== 68 | @Override 69 | protected void onCreate(Bundle savedInstanceState) { 70 | overridePendingTransition(R.anim.from_bottom_to_middle, R.anim.from_middle_to_top); 71 | super.onCreate(savedInstanceState); 72 | requestWindowFeature(Window.FEATURE_NO_TITLE); 73 | getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 74 | WindowManager.LayoutParams.FLAG_FULLSCREEN); 75 | setContentView(R.layout.activity_main); 76 | ButterKnife.bind(this); 77 | init(); 78 | } 79 | 80 | private void init() { 81 | otherBackgroundAnimation(); 82 | } 83 | 84 | @Override 85 | public boolean onTouchEvent(MotionEvent event) { 86 | mCustomRelativeLayout.onTouchEvent(event); 87 | mBackground.onTouchEvent(event); 88 | return super.onTouchEvent(event); 89 | } 90 | 91 | private void otherBackgroundAnimation() { 92 | int sleepTime = 10000; 93 | startAnimators(mOneStar, "rotation", sleepTime, 0f, 360f); 94 | startAnimators(mOneStarBackground, "rotation", sleepTime, 360f, 0f); 95 | startAnimators(mTwoStar, "rotation", sleepTime, -15f, 15f, -15f); 96 | startAnimators(mThreeStar, "rotation", sleepTime, 0f, 360f); 97 | startAnimators(mThreeStarLight, "alpha", 5000, 1f, 0f, 1f); 98 | startAnimators(mThreeStarLightSpot, "scaleX", sleepTime, 1f, 1.3f, 1f); 99 | startAnimators(mThreeStarLightSpot, "scaleY", sleepTime, 1f, 1.3f, 1f); 100 | startAnimators(mThreeStarAperture, "rotation", sleepTime, -5f, 5f, -5f); 101 | 102 | startAnimators(mFourStar, "rotation", sleepTime, 360f, 0f); 103 | 104 | } 105 | 106 | private void startAnimators(Object object, String s, int duration, float... vales) { 107 | ObjectAnimator rotation = ObjectAnimator.ofFloat(object, s, vales); 108 | rotation.setRepeatCount(-1); 109 | rotation.setInterpolator(new LinearInterpolator()); 110 | rotation.setDuration(duration); 111 | rotation.start(); 112 | } 113 | 114 | @Override 115 | public void finish() { 116 | super.finish(); 117 | overridePendingTransition(R.anim.from_top_to_middle,R.anim.from_middle_to_bottom); 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /app/src/main/java/com/aserbao/homepager/aScollView/AcrollViewActivity.java: -------------------------------------------------------------------------------- 1 | package com.aserbao.homepager.aScollView; 2 | 3 | import android.animation.ObjectAnimator; 4 | import android.support.v7.app.AppCompatActivity; 5 | import android.os.Bundle; 6 | import android.view.MotionEvent; 7 | import android.view.View; 8 | import android.view.animation.ScaleAnimation; 9 | import android.widget.Button; 10 | import android.widget.Toast; 11 | 12 | import com.aserbao.homepager.R; 13 | 14 | public class AcrollViewActivity extends AppCompatActivity { 15 | 16 | private AserbaoScrollView mScrollView; 17 | private Button mButton; 18 | 19 | @Override 20 | protected void onCreate(Bundle savedInstanceState) { 21 | super.onCreate(savedInstanceState); 22 | setContentView(R.layout.activity_acroll_view); 23 | mScrollView = (AserbaoScrollView) findViewById(R.id.aserbao); 24 | mButton = (Button) findViewById(R.id.btn); 25 | } 26 | 27 | @Override 28 | public boolean onTouchEvent(MotionEvent event) { 29 | mScrollView.onTouchEvent(event); 30 | return super.onTouchEvent(event); 31 | } 32 | 33 | public void btn_lcick(View view) { 34 | ScaleAnimation scaleAnimation = new ScaleAnimation(0, 1, 0, 1, 0.5f, 0.5f); 35 | ObjectAnimator scaleX = ObjectAnimator.ofFloat(mButton, "scaleX", 1.0f, 2.0f); 36 | ObjectAnimator scaleY = ObjectAnimator.ofFloat(mButton, "scaleY", 1.0f, 2.0f); 37 | mButton.setPivotX(0.5f); 38 | mButton.setPivotY(0.5f); 39 | scaleX.setDuration(1000); 40 | scaleY.setDuration(1000); 41 | scaleX.start(); 42 | scaleY.start(); 43 | 44 | Toast.makeText(this, String.valueOf(mButton.getTop()), Toast.LENGTH_SHORT).show(); 45 | // startActivity(new Intent(AcrollViewActivity.this, AnimaActivity.class)); 46 | // overridePendingTransition(R.anim.one_start_enter,R.anim.exit); 47 | } 48 | 49 | @Override 50 | public void finish() { 51 | super.finish(); 52 | // overridePendingTransition(R.anim.enter,R.anim.exit); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/src/main/java/com/aserbao/homepager/aScollView/AserbaoScrollView.java: -------------------------------------------------------------------------------- 1 | package com.aserbao.homepager.aScollView; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | import android.view.MotionEvent; 6 | import android.view.View; 7 | import android.view.ViewConfiguration; 8 | import android.widget.FrameLayout; 9 | 10 | /** 11 | * description: 12 | * Created by aserbao on 2017/7/17. 13 | */ 14 | 15 | 16 | public class AserbaoScrollView extends FrameLayout { 17 | private int mTouchSlop; 18 | private float mLastMotionY; 19 | private float mLastMotionX; 20 | private boolean mIsBeingDragged = false; 21 | 22 | public AserbaoScrollView(Context context) { 23 | this(context,null); 24 | } 25 | 26 | public AserbaoScrollView(Context context, AttributeSet attrs) { 27 | this(context, attrs,0); 28 | } 29 | 30 | public AserbaoScrollView(Context context, AttributeSet attrs, int defStyleAttr) { 31 | super(context, attrs, defStyleAttr); 32 | init(); 33 | } 34 | 35 | private void init() { 36 | final ViewConfiguration configuration = ViewConfiguration.get(getContext()); 37 | mTouchSlop = configuration.getScaledTouchSlop(); 38 | } 39 | //让内部的LinearLayout高度可以很大很大 40 | @Override 41 | protected void measureChildWithMargins(View child, int parentWidthMeasureSpec, int widthUsed, int parentHeightMeasureSpec, int heightUsed) { 42 | 43 | final MarginLayoutParams lp = (MarginLayoutParams) child.getLayoutParams(); 44 | 45 | final int childWidthMeasureSpec = getChildMeasureSpec(parentWidthMeasureSpec, 46 | getPaddingLeft() + getPaddingRight() + lp.leftMargin + lp.rightMargin 47 | + widthUsed, lp.width); 48 | final int childHeightMeasureSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED); 49 | 50 | child.measure(childWidthMeasureSpec, childHeightMeasureSpec); 51 | } 52 | @Override 53 | public boolean onTouchEvent(MotionEvent event) { 54 | switch (event.getAction()) { 55 | case MotionEvent.ACTION_DOWN: 56 | mLastMotionY = event.getY(); 57 | mLastMotionX = event.getX(); 58 | break; 59 | case MotionEvent.ACTION_MOVE: 60 | int deltaX = (int)(event.getY() - mLastMotionY); 61 | int deltaY = (int)(event.getY() - mLastMotionY); 62 | if (mIsBeingDragged) { 63 | scrollBy(deltaX, -deltaY); 64 | mLastMotionY= event.getY(); 65 | mLastMotionX= event.getX(); 66 | } else if (Math.abs(deltaY) > mTouchSlop) { 67 | mIsBeingDragged = true; 68 | mLastMotionY= event.getY(); 69 | mLastMotionX= event.getX(); 70 | scrollBy(deltaX, -deltaY); 71 | } 72 | break; 73 | 74 | case MotionEvent.ACTION_UP: 75 | mIsBeingDragged = false; 76 | break; 77 | } 78 | 79 | return true; 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /app/src/main/java/com/aserbao/homepager/activitys/TestActivity.java: -------------------------------------------------------------------------------- 1 | package com.aserbao.homepager.activitys; 2 | 3 | import android.animation.Animator; 4 | import android.animation.AnimatorListenerAdapter; 5 | import android.animation.ObjectAnimator; 6 | import android.animation.PropertyValuesHolder; 7 | import android.content.Intent; 8 | import android.os.Bundle; 9 | import android.os.Handler; 10 | import android.os.PersistableBundle; 11 | import android.support.annotation.Nullable; 12 | import android.support.v7.app.AppCompatActivity; 13 | import android.view.LayoutInflater; 14 | import android.view.View; 15 | import android.widget.FrameLayout; 16 | import android.widget.ImageView; 17 | 18 | import com.aserbao.homepager.R; 19 | import com.aserbao.homepager.customview.snowball.ohtersnowball.MainActivity; 20 | import com.bumptech.glide.Glide; 21 | 22 | import java.util.Random; 23 | 24 | import butterknife.BindView; 25 | import butterknife.ButterKnife; 26 | 27 | public class TestActivity extends AppCompatActivity { 28 | 29 | @BindView(R.id.frame_layout) 30 | FrameLayout mFrameLayout; 31 | @BindView(R.id.image_view) 32 | ImageView mImageView; 33 | private Random mRandom; 34 | 35 | @Override 36 | protected void onCreate(Bundle savedInstanceState) { 37 | super.onCreate(savedInstanceState); 38 | setContentView(R.layout.activity_test2); 39 | ButterKnife.bind(this); 40 | Glide.with(this).load(R.drawable.rocketloading).into(mImageView); 41 | // init(); 42 | } 43 | 44 | @Override 45 | protected void onRestart() { 46 | super.onRestart(); 47 | } 48 | 49 | @Override 50 | protected void onStart() { 51 | super.onStart(); 52 | } 53 | 54 | @Override 55 | protected void onResume() { 56 | super.onResume(); 57 | } 58 | 59 | @Override 60 | protected void onPause() { 61 | super.onPause(); 62 | } 63 | 64 | @Override 65 | protected void onDestroy() { 66 | super.onDestroy(); 67 | } 68 | 69 | private void init() { 70 | final int num = 2; 71 | for (int i = 0; i < num; i++) { 72 | mRandom = new Random(); 73 | final View view = LayoutInflater.from(this).inflate(R.layout.image_view, mFrameLayout, false); 74 | int width = 540 + mRandom.nextInt(540); 75 | int height = mRandom.nextInt(960); 76 | // view.layout(width,height,width+view.getWidth(),height+view.getHeight()); 77 | 78 | view.setX(width); 79 | view.setY(height); 80 | mFrameLayout.addView(view); 81 | PropertyValuesHolder x = PropertyValuesHolder.ofFloat("translationX", width, -100); 82 | PropertyValuesHolder y = PropertyValuesHolder.ofFloat("translationY", height, height + width + 100); 83 | ObjectAnimator animator = ObjectAnimator.ofPropertyValuesHolder(view, x, y); 84 | // animator.setDuration(mRandom.nextInt(1500)).setRepeatCount(1); 85 | int duration = 500 + mRandom.nextInt(1000); 86 | animator.setDuration(duration).setRepeatCount(1); 87 | animator.addListener(new AnimatorListenerAdapter() { 88 | @Override 89 | public void onAnimationEnd(Animator animation) { 90 | super.onAnimationEnd(animation); 91 | mFrameLayout.removeView(view); 92 | } 93 | }); 94 | animator.start(); 95 | } 96 | new Handler().postDelayed(new Runnable() { 97 | @Override 98 | public void run() { 99 | init(); 100 | } 101 | }, 1500); 102 | } 103 | 104 | public void jump(View view) { 105 | startActivity(new Intent(this, MainActivity.class)); 106 | } 107 | 108 | @Override 109 | public void onBackPressed() { 110 | super.onBackPressed(); 111 | } 112 | 113 | @Override 114 | public void finish() { 115 | super.finish(); 116 | } 117 | 118 | 119 | } 120 | -------------------------------------------------------------------------------- /app/src/main/java/com/aserbao/homepager/customview/customview/Meteor.java: -------------------------------------------------------------------------------- 1 | package com.aserbao.homepager.customview.customview; 2 | 3 | import android.content.res.Resources; 4 | import android.graphics.Bitmap; 5 | import android.graphics.BitmapFactory; 6 | import android.graphics.Canvas; 7 | import android.graphics.Paint; 8 | import android.graphics.Point; 9 | 10 | import com.aserbao.homepager.R; 11 | 12 | import java.util.Random; 13 | 14 | 15 | /** 16 | * Created by aserbao on 2017 2017/8/20.21:35 17 | * Email:1142803753@qq.com 18 | * weixin: aserbao 19 | */ 20 | 21 | public class Meteor { 22 | private final Random random; 23 | private final Point position; 24 | private final Paint mPaint; 25 | private int speed = 25; 26 | 27 | public static Meteor create(int width, int height, Paint paint){ 28 | Random random = new Random(); 29 | int x = random.nextInt(width); 30 | int y = random.nextInt(height); 31 | Point position = new Point(x, y); 32 | return new Meteor(random , position, paint); 33 | } 34 | Meteor(Random random,Point position,Paint paint){ 35 | this.random = random; 36 | this.position = position; 37 | this.speed = 10 + random.nextInt(40); 38 | mPaint = paint; 39 | } 40 | 41 | public void draw(Canvas canvas, Resources r,int i){ 42 | int width = canvas.getWidth(); 43 | int height = canvas.getHeight(); 44 | Bitmap bitmap = BitmapFactory.decodeResource(r, R.drawable.meteor); 45 | int bitmapWidth = bitmap.getWidth(); 46 | int bitmapHeight = bitmap.getHeight(); 47 | move(width, height,bitmapWidth,bitmapHeight,i); 48 | canvas.drawBitmap(bitmap,position.x,position.y,mPaint); 49 | } 50 | 51 | private void move(int width, int height,int bitmapWidth,int bitmapHeight,int i) { 52 | int x = position.x - speed; 53 | int y = position.y + speed; 54 | position.set(x,y); 55 | if(!isInside(width,height,bitmapWidth,bitmapHeight)){ 56 | reset(width,height,i); 57 | } 58 | } 59 | 60 | private void reset(int width, int height,int i) { 61 | speed = 10+random.nextInt(40); 62 | position.x = random.nextInt(width); 63 | position.y = random.nextInt(height); 64 | } 65 | 66 | private boolean isInside(int width, int height,int bitmapWidth,int bitmapHeight) { 67 | boolean b = position.x + bitmapWidth > 0 && position.y < height; 68 | return b; 69 | } 70 | 71 | } 72 | -------------------------------------------------------------------------------- /app/src/main/java/com/aserbao/homepager/customview/customview/MeteorView.java: -------------------------------------------------------------------------------- 1 | package com.aserbao.homepager.customview.customview; 2 | 3 | import android.content.Context; 4 | import android.graphics.Canvas; 5 | import android.graphics.Paint; 6 | import android.os.Handler; 7 | import android.support.annotation.Nullable; 8 | import android.util.AttributeSet; 9 | import android.widget.ImageView; 10 | 11 | import java.util.ArrayList; 12 | import java.util.List; 13 | import java.util.Random; 14 | 15 | 16 | /** 17 | * Created by aserbao on 2017 2017/8/17.23:47 18 | * Email:1142803753@qq.com 19 | * weixin: aserbao 20 | */ 21 | 22 | public class MeteorView extends ImageView { 23 | public static final int DELAY = 10; 24 | // private short final int SPEED = 10 25 | private int NUM = 5; 26 | private Random mRandom; 27 | private Handler mHandler; 28 | private Meteor[] mMeteors ; 29 | private List speed = new ArrayList<>(); 30 | public MeteorView(Context context) { 31 | this(context,null); 32 | } 33 | 34 | public MeteorView(Context context, @Nullable AttributeSet attrs) { 35 | this(context, attrs,0); 36 | } 37 | 38 | /** 39 | * @param context 40 | * @param attrs 41 | * @param defStyleAttr 42 | */ 43 | public MeteorView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { 44 | super(context, attrs, defStyleAttr); 45 | mRandom = new Random(); 46 | } 47 | 48 | @Override 49 | protected void onSizeChanged(int w, int h, int oldw, int oldh) { 50 | super.onSizeChanged(w, h, oldw, oldh); 51 | if (w != oldw || h != oldh) { 52 | resize(w, h); 53 | } 54 | } 55 | 56 | private void resize(int w, int h) { 57 | Paint paint = new Paint(); 58 | paint.setAntiAlias(true); 59 | paint.setStyle(Paint.Style.FILL); 60 | mMeteors = new Meteor[NUM]; 61 | for (int i = 0; i < mMeteors.length; i++) { 62 | mMeteors[i] = Meteor.create(getWidth(),getHeight(),paint); 63 | } 64 | } 65 | 66 | @Override 67 | protected void onDraw(Canvas canvas) { 68 | super.onDraw(canvas); 69 | for (int i = 0; i < mMeteors.length; i++) { 70 | mMeteors[i].draw(canvas,getResources(),i); 71 | } 72 | getHandler().postDelayed(mRunnable, DELAY); 73 | } 74 | 75 | private Runnable mRunnable = new Runnable() { 76 | @Override 77 | public void run() { 78 | invalidate(); 79 | } 80 | }; 81 | } 82 | -------------------------------------------------------------------------------- /app/src/main/java/com/aserbao/homepager/customview/customviewgroup/AFlowLayout.java: -------------------------------------------------------------------------------- 1 | package com.aserbao.homepager.customview.customviewgroup; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | import android.view.ViewGroup; 6 | import android.widget.LinearLayout; 7 | import android.widget.RadioGroup; 8 | 9 | /** 10 | * description: 11 | * Created by aserbao on 2017/8/17. 12 | */ 13 | 14 | 15 | public class AFlowLayout extends ViewGroup { 16 | public AFlowLayout(Context context) { 17 | this(context,null); 18 | } 19 | 20 | public AFlowLayout(Context context, AttributeSet attrs) { 21 | this(context, attrs,0); 22 | } 23 | 24 | public AFlowLayout(Context context, AttributeSet attrs, int defStyleAttr) { 25 | super(context, attrs, defStyleAttr); 26 | } 27 | 28 | @Override 29 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { 30 | super.onMeasure(widthMeasureSpec, heightMeasureSpec); 31 | } 32 | 33 | @Override 34 | protected void onLayout(boolean changed, int l, int t, int r, int b) { 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/aserbao/homepager/customview/meteorprocession/Meteor.java: -------------------------------------------------------------------------------- 1 | package com.aserbao.homepager.customview.meteorprocession; 2 | 3 | import android.animation.Animator; 4 | import android.animation.AnimatorListenerAdapter; 5 | import android.animation.ObjectAnimator; 6 | import android.animation.PropertyValuesHolder; 7 | import android.content.Context; 8 | import android.graphics.BitmapFactory; 9 | import android.graphics.Canvas; 10 | import android.graphics.Color; 11 | import android.graphics.Paint; 12 | import android.support.annotation.Nullable; 13 | import android.util.AttributeSet; 14 | import android.view.View; 15 | import android.view.animation.AccelerateInterpolator; 16 | import android.widget.ImageView; 17 | 18 | import com.aserbao.homepager.R; 19 | 20 | import java.util.Random; 21 | 22 | /** 23 | * Created by aserbao on 2017 2017/8/19.7:59 24 | * Email:1142803753@qq.com 25 | * weixin: aserbao 26 | */ 27 | 28 | public class Meteor extends android.support.v7.widget.AppCompatImageView { 29 | public static final int NUM_METEROR = 5; 30 | public static final int DELAY = 10; 31 | private Random mRandom; 32 | private Paint mPaint; 33 | 34 | public Meteor(Context context) { 35 | this(context,null); 36 | } 37 | 38 | public Meteor(Context context, @Nullable AttributeSet attrs) { 39 | this(context, attrs,0); 40 | } 41 | 42 | public Meteor(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { 43 | super(context, attrs, defStyleAttr); 44 | mRandom = new Random(); 45 | } 46 | 47 | @Override 48 | protected void onSizeChanged(int w, int h, int oldw, int oldh) { 49 | super.onSizeChanged(w, h, oldw, oldh); 50 | if (w != oldw || h != oldh) { 51 | translation(w, h); 52 | } 53 | } 54 | 55 | private void translation(int w, int h) { 56 | int mRw = getWidth() / 2 + mRandom.nextInt(getWidth() / 2); 57 | int width = mRw; 58 | int height = mRandom.nextInt(getHeight()); 59 | PropertyValuesHolder translateX = PropertyValuesHolder.ofFloat("translationX", width, 0); 60 | PropertyValuesHolder translateY = PropertyValuesHolder.ofFloat("translationY", height, height + mRw); 61 | ObjectAnimator objectAnimator = ObjectAnimator.ofPropertyValuesHolder(this, translateX, translateY); 62 | objectAnimator.setDuration(mRandom.nextInt(1500)); 63 | objectAnimator.addListener(new AnimatorListenerAdapter() { 64 | @Override 65 | public void onAnimationEnd(Animator animation) { 66 | super.onAnimationEnd(animation); 67 | translation(getWidth(),getHeight()); 68 | } 69 | }); 70 | objectAnimator.setInterpolator(new AccelerateInterpolator()); 71 | objectAnimator.start(); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /app/src/main/java/com/aserbao/homepager/customview/meteorprocession/MeteroFlake.java: -------------------------------------------------------------------------------- 1 | package com.aserbao.homepager.customview.meteorprocession; 2 | 3 | import android.content.Context; 4 | import android.content.res.Resources; 5 | import android.graphics.BitmapFactory; 6 | import android.graphics.Canvas; 7 | import android.graphics.Paint; 8 | import android.graphics.Point; 9 | import android.util.AttributeSet; 10 | import android.view.LayoutInflater; 11 | import android.view.View; 12 | import android.view.ViewGroup; 13 | 14 | import com.aserbao.homepager.R; 15 | 16 | import java.util.Random; 17 | 18 | /** 19 | * Created by aserbao on 2017 2017/8/19.8:01 20 | * Email:1142803753@qq.com 21 | * weixin: aserbao 22 | */ 23 | 24 | public class MeteroFlake extends ViewGroup{ 25 | 26 | 27 | private Random mRandom; 28 | 29 | public MeteroFlake(Context context) { 30 | this(context,null); 31 | } 32 | 33 | public MeteroFlake(Context context, AttributeSet attrs) { 34 | this(context, attrs,0); 35 | } 36 | 37 | public MeteroFlake(Context context, AttributeSet attrs, int defStyleAttr) { 38 | super(context, attrs, defStyleAttr); 39 | mRandom = new Random(); 40 | for (int i = 0; i < 15; i++) { 41 | View meteor = LayoutInflater.from(context).inflate(R.layout.metor_layout, this, false); 42 | LayoutParams layoutParams = meteor.getLayoutParams(); 43 | layoutParams.width = LayoutParams.WRAP_CONTENT; 44 | layoutParams.height = LayoutParams.WRAP_CONTENT; 45 | meteor.setLayoutParams(layoutParams); 46 | this.addView(meteor); 47 | } 48 | } 49 | 50 | @Override 51 | protected void onLayout(boolean changed, int l, int t, int r, int b) { 52 | int childCount = getChildCount(); 53 | for (int i = 0; i < childCount; i++) { 54 | View child = getChildAt(i); 55 | int l1 = getWidth() / 2 + mRandom.nextInt(getWidth() / 2); 56 | int t1 = mRandom.nextInt(getHeight() / 2); 57 | child.layout(l1, t1,l1+child.getWidth(),t1+ child.getHeight()); 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /app/src/main/java/com/aserbao/homepager/customview/meteorprocession/test/MeterView.java: -------------------------------------------------------------------------------- 1 | package com.aserbao.homepager.customview.meteorprocession.test; 2 | 3 | /** 4 | * description: 5 | * Created by aserbao on 2017/8/19. 6 | */ 7 | 8 | 9 | public class MeterView { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /app/src/main/java/com/aserbao/homepager/customview/snowball/SnowBall.java: -------------------------------------------------------------------------------- 1 | package com.aserbao.homepager.customview.snowball; 2 | 3 | /** 4 | * Created by aserbao on 2017 2017/8/18.22:09 5 | * Email:1142803753@qq.com 6 | * weixin: aserbao 7 | */ 8 | 9 | public class SnowBall { 10 | } 11 | -------------------------------------------------------------------------------- /app/src/main/java/com/aserbao/homepager/customview/snowball/ohtersnowball/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.aserbao.homepager.customview.snowball.ohtersnowball; 2 | 3 | import android.animation.Animator; 4 | import android.animation.AnimatorListenerAdapter; 5 | import android.animation.ObjectAnimator; 6 | import android.animation.PropertyValuesHolder; 7 | import android.os.Bundle; 8 | import android.support.v7.app.AppCompatActivity; 9 | import android.view.LayoutInflater; 10 | import android.view.View; 11 | import android.view.ViewGroup; 12 | import android.view.animation.AccelerateInterpolator; 13 | import android.widget.FrameLayout; 14 | 15 | import com.aserbao.homepager.R; 16 | 17 | import butterknife.BindView; 18 | import butterknife.ButterKnife; 19 | 20 | public class MainActivity extends AppCompatActivity { 21 | 22 | @BindView(R.id.frame_layout) 23 | FrameLayout mFrameLayout; 24 | private Random mRandom; 25 | 26 | @Override 27 | protected void onCreate(Bundle savedInstanceState) { 28 | super.onCreate(savedInstanceState); 29 | setContentView(R.layout.other_snow_ball_activity_main); 30 | ButterKnife.bind(this); 31 | mRandom = new Random(); 32 | for (int i = 0; i < 5; i++) { 33 | View meteor = LayoutInflater.from(this).inflate(R.layout.metor_layout,mFrameLayout,false); 34 | ViewGroup.LayoutParams layoutParams = meteor.getLayoutParams(); 35 | layoutParams.width = ViewGroup.LayoutParams.WRAP_CONTENT; 36 | layoutParams.height = ViewGroup.LayoutParams.WRAP_CONTENT; 37 | meteor.setLayoutParams(layoutParams); 38 | mFrameLayout.addView(meteor); 39 | 40 | int mRw = 1080 / 2 + mRandom.getRandom(540); 41 | int width = mRw; 42 | int height = mRandom.getRandom(4920); 43 | PropertyValuesHolder translateX = PropertyValuesHolder.ofFloat("translationX", width, 0); 44 | PropertyValuesHolder translateY = PropertyValuesHolder.ofFloat("translationY", height, height + mRw); 45 | ObjectAnimator objectAnimator = ObjectAnimator.ofPropertyValuesHolder(this, translateX, translateY); 46 | objectAnimator.setDuration(mRandom.getRandom(1500)); 47 | objectAnimator.addListener(new AnimatorListenerAdapter() { 48 | @Override 49 | public void onAnimationEnd(Animator animation) { 50 | super.onAnimationEnd(animation); 51 | 52 | } 53 | }); 54 | objectAnimator.setInterpolator(new AccelerateInterpolator()); 55 | objectAnimator.start(); 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /app/src/main/java/com/aserbao/homepager/customview/snowball/ohtersnowball/Random.java: -------------------------------------------------------------------------------- 1 | package com.aserbao.homepager.customview.snowball.ohtersnowball; 2 | 3 | public class Random { 4 | private static final java.util.Random RANDOM = new java.util.Random(); 5 | 6 | public float getRandom(float lower, float upper) { 7 | float min = Math.min(lower, upper); 8 | float max = Math.max(lower, upper); 9 | return getRandom(max - min) + min; 10 | } 11 | 12 | public float getRandom(float upper) { 13 | return RANDOM.nextFloat() * upper; 14 | } 15 | 16 | public int getRandom(int upper) { 17 | return RANDOM.nextInt(upper); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/aserbao/homepager/customview/snowball/ohtersnowball/SnowFlake.java: -------------------------------------------------------------------------------- 1 | package com.aserbao.homepager.customview.snowball.ohtersnowball; 2 | 3 | import android.graphics.Canvas; 4 | import android.graphics.Color; 5 | import android.graphics.Paint; 6 | import android.graphics.Point; 7 | 8 | class SnowFlake { 9 | private static final float ANGE_RANGE = 0.1f; 10 | private static final float HALF_ANGLE_RANGE = ANGE_RANGE / 2f; 11 | private static final float HALF_PI = (float) Math.PI / 2f; 12 | 13 | private static final float ANGLE_SEED = 25f; 14 | private static final float ANGLE_DIVISOR = 10000f; 15 | private static final float INCREMENT_LOWER = 2f; 16 | private static final float INCREMENT_UPPER = 4f; 17 | private static final float FLAKE_SIZE_LOWER = 7f; 18 | private static final float FLAKE_SIZE_UPPER = 20f; 19 | 20 | private final Random random; 21 | private final Point position; 22 | private float angle; 23 | private final float increment; 24 | private final float flakeSize; 25 | private final Paint paint; 26 | 27 | public static SnowFlake create(int width, int height, Paint paint) { 28 | Random random = new Random(); 29 | int x = random.getRandom(width); 30 | int y = random.getRandom(height); 31 | Point position = new Point(x, y); 32 | float angle = random.getRandom(ANGLE_SEED) / ANGLE_SEED * ANGE_RANGE + HALF_PI - HALF_ANGLE_RANGE; 33 | float increment = random.getRandom(INCREMENT_LOWER, INCREMENT_UPPER); 34 | float flakeSize = random.getRandom(FLAKE_SIZE_LOWER, FLAKE_SIZE_UPPER); 35 | return new SnowFlake(random, position, angle, increment, flakeSize, paint); 36 | } 37 | 38 | SnowFlake(Random random, Point position, float angle, float increment, float flakeSize, Paint paint) { 39 | this.random = random; 40 | this.position = position; 41 | this.angle = angle; 42 | this.increment = increment; 43 | this.flakeSize = flakeSize; 44 | this.paint = paint; 45 | } 46 | 47 | private void move(int width, int height) { 48 | double x = position.x + (increment * Math.cos(angle)); 49 | double y = position.y + (increment * Math.sin(angle)); 50 | 51 | angle += random.getRandom(-ANGLE_SEED, ANGLE_SEED) / ANGLE_DIVISOR; 52 | 53 | position.set((int) x, (int) y); 54 | 55 | if (!isInside(width, height)) { 56 | reset(width); 57 | } 58 | } 59 | 60 | private boolean isInside(int width, int height) { 61 | int x = position.x; 62 | int y = position.y; 63 | return x >= -flakeSize - 1 && x + flakeSize <= width && y >= -flakeSize - 1 && y - flakeSize < height; 64 | } 65 | 66 | private void reset(int width) { 67 | position.x = random.getRandom(width); 68 | position.y = (int) (-flakeSize - 1); 69 | angle = random.getRandom(ANGLE_SEED) / ANGLE_SEED * ANGE_RANGE + HALF_PI - HALF_ANGLE_RANGE; 70 | } 71 | 72 | public void draw(Canvas canvas) { 73 | int width = canvas.getWidth(); 74 | int height = canvas.getHeight(); 75 | move(width, height); 76 | canvas.drawCircle(position.x, position.y, flakeSize, paint); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /app/src/main/java/com/aserbao/homepager/customview/snowball/ohtersnowball/SnowView.java: -------------------------------------------------------------------------------- 1 | package com.aserbao.homepager.customview.snowball.ohtersnowball; 2 | 3 | import android.content.Context; 4 | import android.graphics.Canvas; 5 | import android.graphics.Color; 6 | import android.graphics.Paint; 7 | import android.util.AttributeSet; 8 | import android.view.View; 9 | 10 | public class SnowView extends View { 11 | private static final int NUM_SNOWFLAKES = 50; 12 | private static final int DELAY = 5; 13 | 14 | private SnowFlake[] snowflakes; 15 | 16 | public SnowView(Context context) { 17 | super(context); 18 | } 19 | 20 | public SnowView(Context context, AttributeSet attrs) { 21 | super(context, attrs); 22 | } 23 | 24 | public SnowView(Context context, AttributeSet attrs, int defStyleAttr) { 25 | super(context, attrs, defStyleAttr); 26 | } 27 | 28 | protected void resize(int width, int height) { 29 | Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG); 30 | paint.setColor(Color.WHITE); 31 | paint.setStyle(Paint.Style.FILL); 32 | snowflakes = new SnowFlake[NUM_SNOWFLAKES]; 33 | for (int i = 0; i < NUM_SNOWFLAKES; i++) { 34 | snowflakes[i] = SnowFlake.create(width, height, paint); 35 | } 36 | } 37 | 38 | @Override 39 | protected void onSizeChanged(int w, int h, int oldw, int oldh) { 40 | super.onSizeChanged(w, h, oldw, oldh); 41 | if (w != oldw || h != oldh) { 42 | resize(w, h); 43 | } 44 | } 45 | 46 | @Override 47 | protected void onDraw(Canvas canvas) { 48 | super.onDraw(canvas); 49 | for (SnowFlake snowFlake : snowflakes) { 50 | snowFlake.draw(canvas); 51 | } 52 | getHandler().postDelayed(runnable, DELAY); 53 | } 54 | 55 | private Runnable runnable = new Runnable() { 56 | @Override 57 | public void run() { 58 | invalidate(); 59 | } 60 | }; 61 | } 62 | -------------------------------------------------------------------------------- /app/src/main/java/com/aserbao/homepager/other/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.aserbao.homepager.other; 2 | 3 | import android.app.Activity; 4 | import android.content.ActivityNotFoundException; 5 | import android.content.Intent; 6 | import android.os.Bundle; 7 | import android.provider.MediaStore; 8 | import android.view.MotionEvent; 9 | import android.view.View; 10 | import android.widget.Toast; 11 | 12 | import com.aserbao.homepager.R; 13 | import com.aserbao.homepager.aScollView.ScollViewOne; 14 | import com.aserbao.homepager.aScollView.ScollViewTwo; 15 | 16 | /** 17 | * 18 | * @author zxy 19 | * 20 | */ 21 | public class MainActivity extends Activity { 22 | 23 | private ScollViewOne mScollViewOne; 24 | private ScollViewTwo mScollViewTwo; 25 | 26 | @Override 27 | protected void onCreate(Bundle savedInstanceState) { 28 | super.onCreate(savedInstanceState); 29 | setContentView(R.layout.activity_other_main); 30 | mScollViewOne = (ScollViewOne) findViewById(R.id.test_scoll_view); 31 | mScollViewTwo = (ScollViewTwo) findViewById(R.id.test_scoll_view_one); 32 | } 33 | 34 | @Override 35 | public boolean onTouchEvent(MotionEvent event) { 36 | mScollViewOne.onTouchEvent(event); 37 | mScollViewTwo.onTouchEvent(event); 38 | return super.onTouchEvent(event); 39 | } 40 | 41 | public void btn_click(View view) { 42 | chooseVideoFromLocalBeforeKitKat(); 43 | /* if (Build.VERSION.SDK_INT >= 19) { 44 | chooseVideoFromLocalKitKat(); 45 | } else { 46 | chooseVideoFromLocalBeforeKitKat(); 47 | }*/ 48 | } 49 | 50 | /** 51 | * API19 之后选择视频 52 | */ 53 | protected void chooseVideoFromLocalKitKat() { 54 | Intent intent = new Intent(Intent.ACTION_PICK); 55 | intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "image/*"); 56 | intent.setDataAndType(MediaStore.Video.Media.EXTERNAL_CONTENT_URI, "video/*"); 57 | // Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Video.Media.EXTERNAL_CONTENT_URI); 58 | intent.putExtra(Intent.EXTRA_LOCAL_ONLY, true); 59 | try { 60 | startActivityForResult(intent, 0); 61 | } catch (ActivityNotFoundException e) { 62 | Toast.makeText(this, "没找到", Toast.LENGTH_SHORT).show(); 63 | } catch (SecurityException e) { 64 | 65 | } 66 | } 67 | protected void chooseVideoFromLocalBeforeKitKat() { 68 | Intent mIntent = new Intent(Intent.ACTION_GET_CONTENT); 69 | mIntent.setType("video/*;image/*"); 70 | mIntent.putExtra(Intent.EXTRA_LOCAL_ONLY, true); 71 | try { 72 | startActivityForResult(mIntent, 0); 73 | } catch (ActivityNotFoundException e) { 74 | Toast.makeText(this, "djks", Toast.LENGTH_SHORT).show(); 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /app/src/main/java/com/aserbao/homepager/other/RoatImageView.java: -------------------------------------------------------------------------------- 1 | package com.aserbao.homepager.other; 2 | 3 | import android.content.Context; 4 | import android.graphics.Canvas; 5 | import android.os.Handler; 6 | import android.util.AttributeSet; 7 | import android.widget.ImageView; 8 | 9 | /** 10 | * 自动实现内容的旋转 11 | * 12 | * @author zxy 13 | * 14 | */ 15 | public class RoatImageView extends ImageView { 16 | private float degrees = 500;// 当前需要旋转的角度 17 | private int angleOneTime = 1;// 每次旋转的角度 18 | private long delayMillis = 100;// 转动一个角度的时间 单位毫秒 19 | private boolean isClockwise = true;// 转动角度的方向 是否是顺时针旋转 true表示顺时针旋转 20 | // false表示逆时针旋转 21 | public RoatImageView(Context context) { 22 | super(context); 23 | initView(context); 24 | } 25 | 26 | public RoatImageView(Context context, AttributeSet attrs) { 27 | super(context, attrs); 28 | initView(context); 29 | } 30 | 31 | public RoatImageView(Context context, AttributeSet attrs, int defStyleAttr) { 32 | super(context, attrs, defStyleAttr); 33 | initView(context); 34 | } 35 | 36 | // 初始化 37 | private void initView(Context context) { 38 | 39 | } 40 | 41 | @Override 42 | protected void onDraw(Canvas canvas) { 43 | if(isReady()){ 44 | this.setRotation(degrees); 45 | } 46 | super.onDraw(canvas); 47 | } 48 | 49 | 50 | 51 | /** 52 | * 判断当前情况是否能执行手势相关计算 53 | * 54 | * 包括:是否有图片,图片是否有尺寸,控件是否有尺寸. 55 | * 56 | * @return 是否能执行手势相关计算 57 | */ 58 | private boolean isReady() { 59 | return getDrawable() != null && getDrawable().getIntrinsicWidth() > 0 && getDrawable().getIntrinsicHeight() > 0 60 | && getWidth() > 0 && getHeight() > 0; 61 | } 62 | 63 | Handler handler = new Handler(); 64 | 65 | // 开始旋转 66 | public void startRotation() { 67 | stopRotation(); 68 | handler.postDelayed(myRun, delayMillis); 69 | } 70 | 71 | // 停止旋转 72 | public void stopRotation() { 73 | handler.removeCallbacks(myRun); 74 | } 75 | 76 | private Runnable myRun = new Runnable() { 77 | 78 | @Override 79 | public void run() { 80 | if (isClockwise) { 81 | degrees += angleOneTime; 82 | if (degrees < -720) { 83 | degrees += 720; 84 | } 85 | } else { 86 | degrees -= angleOneTime; 87 | if (degrees > 720) { 88 | degrees -= 720; 89 | } 90 | } 91 | invalidate(); 92 | handler.postDelayed(myRun, delayMillis); 93 | } 94 | }; 95 | 96 | /*--------------------相关设置--------------------*/ 97 | // 设置每次旋转的角度 98 | public void setAngleOneTime(int angleOneTime) { 99 | this.angleOneTime = Math.abs(angleOneTime);// 确保是正的 免得和旋转方向重复 100 | } 101 | 102 | // 设置转动一个角度的时间 103 | public void setDelayMillis(long delayMillis) { 104 | this.delayMillis = Math.max(1, delayMillis);// 避免为负数或一直绘制 105 | } 106 | 107 | // 设置顺时针还是逆时针旋转 108 | public void setClockwise(boolean isClockwise) { 109 | if (this.isClockwise != isClockwise) { 110 | this.isClockwise = isClockwise; 111 | } 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /app/src/main/java/com/aserbao/homepager/scroll_view_linearlayout/AScollViewLinearLayout.java: -------------------------------------------------------------------------------- 1 | package com.aserbao.homepager.scroll_view_linearlayout; 2 | 3 | import android.content.Context; 4 | import android.support.annotation.Nullable; 5 | import android.util.AttributeSet; 6 | import android.view.MotionEvent; 7 | import android.view.View; 8 | import android.view.ViewConfiguration; 9 | import android.widget.LinearLayout; 10 | import android.widget.Scroller; 11 | import android.widget.Toast; 12 | 13 | /** 14 | * description: 15 | * Created by aserbao on 2017/7/15. 16 | */ 17 | 18 | 19 | public class AScollViewLinearLayout extends LinearLayout{ 20 | private Scroller mScroller; 21 | private View mLeftView; 22 | private View mRightView; 23 | 24 | 25 | private float mInitX, mInitY; 26 | private float mOffsetX, mOffsetY; 27 | 28 | public AScollViewLinearLayout(Context context) { 29 | this(context, null); 30 | } 31 | 32 | public AScollViewLinearLayout(Context context, @Nullable AttributeSet attrs) { 33 | super(context, attrs); 34 | init(); 35 | } 36 | 37 | private void init() { 38 | mScroller = new Scroller(getContext(), null, true); 39 | } 40 | 41 | @Override 42 | protected void onFinishInflate() { 43 | super.onFinishInflate(); 44 | if (getChildCount() != 2) { 45 | throw new RuntimeException("Only need two child view! Please check you xml file!"); 46 | } 47 | 48 | mLeftView = getChildAt(0); 49 | mRightView = getChildAt(1); 50 | } 51 | @Override 52 | public boolean dispatchTouchEvent(MotionEvent ev) { 53 | switch (ev.getActionMasked()) { 54 | case MotionEvent.ACTION_DOWN: 55 | mInitX = ev.getX(); 56 | mInitY = ev.getY(); 57 | super.dispatchTouchEvent(ev); 58 | return true; 59 | case MotionEvent.ACTION_MOVE: 60 | //>0为手势向右下 61 | mOffsetX = ev.getX() - mInitX; 62 | mOffsetY = ev.getY() - mInitY; 63 | //横向手势跟随移动 64 | if (Math.abs(mOffsetX) - Math.abs(mOffsetY) > ViewConfiguration.getTouchSlop()) { 65 | int offset = (int) -mOffsetX; 66 | if (getScrollX() + offset > mRightView.getWidth() || getScrollX() + offset < 0) { 67 | return true; 68 | } 69 | this.scrollBy(offset, 0); 70 | mInitX = ev.getX(); 71 | mInitY = ev.getY(); 72 | return true; 73 | } 74 | break; 75 | case MotionEvent.ACTION_CANCEL: 76 | case MotionEvent.ACTION_UP: 77 | //松手时刻滑动 78 | int offset = ((getScrollX() / (float)mRightView.getWidth()) > 0.5) ? mRightView.getWidth() : 0; 79 | // this.scrollTo(offset, 0); 80 | mScroller.startScroll(this.getScrollX(), this.getScrollY(), offset-this.getScrollX(), 0); 81 | invalidate(); 82 | mInitX = 0; 83 | mInitY = 0; 84 | mOffsetX = 0; 85 | mOffsetY = 0; 86 | break; 87 | } 88 | return super.dispatchTouchEvent(ev); 89 | } 90 | @Override 91 | public void computeScroll() { 92 | if (mScroller.computeScrollOffset()) { 93 | this.scrollTo(mScroller.getCurrX(), mScroller.getCurrY()); 94 | postInvalidate(); 95 | } 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /app/src/main/java/com/aserbao/homepager/test/CirclrImageView.java: -------------------------------------------------------------------------------- 1 | package com.aserbao.homepager.test; 2 | 3 | import android.content.Context; 4 | import android.graphics.Canvas; 5 | import android.graphics.Color; 6 | import android.graphics.Paint; 7 | import android.graphics.RectF; 8 | import android.support.annotation.Nullable; 9 | import android.util.AttributeSet; 10 | import android.widget.ImageView; 11 | 12 | /** 13 | * description: 14 | * Created by aserbao on 2017/7/30. 15 | */ 16 | 17 | 18 | public class CirclrImageView extends ImageView { 19 | private int secondRadiu = 58; 20 | private int mCostTime = 10 * 1000; 21 | private float curPostion = 0; 22 | private int mSleepTime = 50; 23 | 24 | public CirclrImageView(Context context) { 25 | this(context,null); 26 | } 27 | 28 | public CirclrImageView(Context context, @Nullable AttributeSet attrs) { 29 | this(context, attrs,0); 30 | } 31 | 32 | public CirclrImageView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { 33 | super(context, attrs, defStyleAttr); 34 | new Thread(new Runnable() { 35 | @Override 36 | public void run() { 37 | while(curPostion <= 360){ 38 | curPostion = curPostion + (360 * mSleepTime) / mCostTime; 39 | try { 40 | Thread.sleep(mSleepTime); 41 | } catch (InterruptedException e) { 42 | e.printStackTrace(); 43 | } 44 | postInvalidate(); 45 | } 46 | } 47 | }).start(); 48 | } 49 | 50 | 51 | @Override 52 | protected void onDraw(Canvas canvas) { 53 | Paint paint = new Paint(); 54 | paint.setColor(Color.RED); 55 | paint.setStyle(Paint.Style.FILL); 56 | paint.setAntiAlias(true); 57 | canvas.drawCircle(getWidth()/2,getHeight()/2,50,paint); 58 | paint.setColor(Color.WHITE); 59 | paint.setStyle(Paint.Style.STROKE); 60 | paint.setStrokeWidth(10); 61 | canvas.drawCircle(getWidth()/2,getHeight()/2,secondRadiu,paint); 62 | RectF rectF = new RectF(getWidth() / 2 - secondRadiu, getHeight() / 2 - secondRadiu, getWidth() / 2 + secondRadiu, getHeight() / 2 + secondRadiu); 63 | paint.setColor(Color.GRAY); 64 | canvas.drawArc(rectF,-90,curPostion,false,paint); 65 | super.onDraw(canvas); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /app/src/main/java/com/aserbao/homepager/test/HelpScrollView.java: -------------------------------------------------------------------------------- 1 | package com.aserbao.homepager.test; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | import android.widget.HorizontalScrollView; 6 | 7 | /** 8 | * description: 9 | * Created by aserbao on 2017/8/11. 10 | */ 11 | 12 | 13 | public class HelpScrollView extends HorizontalScrollView { 14 | public HelpScrollView(Context context) { 15 | this(context,null); 16 | } 17 | 18 | public HelpScrollView(Context context, AttributeSet attrs) { 19 | this(context, attrs,0); 20 | } 21 | 22 | public HelpScrollView(Context context, AttributeSet attrs, int defStyleAttr) { 23 | super(context, attrs, defStyleAttr); 24 | } 25 | /** 26 | * 滑动事件 27 | */ 28 | @Override 29 | public void fling(int velocityY) { 30 | super.fling(velocityY / 4); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/com/aserbao/homepager/test/HorizontalFloatLayoutActivity.java: -------------------------------------------------------------------------------- 1 | package com.aserbao.homepager.test; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import android.support.v7.app.AppCompatActivity; 6 | import android.view.View; 7 | import android.view.WindowManager; 8 | import android.widget.HorizontalScrollView; 9 | import android.widget.ImageView; 10 | import android.widget.Toast; 11 | 12 | import com.aserbao.homepager.R; 13 | import com.aserbao.homepager.activitys.TestActivity; 14 | import com.aserbao.homepager.customview.flowlayout.HorizationFlowLayout; 15 | import com.aserbao.homepager.customview.snowball.ohtersnowball.MainActivity; 16 | 17 | import butterknife.BindView; 18 | import butterknife.ButterKnife; 19 | import butterknife.OnClick; 20 | 21 | public class HorizontalFloatLayoutActivity extends AppCompatActivity implements View.OnLayoutChangeListener { 22 | 23 | @BindView(R.id.flow_layout) 24 | HorizationFlowLayout mFlowLayout; 25 | @BindView(R.id.scroll_flow_layout) 26 | HorizontalScrollView mScrollFlowLayout; 27 | @BindView(R.id.image_view) 28 | ImageView mImageView; 29 | 30 | @Override 31 | protected void onCreate(Bundle savedInstanceState) { 32 | super.onCreate(savedInstanceState); 33 | getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); 34 | setContentView(R.layout.activity_test); 35 | ButterKnife.bind(this); 36 | } 37 | 38 | @Override 39 | public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) { 40 | Toast.makeText(this, "gfhjda", Toast.LENGTH_SHORT).show(); 41 | } 42 | 43 | @OnClick({R.id.help_left, R.id.image_view, R.id.help_right}) 44 | public void onViewClicked(View view) { 45 | switch (view.getId()) { 46 | case R.id.help_left: 47 | startActivity(new Intent(this, TestActivity.class)); 48 | break; 49 | case R.id.image_view: 50 | startActivity(new Intent(this, MainActivity.class)); 51 | break; 52 | case R.id.help_right: 53 | startActivity(new Intent(this, com.aserbao.homepager.MainActivity.class)); 54 | break; 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /app/src/main/java/com/aserbao/homepager/ttt/CustomRelativalayout.java: -------------------------------------------------------------------------------- 1 | package com.aserbao.homepager.ttt; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | import android.view.GestureDetector; 6 | import android.view.MotionEvent; 7 | import android.widget.FrameLayout; 8 | import android.widget.ImageView; 9 | import android.widget.RelativeLayout; 10 | import android.widget.Toast; 11 | 12 | /** 13 | * description: 14 | * Created by aserbao on 2017/7/12. 15 | */ 16 | 17 | 18 | public class CustomRelativalayout extends RelativeLayout implements GestureDetector.OnGestureListener { 19 | private GestureDetector mGestureDetector; 20 | private FrameLayout mOneFragment; 21 | private FrameLayout mThreeFrameLayout; 22 | private FrameLayout mTwoFrameLayout; 23 | private FrameLayout mFourFragment; 24 | private int mOneCutTwoTop; 25 | private ImageView mOne; 26 | private boolean mIsFirstCreat = true; 27 | 28 | public CustomRelativalayout(Context context) { 29 | this(context,null); 30 | } 31 | 32 | public CustomRelativalayout(Context context, AttributeSet attrs) { 33 | this(context, attrs,0); 34 | } 35 | 36 | public CustomRelativalayout(Context context, AttributeSet attrs, int defStyleAttr) { 37 | super(context, attrs, defStyleAttr); 38 | mGestureDetector = new GestureDetector(this); 39 | init(); 40 | } 41 | 42 | private void init() { 43 | 44 | } 45 | 46 | @Override 47 | public boolean onTouchEvent(MotionEvent event) { 48 | mGestureDetector.onTouchEvent(event); 49 | mOneFragment = (FrameLayout) getChildAt(0); 50 | mTwoFrameLayout = (FrameLayout) getChildAt(1); 51 | mThreeFrameLayout = (FrameLayout) getChildAt(2); 52 | mFourFragment = (FrameLayout) getChildAt(3); 53 | if(mIsFirstCreat) { 54 | mOneCutTwoTop = mThreeFrameLayout.getTop() - mOneFragment.getTop(); 55 | mIsFirstCreat = false; 56 | } 57 | return super.onTouchEvent(event); 58 | } 59 | 60 | @Override 61 | public boolean onDown(MotionEvent e) { 62 | return false; 63 | } 64 | 65 | @Override 66 | public void onShowPress(MotionEvent e) { 67 | 68 | } 69 | 70 | @Override 71 | public boolean onSingleTapUp(MotionEvent e) { 72 | return false; 73 | } 74 | 75 | @Override 76 | public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) { 77 | if(mOneFragment.getTop() < getHeight() || distanceY > 0 ){ 78 | if(mOneFragment.getLeft() > 0 || distanceX <0) { 79 | if(mOneFragment.getRight() < getWidth() || distanceX > 0 ) { 80 | if (mOneFragment != null && mThreeFrameLayout.getTop() - mOneFragment.getTop() > mOneCutTwoTop - 20 || distanceY < 0) { 81 | mOneFragment.layout(mOneFragment.getLeft() - (int) distanceX, mOneFragment.getTop() - (int) distanceY, mOneFragment.getRight() - (int) distanceX, mOneFragment.getBottom() - (int) distanceY); 82 | mTwoFrameLayout.layout(mTwoFrameLayout.getLeft() - (int) (distanceX * 2), mTwoFrameLayout.getTop() - (int) (distanceY * 2), mTwoFrameLayout.getRight() - (int) (distanceX * 2), mTwoFrameLayout.getBottom() - (int) (distanceY * 2)); 83 | mThreeFrameLayout.layout(mThreeFrameLayout.getLeft() - (int) (distanceX * 3), mThreeFrameLayout.getTop() - (int) (distanceY * 4), mThreeFrameLayout.getRight() - (int) (distanceX * 3), mThreeFrameLayout.getBottom() - (int) (distanceY * 4)); 84 | mFourFragment.layout(mFourFragment.getLeft() - (int) (distanceX * 4), mFourFragment.getTop() - (int) (distanceY * 6), mFourFragment.getRight() - (int) (distanceX * 4), mFourFragment.getBottom() - (int) (distanceY * 6)); 85 | } else { 86 | mOneFragment.layout(mOneFragment.getLeft() - (int) distanceX, mOneFragment.getTop(), mOneFragment.getRight() - (int) distanceX, mOneFragment.getBottom()); 87 | mTwoFrameLayout.layout(mTwoFrameLayout.getLeft() - (int) (distanceX * 2), mTwoFrameLayout.getTop(), mTwoFrameLayout.getRight() - (int) (distanceX * 2), mTwoFrameLayout.getBottom()); 88 | mThreeFrameLayout.layout(mThreeFrameLayout.getLeft() - (int) (distanceX * 3), mThreeFrameLayout.getTop(), mThreeFrameLayout.getRight() - (int) (distanceX * 3), mThreeFrameLayout.getBottom()); 89 | mFourFragment.layout(mFourFragment.getLeft() - (int) (distanceX * 4), mFourFragment.getTop(), mFourFragment.getRight() - (int) (distanceX * 4), mFourFragment.getBottom()); 90 | } 91 | } 92 | } 93 | } 94 | 95 | Toast.makeText(getContext(), String.valueOf(getHeight()), Toast.LENGTH_SHORT).show(); 96 | return false; 97 | } 98 | 99 | @Override 100 | public void onLongPress(MotionEvent e) { 101 | 102 | } 103 | 104 | @Override 105 | public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { 106 | return false; 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /app/src/main/java/com/aserbao/homepager/ui/surfaveview/GameUI.java: -------------------------------------------------------------------------------- 1 | package com.aserbao.homepager.ui.surfaveview; 2 | 3 | import android.content.Context; 4 | import android.graphics.Bitmap; 5 | import android.graphics.BitmapFactory; 6 | import android.graphics.Canvas; 7 | import android.util.AttributeSet; 8 | import android.view.SurfaceHolder; 9 | import android.view.SurfaceView; 10 | 11 | import com.aserbao.homepager.R; 12 | 13 | import java.util.Random; 14 | 15 | /** 16 | * Created by aserbao on 2017 2017/8/21.7:18 17 | * Email:1142803753@qq.com 18 | * weixin: aserbao 19 | */ 20 | 21 | public class GameUI extends SurfaceView implements SurfaceHolder.Callback{ 22 | private Context mContext ; 23 | private SurfaceHolder mHolder; 24 | private boolean hasSurface = false; 25 | private Random mRandom; 26 | private RenderThread mRenderThread; 27 | 28 | public GameUI(Context context) { 29 | this(context,null); 30 | } 31 | 32 | public GameUI(Context context, AttributeSet attrs) { 33 | this(context, attrs,0); 34 | } 35 | 36 | public GameUI(Context context, AttributeSet attrs, int defStyleAttr) { 37 | super(context, attrs, defStyleAttr); 38 | mRandom = new Random(); 39 | mHolder = this.getHolder(); 40 | mHolder.addCallback(this); 41 | } 42 | 43 | @Override 44 | public void surfaceCreated(SurfaceHolder holder) { 45 | hasSurface = true; 46 | resume(); 47 | } 48 | 49 | private void resume() { 50 | if (mRenderThread == null) { 51 | mRenderThread = new RenderThread(); 52 | if(hasSurface) mRenderThread.start(); 53 | } 54 | } 55 | 56 | @Override 57 | public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { 58 | 59 | } 60 | 61 | @Override 62 | public void surfaceDestroyed(SurfaceHolder holder) { 63 | hasSurface = false; 64 | pause(); 65 | } 66 | 67 | private void pause() { 68 | // 停止图像更新线程 69 | if (mRenderThread != null) 70 | { 71 | mRenderThread.requestExitAndWait(); 72 | mRenderThread = null; 73 | } 74 | } 75 | 76 | private class RenderThread extends Thread { 77 | private boolean done; 78 | 79 | public RenderThread() { 80 | this.done = false; 81 | } 82 | 83 | @Override 84 | public void run() { 85 | // 不停绘制界面 86 | while (!done) { 87 | drawUI(); 88 | try { 89 | Thread.sleep(300); 90 | } catch (InterruptedException e) { 91 | e.printStackTrace(); 92 | } 93 | } 94 | super.run(); 95 | } 96 | 97 | public void requestExitAndWait() { 98 | done = true; 99 | try 100 | { 101 | join(); 102 | } 103 | catch (InterruptedException ex){} 104 | } 105 | } 106 | /** 107 | * 界面绘制 108 | */ 109 | public void drawUI() { 110 | Canvas canvas = mHolder.lockCanvas(); 111 | try { 112 | drawCanvas(canvas); 113 | } catch (Exception e) { 114 | e.printStackTrace(); 115 | } 116 | } 117 | private void drawCanvas(Canvas canvas) { 118 | // 在 canvas 上绘制需要的图形 119 | Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.meteor); 120 | canvas.drawBitmap(bitmap,mRandom.nextInt(1080),mRandom.nextInt(1920),null); 121 | mHolder.unlockCanvasAndPost(canvas); 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /app/src/main/java/com/aserbao/homepager/ui/surfaveview/GameUI2.java: -------------------------------------------------------------------------------- 1 | package com.aserbao.homepager.ui.surfaveview; 2 | 3 | import android.content.Context; 4 | import android.graphics.Bitmap; 5 | import android.graphics.BitmapFactory; 6 | import android.graphics.Canvas; 7 | import android.util.AttributeSet; 8 | import android.view.SurfaceHolder; 9 | import android.view.SurfaceView; 10 | 11 | import com.aserbao.homepager.R; 12 | 13 | import java.util.Random; 14 | 15 | /** 16 | * Created by aserbao on 2017 2017/8/21.7:18 17 | * Email:1142803753@qq.com 18 | * weixin: aserbao 19 | */ 20 | 21 | public class GameUI2 extends SurfaceView implements SurfaceHolder.Callback{ 22 | private Context mContext ; 23 | private SurfaceHolder mHolder; 24 | private boolean isDraw = false; 25 | private Random mRandom; 26 | private RenderThread mRenderThread; 27 | 28 | public GameUI2(Context context) { 29 | this(context,null); 30 | } 31 | 32 | public GameUI2(Context context, AttributeSet attrs) { 33 | this(context, attrs,0); 34 | } 35 | 36 | public GameUI2(Context context, AttributeSet attrs, int defStyleAttr) { 37 | super(context, attrs, defStyleAttr); 38 | mContext = context; 39 | mRandom = new Random(); 40 | mHolder = this.getHolder(); 41 | mHolder.addCallback(this); 42 | mRenderThread = new RenderThread(); 43 | } 44 | 45 | @Override 46 | public void surfaceCreated(SurfaceHolder holder) { 47 | isDraw = true; 48 | mRenderThread.start(); 49 | } 50 | 51 | @Override 52 | public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { 53 | 54 | } 55 | 56 | @Override 57 | public void surfaceDestroyed(SurfaceHolder holder) { 58 | isDraw = false; 59 | } 60 | 61 | private class RenderThread extends Thread { 62 | @Override 63 | public void run() { 64 | // 不停绘制界面 65 | while (isDraw) { 66 | drawUI(); 67 | try { 68 | Thread.sleep(300); 69 | } catch (InterruptedException e) { 70 | e.printStackTrace(); 71 | } 72 | } 73 | super.run(); 74 | } 75 | } 76 | /** 77 | * 界面绘制 78 | */ 79 | public void drawUI() { 80 | Canvas canvas = mHolder.lockCanvas(); 81 | try { 82 | drawCanvas(canvas); 83 | } catch (Exception e) { 84 | e.printStackTrace(); 85 | } 86 | } 87 | private void drawCanvas(Canvas canvas) { 88 | // 在 canvas 上绘制需要的图形 89 | Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.meteor); 90 | canvas.drawBitmap(bitmap,mRandom.nextInt(1080),mRandom.nextInt(1920),null); 91 | mHolder.unlockCanvasAndPost(canvas); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /app/src/main/res/anim/enter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/anim/exit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 17 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/anim/from_bottom_to_middle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/anim/from_middle_to_bottom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/anim/from_middle_to_top.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/anim/from_top_to_middle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | T 4 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/anim/one_star_rotate.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/anim/one_start_enter.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 11 | 20 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/anim/two_star_scale_down.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/anim/two_star_scale_up.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/animator/one_star_rotate.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/help_center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable-hdpi/help_center.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/help_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable-hdpi/help_close.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/help_dian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable-hdpi/help_dian.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/help_guide1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable-hdpi/help_guide1.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/help_guide2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable-hdpi/help_guide2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/help_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable-hdpi/help_left.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/help_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable-hdpi/help_right.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/home_aperture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable-xhdpi/home_aperture.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/home_ball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable-xhdpi/home_ball.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/home_headportrait_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable-xhdpi/home_headportrait_g.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/home_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable-xhdpi/home_light.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/home_lightspot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable-xhdpi/home_lightspot.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/home_maillist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable-xhdpi/home_maillist.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/home_qiuhuan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable-xhdpi/home_qiuhuan.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/home_rankinglist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable-xhdpi/home_rankinglist.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/home_star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable-xhdpi/home_star.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/home_star_halo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable-xhdpi/home_star_halo.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/sowin_pengyou.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable-xhdpi/sowin_pengyou.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/sowin_tongxunlu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable-xhdpi/sowin_tongxunlu.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/sowin_xiantiao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable-xhdpi/sowin_xiantiao.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/sowin_yujian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable-xhdpi/sowin_yujian.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/start1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable-xhdpi/start1.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/home_background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable-xxhdpi/home_background.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/home_xingxing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable-xxhdpi/home_xingxing.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/meteor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable-xxxhdpi/meteor.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/meteor1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable-xxxhdpi/meteor1.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/meteor2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable-xxxhdpi/meteor2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/help_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable/help_bg.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/help_dian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable/help_dian.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/rocketloading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable/rocketloading.gif -------------------------------------------------------------------------------- /app/src/main/res/drawable/tree.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserbao/HomePager/08f005aa8c2464272e7cb37fa9a2c8d9088852db/app/src/main/res/drawable/tree.jpg -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_acroll_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 |