Skip to content
Permalink
Browse files

上交

  • Loading branch information...
peng8350 committed Nov 16, 2016
0 parents commit 864f8f51cb4777e1723def1e950b6b7349f1e7e5
Showing with 3,726 additions and 0 deletions.
  1. +8 −0 .gitignore
  2. +22 −0 .idea/compiler.xml
  3. +3 −0 .idea/copyright/profiles_settings.xml
  4. +19 −0 .idea/gradle.xml
  5. +27 −0 .idea/misc.xml
  6. +10 −0 .idea/modules.xml
  7. +124 −0 .idea/uiDesigner.xml
  8. +6 −0 .idea/vcs.xml
  9. +1 −0 app/.gitignore
  10. BIN app/app-release.apk
  11. +30 −0 app/build.gradle
  12. BIN app/demo1.apk
  13. +17 −0 app/proguard-rules.pro
  14. +20 −0 app/src/main/AndroidManifest.xml
  15. +30 −0 app/src/main/java/com/jpeng/demo/Adapter.java
  16. +85 −0 app/src/main/java/com/jpeng/demo/MainActivity.java
  17. +20 −0 app/src/main/java/com/jpeng/demo/tab1.java
  18. +20 −0 app/src/main/java/com/jpeng/demo/tab2.java
  19. +20 −0 app/src/main/java/com/jpeng/demo/tab3.java
  20. +20 −0 app/src/main/java/com/jpeng/demo/tab4.java
  21. +7 −0 app/src/main/res/drawable/q.xml
  22. +32 −0 app/src/main/res/layout/activity_main.xml
  23. +10 −0 app/src/main/res/layout/tab1.xml
  24. +10 −0 app/src/main/res/layout/tab2.xml
  25. +10 −0 app/src/main/res/layout/tab3.xml
  26. +10 −0 app/src/main/res/layout/tab4.xml
  27. BIN app/src/main/res/mipmap-hdpi/ic_launcher.png
  28. BIN app/src/main/res/mipmap-hdpi/ic_launcher1.png
  29. BIN app/src/main/res/mipmap-hdpi/ic_launcher2.png
  30. BIN app/src/main/res/mipmap-hdpi/ic_launcher3.png
  31. BIN app/src/main/res/mipmap-hdpi/plus.png
  32. BIN app/src/main/res/mipmap-hdpi/plus_selected.png
  33. BIN app/src/main/res/mipmap-mdpi/ic_launcher.png
  34. BIN app/src/main/res/mipmap-xhdpi/ic_launcher.png
  35. BIN app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  36. BIN app/src/main/res/mipmap-xxhdpi/tab1_normal.png
  37. BIN app/src/main/res/mipmap-xxhdpi/tab1_selected.png
  38. BIN app/src/main/res/mipmap-xxhdpi/tab2_normal.png
  39. BIN app/src/main/res/mipmap-xxhdpi/tab2_selected.png
  40. BIN app/src/main/res/mipmap-xxhdpi/tab3_normal.png
  41. BIN app/src/main/res/mipmap-xxhdpi/tab3_selected.png
  42. BIN app/src/main/res/mipmap-xxhdpi/tab4_normal.png
  43. BIN app/src/main/res/mipmap-xxhdpi/tab4_selected.png
  44. BIN app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  45. +6 −0 app/src/main/res/values-w820dp/dimens.xml
  46. +6 −0 app/src/main/res/values/colors.xml
  47. +5 −0 app/src/main/res/values/dimens.xml
  48. +3 −0 app/src/main/res/values/strings.xml
  49. +23 −0 build.gradle
  50. +18 −0 gradle.properties
  51. BIN gradle/wrapper/gradle-wrapper.jar
  52. +6 −0 gradle/wrapper/gradle-wrapper.properties
  53. +160 −0 gradlew
  54. +90 −0 gradlew.bat
  55. +1 −0 library/.gitignore
  56. +41 −0 library/build.gradle
  57. +17 −0 library/proguard-rules.pro
  58. +2 −0 library/src/main/AndroidManifest.xml
  59. +11 −0 library/src/main/java/com/jpeng/jptabbar/BadgeDismissListener.java
  60. +43 −0 library/src/main/java/com/jpeng/jptabbar/DensityUtils.java
  61. +51 −0 library/src/main/java/com/jpeng/jptabbar/JPMiddleTabItem.java
  62. +384 −0 library/src/main/java/com/jpeng/jptabbar/JPTabBar.java
  63. +574 −0 library/src/main/java/com/jpeng/jptabbar/JPTabItem.java
  64. +22 −0 library/src/main/java/com/jpeng/jptabbar/OnTabSelectListener.java
  65. +14 −0 library/src/main/java/com/jpeng/jptabbar/TabException.java
  66. +15 −0 library/src/main/java/com/jpeng/jptabbar/animate/AlphaAnimater.java
  67. +21 −0 library/src/main/java/com/jpeng/jptabbar/animate/Animatable.java
  68. +31 −0 library/src/main/java/com/jpeng/jptabbar/animate/FlipAnimater.java
  69. +28 −0 library/src/main/java/com/jpeng/jptabbar/animate/JumpAnimater.java
  70. +30 −0 library/src/main/java/com/jpeng/jptabbar/animate/RotateAnimater.java
  71. +30 −0 library/src/main/java/com/jpeng/jptabbar/animate/ScaleAnimater.java
  72. +14 −0 library/src/main/java/com/jpeng/jptabbar/anno/BadgeModes.java
  73. +14 −0 library/src/main/java/com/jpeng/jptabbar/anno/NorIcons.java
  74. +14 −0 library/src/main/java/com/jpeng/jptabbar/anno/SeleIcons.java
  75. +17 −0 library/src/main/java/com/jpeng/jptabbar/anno/Titles.java
  76. +97 −0 library/src/main/java/com/jpeng/jptabbar/badgeview/BadgeImageView.java
  77. +10 −0 library/src/main/java/com/jpeng/jptabbar/badgeview/BadgeMode.java
  78. +471 −0 library/src/main/java/com/jpeng/jptabbar/badgeview/BadgeViewHelper.java
  79. +90 −0 library/src/main/java/com/jpeng/jptabbar/badgeview/BadgeViewUtil.java
  80. +95 −0 library/src/main/java/com/jpeng/jptabbar/badgeview/Badgeable.java
  81. +479 −0 library/src/main/java/com/jpeng/jptabbar/badgeview/DragBadgeView.java
  82. +32 −0 library/src/main/java/com/jpeng/jptabbar/badgeview/DragDismissDelegate.java
  83. +171 −0 library/src/main/java/com/jpeng/jptabbar/badgeview/ExplosionAnimator.java
  84. +28 −0 library/src/main/res/values/attrs.xml
  85. BIN screenshots/1.gif
  86. BIN screenshots/2.gif
  87. BIN screenshots/3.gif
  88. BIN screenshots/main.gif
  89. +1 −0 settings.gradle
@@ -0,0 +1,8 @@
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
<entry name="!?*.form" />
<entry name="!?*.class" />
<entry name="!?*.groovy" />
<entry name="!?*.scala" />
<entry name="!?*.flex" />
<entry name="!?*.kt" />
<entry name="!?*.clj" />
<entry name="!?*.aj" />
</wildcardResourcePatterns>
<annotationProcessing>
<profile default="true" name="Default" enabled="false">
<processorPath useClasspath="true" />
</profile>
</annotationProcessing>
</component>
</project>
@@ -0,0 +1,3 @@
<component name="CopyrightManager">
<settings default="" />
</component>
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
<option value="$PROJECT_DIR$/library" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
</GradleProjectSettings>
</option>
</component>
</project>
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EclipseCodeFormatter">
<option name="defaultSettings" value="true" />
<option name="id" value="1478973321703" />
<option name="name" value="default" />
</component>
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/modules/JPTabBar.iml" filepath="$PROJECT_DIR$/.idea/modules/JPTabBar.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/app/app.iml" filepath="$PROJECT_DIR$/.idea/modules/app/app.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/library/library.iml" filepath="$PROJECT_DIR$/.idea/modules/library/library.iml" />
</modules>
</component>
</project>
@@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
@@ -0,0 +1 @@
/build
BIN +607 KB app/app-release.apk
Binary file not shown.
@@ -0,0 +1,30 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
lintOptions {

abortOnError false

}
defaultConfig {
applicationId "com.jpeng.jptabbar"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile project(':library')
compile 'com.android.support:support-v4:24.0.0'
compile 'com.nineoldandroids:library:2.4.0'
}
BIN +607 KB app/demo1.apk
Binary file not shown.
@@ -0,0 +1,17 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /home/jpeng/android开发/android-sdk-linux/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 *;
#}
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.jpeng.demo" >

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
>
<activity android:name="com.jpeng.demo.MainActivity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>
@@ -0,0 +1,30 @@
package com.jpeng.demo;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
* Created by jpeng on 16-11-14.
*/
public class Adapter extends FragmentPagerAdapter{
private List<Fragment> list;

public Adapter(FragmentManager fm, List<Fragment> list) {
super(fm);
this.list = list;
}

@Override
public Fragment getItem(int position) {
return list.get(position);
}


@Override
public int getCount() {
return list.size();
}
}

0 comments on commit 864f8f5

Please sign in to comment.
You can’t perform that action at this time.