Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
jack921 committed Jun 23, 2017
1 parent 9efb818 commit c6a0529
Show file tree
Hide file tree
Showing 21 changed files with 142 additions and 13 deletions.
1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile project(':bottompopupwindowview')
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity implements View.OnClickListener, BottomPopupWindowView.AnimatorListener {
import com.jack.bottompopupwindowview.AnimatorListener;
import com.jack.bottompopupwindowview.BottomPopupWindowView;

public class MainActivity extends AppCompatActivity implements View.OnClickListener, AnimatorListener {
private BottomPopupWindowView bottomPopupWindowView;
private View contentView;
private View bottomView;
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@

</LinearLayout>

<com.example.jack.bottompopupwindowdemo.BottomPopupWindowView
<com.jack.bottompopupwindowview.BottomPopupWindowView
android:id="@+id/bottom_popup"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@android:color/transparent"
android:layout_alignParentBottom="true">
</com.example.jack.bottompopupwindowdemo.BottomPopupWindowView>
</com.jack.bottompopupwindowview.BottomPopupWindowView>

</RelativeLayout>
1 change: 1 addition & 0 deletions bottompopupwindowview/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
31 changes: 31 additions & 0 deletions bottompopupwindowview/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"

defaultConfig {
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
testCompile 'junit:junit:4.12'
}
25 changes: 25 additions & 0 deletions bottompopupwindowview/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in F:\android\sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.jack.bottompopupwindowview;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.*;

/**
* Instrumentation test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();

assertEquals("com.jack.bottompopupwindowview.test", appContext.getPackageName());
}
}
10 changes: 10 additions & 0 deletions bottompopupwindowview/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"

package="com.jack.bottompopupwindowview">

<application android:allowBackup="true" android:label="@string/app_name"
android:supportsRtl="true">

</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.jack.bottompopupwindowview;

/**
* Created by Administrator on 2017/6/23.
*/

public interface AnimatorListener {
void startValue(int value);
void endValue(int value);
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.jack.bottompopupwindowdemo;
package com.jack.bottompopupwindowview;

import android.animation.ValueAnimator;
import android.content.Context;
Expand All @@ -16,7 +16,7 @@
import android.widget.RelativeLayout;

/**
* Created by Administrator on 2017/6/16.
* Created by Jack on 2017/6/16.
*/

public class BottomPopupWindowView extends LinearLayout{
Expand Down Expand Up @@ -182,9 +182,4 @@ public void onAnimationUpdate(ValueAnimator valueAnimator) {
valueAnimator.start();
}

interface AnimatorListener{
void startValue(int value);
void endValue(int value);
}

}
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions bottompopupwindowview/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<resources>
<string name="app_name">BottomPopupWindowView</string>
</resources>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.jack.bottompopupwindowview;

import org.junit.Test;

import static org.junit.Assert.*;

/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
}
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include ':app'
include ':app', ':bottompopupwindowview'

0 comments on commit c6a0529

Please sign in to comment.