Showing preview only (388K chars total). Download the full file or copy to clipboard to get everything.
Repository: avenwu/support
Branch: master
Commit: b566821c29f8
Files: 170
Total size: 339.0 KB
Directory structure:
gitextract_cenee9ug/
├── .gitignore
├── LICENSE
├── README.md
├── build.gradle
├── gradle/
│ └── wrapper/
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── sample/
│ ├── .gitignore
│ ├── build.gradle
│ ├── libs/
│ │ ├── AnnotationProcessorTest.jar
│ │ └── markdown4j-2.2.jar
│ ├── proguard-rules.pro
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── com/
│ │ └── avenwu/
│ │ └── deepinandroid/
│ │ └── ApplicationTest.java
│ └── main/
│ ├── AndroidManifest.xml
│ ├── assets/
│ │ └── github-markdown.css
│ ├── java/
│ │ └── com/
│ │ └── avenwu/
│ │ └── deepinandroid/
│ │ ├── AnimatedSubActivity.java
│ │ ├── BitmapShaderFragment.java
│ │ ├── BreathLightViewDemo.java
│ │ ├── BusEventDemo.java
│ │ ├── CameraMatrixFragmentDemo.java
│ │ ├── ColorFilterDemo.java
│ │ ├── Content.java
│ │ ├── CurtainLayoutFragment.java
│ │ ├── CustomDrawableDemo.java
│ │ ├── CustomProgressActivity.java
│ │ ├── CustomTabActivity.java
│ │ ├── CustomTextViewActivity.java
│ │ ├── DrawerDemoFragment.java
│ │ ├── ExifViewerFragment.java
│ │ ├── FeatureActivity.java
│ │ ├── FlipFragmentDemo.java
│ │ ├── GradientColorFragment.java
│ │ ├── LargeHeightImageDisplayFragment.java
│ │ ├── LinearGradientView.java
│ │ ├── MainActivity.java
│ │ ├── MarkdownDemo.java
│ │ ├── QQDraggingCircleDemo.java
│ │ ├── RefreshDemoFragment.java
│ │ ├── RefreshWidgetActivity.java
│ │ ├── ScaleSubActivity.java
│ │ ├── ShortcutDemo.java
│ │ ├── SlideMenuFragment.java
│ │ ├── SlidePanelDemo.java
│ │ ├── StackZFragment.java
│ │ ├── StyledRadioButtonDemo.java
│ │ ├── TagInputDemo.java
│ │ ├── TypefaceActivity.java
│ │ ├── WindowAnimationFragment.java
│ │ ├── eventbus/
│ │ │ ├── Bus.java
│ │ │ ├── Finder.java
│ │ │ ├── NameBasedFinder.java
│ │ │ ├── PostHandler.java
│ │ │ └── Subscriber.java
│ │ └── util/
│ │ ├── SystemUiHider.java
│ │ ├── SystemUiHiderBase.java
│ │ └── SystemUiHiderHoneycomb.java
│ └── res/
│ ├── anim/
│ │ ├── scale_up_left.xml
│ │ ├── scale_up_rightt.xml
│ │ ├── slide_in_left.xml
│ │ ├── slide_in_right.xml
│ │ ├── slide_out_left.xml
│ │ └── slide_out_right.xml
│ ├── color/
│ │ ├── radio_button_color.xml
│ │ ├── radio_button_color_blue.xml
│ │ ├── radio_button_color_green.xml
│ │ ├── radio_button_color_light_blue.xml
│ │ ├── radio_button_color_orange.xml
│ │ └── radio_button_color_purple.xml
│ ├── drawable/
│ │ ├── animate_drawable.xml
│ │ ├── flat_round_shape_left.xml
│ │ ├── flat_round_shape_middle.xml
│ │ └── flat_round_shape_right.xml
│ ├── layout/
│ │ ├── activity_main.xml
│ │ ├── activity_markdown_demo.xml
│ │ ├── activity_my.xml
│ │ ├── activity_progress_layout.xml
│ │ ├── activity_refresh_widget.xml
│ │ ├── activity_typeface.xml
│ │ ├── activity_window_anim_sub.xml
│ │ ├── activity_window_scale_sub.xml
│ │ ├── animation_layout.xml
│ │ ├── bitmap_shader_layout.xml
│ │ ├── breath_light_layout.xml
│ │ ├── camera_matrix_layout.xml
│ │ ├── chat_layout.xml
│ │ ├── curtain_demo.xml
│ │ ├── custom_drawable_layout.xml
│ │ ├── custom_tab_activity.xml
│ │ ├── eventbus_layout.xml
│ │ ├── exif_layout.xml
│ │ ├── feature_item_layout.xml
│ │ ├── feature_layout.xml
│ │ ├── filter_layout.xml
│ │ ├── flip_layout.xml
│ │ ├── fragment_stack_z.xml
│ │ ├── fragment_tab_host.xml
│ │ ├── fragment_tab_item.xml
│ │ ├── gradient_layout.xml
│ │ ├── markdown_edit.xml
│ │ ├── qq_dragging_circle_layout.xml
│ │ ├── ripple_layout.xml
│ │ ├── shorcut_layout.xml
│ │ ├── slide_layout.xml
│ │ ├── slidepanel_layout.xml
│ │ ├── styled_radio_button.xml
│ │ ├── tag_item.xml
│ │ ├── test_tag_input_layout.xml
│ │ └── textview_layout.xml
│ ├── menu/
│ │ ├── markdown_menu.xml
│ │ ├── menu_main.xml
│ │ └── menu_typeface.xml
│ ├── values/
│ │ ├── arrays.xml
│ │ ├── attrs.xml
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ ├── values-v11/
│ │ └── styles.xml
│ ├── values-w820dp/
│ │ └── dimens.xml
│ └── values-zh/
│ └── strings.xml
├── settings.gradle
└── support/
├── .gitignore
├── build.gradle
├── custom_mvn_push.gradle
├── proguard-rules.pro
└── src/
├── androidTest/
│ └── java/
│ └── net/
│ └── avenwu/
│ └── support/
│ └── ApplicationTest.java
└── main/
├── AndroidManifest.xml
├── java/
│ └── net/
│ └── avenwu/
│ └── support/
│ ├── presenter/
│ │ ├── Presenter.java
│ │ ├── PresenterActivity.java
│ │ └── PresenterFragment.java
│ ├── protocol/
│ │ ├── RenderAction.java
│ │ └── UIAction.java
│ ├── util/
│ │ ├── BitmapUtil.java
│ │ ├── ChartSet.java
│ │ ├── Device.java
│ │ ├── ReflectionUtils.java
│ │ ├── TypefaceContextWrapper.java
│ │ ├── TypefaceLayoutInflator.java
│ │ ├── TypefaceUtils.java
│ │ └── ViewCompat.java
│ └── widget/
│ ├── BreathingDelegate.java
│ ├── BreathingLayout.java
│ ├── CurtainLayout.java
│ ├── CustomSlidePanelLayout.java
│ ├── DimImageView.java
│ ├── DrawerFrame.java
│ ├── DrawerFrameV2.java
│ ├── ExProgressView.java
│ ├── ExTextView.java
│ ├── FlatTabGroup.java
│ ├── FlipLayout.java
│ ├── MatrixFrameLayout.java
│ ├── PolygonWithQuadraticBezirView.java
│ ├── RefreshLayout.java
│ ├── SegmentDrawable.java
│ ├── ShaderImageView.java
│ ├── SimpleTab.java
│ ├── SimpleTabLayout.java
│ └── TagFlowLayout.java
└── res/
├── drawable/
│ └── toast_shape.xml
├── layout/
│ └── custom_toast.xml
└── values/
├── attr_breath_light.xml
├── attr_dim_imagview.xml
├── attr_ex_textview.xml
├── attr_flat_tab_group.xml
├── attrs_drawer_frame.xml
├── ids.xml
└── strings.xml
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
**/*.iml
.idea
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2014 Chaobin WU
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: README.md
================================================
Support
========
Custom Android support library, include some useful utils and widget.
support内是自定义的一些东西,sammple中包含support的实现demo样例,
Download
-------
Download the latest repo or grab the stable released version via Maven:
Clone the master branch:
```
git clone https://github.com/avenwu/support.git
```
or Gradle:
```Groovy
compile 'com.github.avenwu:support:0.1.1'
```
License
=======
Copyright 2014 Chaobin Wu.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
---
实战案例
-------
### 卡片翻转优化

### TextView缩略
通过控制文本展示实现单击展开和收缩文本,并在收缩状态显示提示图标

### 字体设置汇总
通过不同方式实现自定义字体的设置,主要区别在于调用层

### 巧用BitmapShader
通过为Paint画笔设置Shader,可以再画布上绘制许多有意思的东西

### Property自定义属性动画
基于Property的自定义属性动画

### 自定义ResideMenu
residemenu是是侧滑菜单的一种,但是视觉效果更特别,此次实现是基于android v4中SlidePanelLayout扩展而来,主要是为了减少非核心代码的开发工作。
详细实现请看:[基于SlidePanelLayout实现ResideMenu](http://avenwu.net/2015/02/24/custom_slide_panel_layout_as_reside_style_on_dribble_and_qq)
对于普通侧滑菜单的实现也可以参照我之前的一片文章[自定义侧滑菜单](http://avenwu.net/customlayout/2014/12/16/sliding_menu/)

### RadioGroup仿iOS Segmented Control
这个没什么好说的用的实际上是RadioGroup,但是加强了封装和配置,所以使用会方便一些,否则每次需要类似UI效果都从新写是很累的事情。

### 流式标签生成控件
这个东西还是比较有意思的,看图说话,通过EditText和TextView以及ViewGroup的有机结合,就可以做出这个效果不一般的输入交互控件。
详细技术实现请看:[流式标签生成控件](http://avenwu.net/customlayout/2015/01/18/tag_layout)

### qq消息气泡【二次贝塞尔曲线多边形】
这个实际上是做为分析QQ红点气泡的一部分,及气泡拖拽的原理。

### 侧滑菜单
简单的侧滑效果实现并不难,需要处理两块view容器的相对关系,但是有效果并不代表能使用,可实用的组件还需要考虑很多,下面的demo实际上主要目的在于处理菜单和内容区的位置关系,用的是scroll移动的方法,结合Scroller,所以导致变化的实际上是菜单容器的内容而不是菜单,所以support里还有另外一个自定义侧滑菜单解决这个问题。更多技术实现参考对应的文章:[自定义侧滑菜单](http://avenwu.net/customlayout/2014/12/16/sliding_menu/)

### 下拉刷新列表
下拉刷新的本质上是LinearLayout嵌套ListView+View(刷新的头部视图),通过TouchEvent的分发控制,动态改变视图的Top位置。

### 圆形排行View
这个实际上最开是的时候已经作为一个单独的项目开发,并且已经上传值maven,所以也可用gradle导入。
[IndexImageView项目首页](http://avenwu.net/IndexImageView/)
这个项目源灵感来自搜狐视屏客户端,看好声音的时候看到人气选手的头像是一个圆形带排行数的视图,感觉有点意思,索性花了点时间自己写了一个,同时学习如何将开源项目发布到Maven Central,这样就可以通过gradle方便的获取maven依赖库。

================================================
FILE: build.gradle
================================================
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
================================================
FILE: gradle/wrapper/gradle-wrapper.properties
================================================
#Wed Apr 10 15:27:10 PDT 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
================================================
FILE: gradle.properties
================================================
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
================================================
FILE: gradlew
================================================
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >&-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
================================================
FILE: gradlew.bat
================================================
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
================================================
FILE: sample/.gitignore
================================================
/build
================================================
FILE: sample/build.gradle
================================================
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.avenwu.deepinandroid"
minSdkVersion 8
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
lintOptions {
abortOnError false
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/services/javax.annotation.processing.Processor'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':support')
compile 'com.jakewharton:butterknife:6.0.0'
compile 'com.github.avenwu:IndexImageView:1.0.1'
compile 'com.drewnoakes:metadata-extractor:2.7.2'
compile 'com.android.support:support-v4:23.1.0'
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:percent:23.1.0'
compile 'com.squareup.retrofit:retrofit:1.6.0'
}
================================================
FILE: sample/proguard-rules.pro
================================================
# 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 *;
#}
================================================
FILE: sample/src/androidTest/java/com/avenwu/deepinandroid/ApplicationTest.java
================================================
package com.avenwu.deepinandroid;
import android.app.Application;
import android.test.ApplicationTestCase;
import android.util.Log;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
final static char ASSIC_START = '!';
final static char ASSIC_END = '~';
final static char UNICODE_START = '!';
final static char UNICODE_END = '~';
final static long DIFF = UNICODE_START - ASSIC_START;
public void testEncodeFormat() {
String res = ",!@#%&*()?;";
String des = ",!@#%&*()?;";
StringBuilder builder = new StringBuilder();
for (int i = 0; i < res.length(); i++) {
char c = res.charAt(i);
Log.e("TEST_UNICODE", "" + c);
if (isEXPANDUNICODE(c)) {
c = unicode2Assic(c);
Log.e("TEST_UNICODE", "translated:" + c);
}
builder.append(c);
}
assertEquals(des, builder.toString());
}
boolean isBasicASSIC(char c) {
return c >= ASSIC_START && c <= ASSIC_END;
}
boolean isEXPANDUNICODE(char c) {
return c >= UNICODE_START && c <= UNICODE_END;
}
char unicode2Assic(char c) {
return (char) (c - DIFF);
}
}
================================================
FILE: sample/src/main/AndroidManifest.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.avenwu.deepinandroid" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".ShortcutDemo" />
<activity android:name=".RefreshWidgetActivity" />
<activity android:name=".QQDraggingCircleDemo" />
<activity
android:name=".TagInputDemo"
android:windowSoftInputMode="stateVisible" />
<activity android:name=".BusEventDemo" />
<activity android:name=".ColorFilterDemo" />
<activity
android:name=".MarkdownDemo"
android:label="@string/title_activity_markdown_demo" />
<activity android:name=".StyledRadioButtonDemo" />
<activity
android:name=".SlidePanelDemo"
android:theme="@style/Theme.AppCompat.NoActionBar" />
<activity android:name=".AnimatedSubActivity" />
<activity
android:name=".ScaleSubActivity"
android:theme="@style/Transparent" />
<activity android:name=".CustomTabActivity" />
<activity
android:name=".FeatureActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/title_activity_feature"
android:theme="@style/FullscreenTheme" >
</activity>
<activity
android:name=".TypefaceActivity"
android:label="@string/title_activity_typeface" >
</activity>
<activity android:name=".CustomProgressActivity"
android:label="Progress"/>
<activity android:name=".CustomTextViewActivity"
android:label="TextView"/>
<activity android:name=".CustomDrawableDemo"
android:label="Custom Drawable"/>
</application>
</manifest>
================================================
FILE: sample/src/main/assets/github-markdown.css
================================================
@font-face {
font-family: octicons-anchor;
src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAYcAA0AAAAACjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABMAAAABwAAAAca8vGTk9TLzIAAAFMAAAARAAAAFZG1VHVY21hcAAAAZAAAAA+AAABQgAP9AdjdnQgAAAB0AAAAAQAAAAEACICiGdhc3AAAAHUAAAACAAAAAj//wADZ2x5ZgAAAdwAAADRAAABEKyikaNoZWFkAAACsAAAAC0AAAA2AtXoA2hoZWEAAALgAAAAHAAAACQHngNFaG10eAAAAvwAAAAQAAAAEAwAACJsb2NhAAADDAAAAAoAAAAKALIAVG1heHAAAAMYAAAAHwAAACABEAB2bmFtZQAAAzgAAALBAAAFu3I9x/Nwb3N0AAAF/AAAAB0AAAAvaoFvbwAAAAEAAAAAzBdyYwAAAADP2IQvAAAAAM/bz7t4nGNgZGFgnMDAysDB1Ml0hoGBoR9CM75mMGLkYGBgYmBlZsAKAtJcUxgcPsR8iGF2+O/AEMPsznAYKMwIkgMA5REMOXicY2BgYGaAYBkGRgYQsAHyGMF8FgYFIM0ChED+h5j//yEk/3KoSgZGNgYYk4GRCUgwMaACRoZhDwCs7QgGAAAAIgKIAAAAAf//AAJ4nHWMMQrCQBBF/0zWrCCIKUQsTDCL2EXMohYGSSmorScInsRGL2DOYJe0Ntp7BK+gJ1BxF1stZvjz/v8DRghQzEc4kIgKwiAppcA9LtzKLSkdNhKFY3HF4lK69ExKslx7Xa+vPRVS43G98vG1DnkDMIBUgFN0MDXflU8tbaZOUkXUH0+U27RoRpOIyCKjbMCVejwypzJJG4jIwb43rfl6wbwanocrJm9XFYfskuVC5K/TPyczNU7b84CXcbxks1Un6H6tLH9vf2LRnn8Ax7A5WQAAAHicY2BkYGAA4teL1+yI57f5ysDNwgAC529f0kOmWRiYVgEpDgYmEA8AUzEKsQAAAHicY2BkYGB2+O/AEMPCAAJAkpEBFbAAADgKAe0EAAAiAAAAAAQAAAAEAAAAAAAAKgAqACoAiAAAeJxjYGRgYGBhsGFgYgABEMkFhAwM/xn0QAIAD6YBhwB4nI1Ty07cMBS9QwKlQapQW3VXySvEqDCZGbGaHULiIQ1FKgjWMxknMfLEke2A+IJu+wntrt/QbVf9gG75jK577Lg8K1qQPCfnnnt8fX1NRC/pmjrk/zprC+8D7tBy9DHgBXoWfQ44Av8t4Bj4Z8CLtBL9CniJluPXASf0Lm4CXqFX8Q84dOLnMB17N4c7tBo1AS/Qi+hTwBH4rwHHwN8DXqQ30XXAS7QaLwSc0Gn8NuAVWou/gFmnjLrEaEh9GmDdDGgL3B4JsrRPDU2hTOiMSuJUIdKQQayiAth69r6akSSFqIJuA19TrzCIaY8sIoxyrNIrL//pw7A2iMygkX5vDj+G+kuoLdX4GlGK/8Lnlz6/h9MpmoO9rafrz7ILXEHHaAx95s9lsI7AHNMBWEZHULnfAXwG9/ZqdzLI08iuwRloXE8kfhXYAvE23+23DU3t626rbs8/8adv+9DWknsHp3E17oCf+Z48rvEQNZ78paYM38qfk3v/u3l3u3GXN2Dmvmvpf1Srwk3pB/VSsp512bA/GG5i2WJ7wu430yQ5K3nFGiOqgtmSB5pJVSizwaacmUZzZhXLlZTq8qGGFY2YcSkqbth6aW1tRmlaCFs2016m5qn36SbJrqosG4uMV4aP2PHBmB3tjtmgN2izkGQyLWprekbIntJFing32a5rKWCN/SdSoga45EJykyQ7asZvHQ8PTm6cslIpwyeyjbVltNikc2HTR7YKh9LBl9DADC0U/jLcBZDKrMhUBfQBvXRzLtFtjU9eNHKin0x5InTqb8lNpfKv1s1xHzTXRqgKzek/mb7nB8RZTCDhGEX3kK/8Q75AmUM/eLkfA+0Hi908Kx4eNsMgudg5GLdRD7a84npi+YxNr5i5KIbW5izXas7cHXIMAau1OueZhfj+cOcP3P8MNIWLyYOBuxL6DRylJ4cAAAB4nGNgYoAALjDJyIAOWMCiTIxMLDmZedkABtIBygAAAA==) format('woff');
}
.markdown-body {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
color: #333;
overflow: hidden;
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif;
font-size: 16px;
line-height: 1.6;
word-wrap: break-word;
}
.markdown-body a {
background: transparent;
}
.markdown-body a:active,
.markdown-body a:hover {
outline: 0;
}
.markdown-body strong {
font-weight: bold;
}
.markdown-body h1 {
font-size: 2em;
margin: 0.67em 0;
}
.markdown-body img {
border: 0;
}
.markdown-body hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
.markdown-body pre {
overflow: auto;
}
.markdown-body code,
.markdown-body kbd,
.markdown-body pre {
font-family: monospace, monospace;
font-size: 1em;
}
.markdown-body input {
color: inherit;
font: inherit;
margin: 0;
}
.markdown-body html input[disabled] {
cursor: default;
}
.markdown-body input {
line-height: normal;
}
.markdown-body input[type="checkbox"] {
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
.markdown-body table {
border-collapse: collapse;
border-spacing: 0;
}
.markdown-body td,
.markdown-body th {
padding: 0;
}
.markdown-body * {
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body input {
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
}
.markdown-body a {
color: #4183c4;
text-decoration: none;
}
.markdown-body a:hover,
.markdown-body a:focus,
.markdown-body a:active {
text-decoration: underline;
}
.markdown-body hr {
height: 0;
margin: 15px 0;
overflow: hidden;
background: transparent;
border: 0;
border-bottom: 1px solid #ddd;
}
.markdown-body hr:before {
display: table;
content: "";
}
.markdown-body hr:after {
display: table;
clear: both;
content: "";
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
margin-top: 15px;
margin-bottom: 15px;
line-height: 1.1;
}
.markdown-body h1 {
font-size: 30px;
}
.markdown-body h2 {
font-size: 21px;
}
.markdown-body h3 {
font-size: 16px;
}
.markdown-body h4 {
font-size: 14px;
}
.markdown-body h5 {
font-size: 12px;
}
.markdown-body h6 {
font-size: 11px;
}
.markdown-body blockquote {
margin: 0;
}
.markdown-body ul,
.markdown-body ol {
padding: 0;
margin-top: 0;
margin-bottom: 0;
}
.markdown-body ol ol,
.markdown-body ul ol {
list-style-type: lower-roman;
}
.markdown-body ul ul ol,
.markdown-body ul ol ol,
.markdown-body ol ul ol,
.markdown-body ol ol ol {
list-style-type: lower-alpha;
}
.markdown-body dd {
margin-left: 0;
}
.markdown-body code {
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
.markdown-body pre {
margin-top: 0;
margin-bottom: 0;
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
.markdown-body kbd {
background-color: #e7e7e7;
background-image: -webkit-linear-gradient(#fefefe, #e7e7e7);
background-image: linear-gradient(#fefefe, #e7e7e7);
background-repeat: repeat-x;
border-radius: 2px;
border: 1px solid #cfcfcf;
color: #000;
padding: 3px 5px;
line-height: 10px;
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
display: inline-block;
}
.markdown-body>*:first-child {
margin-top: 0 !important;
}
.markdown-body>*:last-child {
margin-bottom: 0 !important;
}
.markdown-body .anchor {
position: absolute;
top: 0;
bottom: 0;
left: 0;
display: block;
padding-right: 6px;
padding-left: 30px;
margin-left: -30px;
}
.markdown-body .anchor:focus {
outline: none;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
position: relative;
margin-top: 1em;
margin-bottom: 16px;
font-weight: bold;
line-height: 1.4;
}
.markdown-body h1 .octicon-link,
.markdown-body h2 .octicon-link,
.markdown-body h3 .octicon-link,
.markdown-body h4 .octicon-link,
.markdown-body h5 .octicon-link,
.markdown-body h6 .octicon-link {
display: none;
color: #000;
vertical-align: middle;
}
.markdown-body h1:hover .anchor,
.markdown-body h2:hover .anchor,
.markdown-body h3:hover .anchor,
.markdown-body h4:hover .anchor,
.markdown-body h5:hover .anchor,
.markdown-body h6:hover .anchor {
height: 1em;
padding-left: 8px;
margin-left: -30px;
line-height: 1;
text-decoration: none;
}
.markdown-body h1:hover .anchor .octicon-link,
.markdown-body h2:hover .anchor .octicon-link,
.markdown-body h3:hover .anchor .octicon-link,
.markdown-body h4:hover .anchor .octicon-link,
.markdown-body h5:hover .anchor .octicon-link,
.markdown-body h6:hover .anchor .octicon-link {
display: inline-block;
}
.markdown-body h1 {
padding-bottom: 0.3em;
font-size: 2.25em;
line-height: 1.2;
border-bottom: 1px solid #eee;
}
.markdown-body h2 {
padding-bottom: 0.3em;
font-size: 1.75em;
line-height: 1.225;
border-bottom: 1px solid #eee;
}
.markdown-body h3 {
font-size: 1.5em;
line-height: 1.43;
}
.markdown-body h4 {
font-size: 1.25em;
}
.markdown-body h5 {
font-size: 1em;
}
.markdown-body h6 {
font-size: 1em;
color: #777;
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}
.markdown-body hr {
height: 4px;
padding: 0;
margin: 16px 0;
background-color: #e7e7e7;
border: 0 none;
}
.markdown-body ul,
.markdown-body ol {
padding-left: 2em;
}
.markdown-body ul ul,
.markdown-body ul ol,
.markdown-body ol ol,
.markdown-body ol ul {
margin-top: 0;
margin-bottom: 0;
}
.markdown-body li>p {
margin-top: 16px;
}
.markdown-body dl {
padding: 0;
}
.markdown-body dl dt {
padding: 0;
margin-top: 16px;
font-size: 1em;
font-style: italic;
font-weight: bold;
}
.markdown-body dl dd {
padding: 0 16px;
margin-bottom: 16px;
}
.markdown-body blockquote {
padding: 0 15px;
color: #777;
border-left: 4px solid #ddd;
}
.markdown-body blockquote>:first-child {
margin-top: 0;
}
.markdown-body blockquote>:last-child {
margin-bottom: 0;
}
.markdown-body table {
display: block;
width: 100%;
overflow: auto;
word-break: normal;
word-break: keep-all;
}
.markdown-body table th {
font-weight: bold;
}
.markdown-body table th,
.markdown-body table td {
padding: 6px 13px;
border: 1px solid #ddd;
}
.markdown-body table tr {
background-color: #fff;
border-top: 1px solid #ccc;
}
.markdown-body table tr:nth-child(2n) {
background-color: #f8f8f8;
}
.markdown-body img {
max-width: 100%;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body code {
padding: 0;
padding-top: 0.2em;
padding-bottom: 0.2em;
margin: 0;
font-size: 85%;
background-color: rgba(0,0,0,0.04);
border-radius: 3px;
}
.markdown-body code:before,
.markdown-body code:after {
letter-spacing: -0.2em;
content: "\00a0";
}
.markdown-body pre>code {
padding: 0;
margin: 0;
font-size: 100%;
word-break: normal;
white-space: pre;
background: transparent;
border: 0;
}
.markdown-body .highlight {
margin-bottom: 16px;
}
.markdown-body .highlight pre,
.markdown-body pre {
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
background-color: #f7f7f7;
border-radius: 3px;
}
.markdown-body .highlight pre {
margin-bottom: 0;
word-break: normal;
}
.markdown-body pre {
word-wrap: normal;
}
.markdown-body pre code {
display: inline;
max-width: initial;
padding: 0;
margin: 0;
overflow: initial;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
}
.markdown-body pre code:before,
.markdown-body pre code:after {
content: normal;
}
.markdown-body .highlight {
background: #fff;
}
.markdown-body .highlight .mf,
.markdown-body .highlight .mh,
.markdown-body .highlight .mi,
.markdown-body .highlight .mo,
.markdown-body .highlight .il,
.markdown-body .highlight .m {
color: #945277;
}
.markdown-body .highlight .s,
.markdown-body .highlight .sb,
.markdown-body .highlight .sc,
.markdown-body .highlight .sd,
.markdown-body .highlight .s2,
.markdown-body .highlight .se,
.markdown-body .highlight .sh,
.markdown-body .highlight .si,
.markdown-body .highlight .sx,
.markdown-body .highlight .s1 {
color: #df5000;
}
.markdown-body .highlight .kc,
.markdown-body .highlight .kd,
.markdown-body .highlight .kn,
.markdown-body .highlight .kp,
.markdown-body .highlight .kr,
.markdown-body .highlight .kt,
.markdown-body .highlight .k,
.markdown-body .highlight .o {
font-weight: bold;
}
.markdown-body .highlight .kt {
color: #458;
}
.markdown-body .highlight .c,
.markdown-body .highlight .cm,
.markdown-body .highlight .c1 {
color: #998;
font-style: italic;
}
.markdown-body .highlight .cp,
.markdown-body .highlight .cs {
color: #999;
font-weight: bold;
}
.markdown-body .highlight .cs {
font-style: italic;
}
.markdown-body .highlight .n {
color: #333;
}
.markdown-body .highlight .na,
.markdown-body .highlight .nv,
.markdown-body .highlight .vc,
.markdown-body .highlight .vg,
.markdown-body .highlight .vi {
color: #008080;
}
.markdown-body .highlight .nb {
color: #0086B3;
}
.markdown-body .highlight .nc {
color: #458;
font-weight: bold;
}
.markdown-body .highlight .no {
color: #094e99;
}
.markdown-body .highlight .ni {
color: #800080;
}
.markdown-body .highlight .ne {
color: #990000;
font-weight: bold;
}
.markdown-body .highlight .nf {
color: #945277;
font-weight: bold;
}
.markdown-body .highlight .nn {
color: #555;
}
.markdown-body .highlight .nt {
color: #000080;
}
.markdown-body .highlight .err {
color: #a61717;
background-color: #e3d2d2;
}
.markdown-body .highlight .gd {
color: #000;
background-color: #fdd;
}
.markdown-body .highlight .gd .x {
color: #000;
background-color: #faa;
}
.markdown-body .highlight .ge {
font-style: italic;
}
.markdown-body .highlight .gr {
color: #aa0000;
}
.markdown-body .highlight .gh {
color: #999;
}
.markdown-body .highlight .gi {
color: #000;
background-color: #dfd;
}
.markdown-body .highlight .gi .x {
color: #000;
background-color: #afa;
}
.markdown-body .highlight .go {
color: #888;
}
.markdown-body .highlight .gp {
color: #555;
}
.markdown-body .highlight .gs {
font-weight: bold;
}
.markdown-body .highlight .gu {
color: #800080;
font-weight: bold;
}
.markdown-body .highlight .gt {
color: #aa0000;
}
.markdown-body .highlight .ow {
font-weight: bold;
}
.markdown-body .highlight .w {
color: #bbb;
}
.markdown-body .highlight .sr {
color: #017936;
}
.markdown-body .highlight .ss {
color: #8b467f;
}
.markdown-body .highlight .bp {
color: #999;
}
.markdown-body .highlight .gc {
color: #999;
background-color: #EAF2F5;
}
.markdown-body .octicon {
font: normal normal 16px octicons-anchor;
line-height: 1;
display: inline-block;
text-decoration: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.markdown-body .octicon-link:before {
content: '\f05c';
}
.markdown-body .task-list-item {
list-style-type: none;
}
.markdown-body .task-list-item+.task-list-item {
margin-top: 3px;
}
.markdown-body .task-list-item input {
float: left;
margin: 0.3em 0 0.25em -1.6em;
vertical-align: middle;
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/AnimatedSubActivity.java
================================================
/*
* Copyright (C) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.avenwu.deepinandroid;
import android.app.Activity;
import android.os.Bundle;
/**
* See WindowAnimations.java for comments on the overall application.
*
* This is a sub-activity which provides custom animation behavior. When this activity
* is exited, the user will see the behavior specified in the overridePendingTransition() call.
*/
public class AnimatedSubActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_window_anim_sub);
}
@Override
public void finish() {
super.finish();
overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_right);
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/BitmapShaderFragment.java
================================================
package com.avenwu.deepinandroid;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
/**
* Created by chaobin on 4/6/15.
*/
public class BitmapShaderFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.bitmap_shader_layout, null);
view.setOnClickListener(null);
return view;
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/BreathLightViewDemo.java
================================================
package com.avenwu.deepinandroid;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
/**
* Created by chaobin on 3/3/15.
*/
public class BreathLightViewDemo extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.ripple_layout, null);
view.setOnClickListener(null);
return view;
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/BusEventDemo.java
================================================
package com.avenwu.deepinandroid;
import com.avenwu.deepinandroid.eventbus.Bus;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.util.Log;
import android.view.View;
import android.widget.Toast;
/**
* Created by chaobin on 1/29/15.
*/
public class BusEventDemo extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.eventbus_layout);
}
@Override
protected void onStart() {
super.onStart();
Bus.getDefault().register(this);
}
public void onSendClick(View view) {
Bus.getDefault().post("Hello world");
}
public void onEvent(String event) {
Log.d("BusEventDemo", "onEvent hit");
Toast.makeText(this, "onEvent hit:" + event, Toast.LENGTH_SHORT).show();
}
@Override
protected void onStop() {
super.onStop();
Bus.getDefault().unregister(this);
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/CameraMatrixFragmentDemo.java
================================================
package com.avenwu.deepinandroid;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
/**
* Created by aven on 1/20/16.
*/
public class CameraMatrixFragmentDemo extends Fragment {
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
return inflater.inflate(R.layout.camera_matrix_layout, null);
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/ColorFilterDemo.java
================================================
package com.avenwu.deepinandroid;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.Spinner;
import android.widget.Toast;
import java.lang.reflect.Field;
import butterknife.ButterKnife;
import butterknife.InjectView;
/**
* Created by chaobin on 2/3/15.
*/
public class ColorFilterDemo extends ActionBarActivity implements AdapterView.OnItemSelectedListener {
@InjectView(R.id.spinner)
Spinner mPorterDuffSpinner;
@InjectView(R.id.iv_preview)
ImageView mPreviewView;
@InjectView(R.id.iv_image)
ImageView mImage;
static final int MASK_HINT_COLOR = 0x99000000;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.filter_layout);
ButterKnife.inject(this);
ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,
R.array.porter_duff_array, android.R.layout.simple_spinner_item);
adapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);
mPorterDuffSpinner.setPrompt("Select the PorterDuff");
mPorterDuffSpinner.setAdapter(adapter);
mPorterDuffSpinner.setOnItemSelectedListener(this);
int defaultSelection = 0;
try {
Field field = PorterDuff.Mode.class.getDeclaredField("nativeInt");
field.setAccessible(true);
defaultSelection = field.getInt(PorterDuff.Mode.DARKEN);
} catch (NoSuchFieldException | IllegalAccessException e) {
e.printStackTrace();
}
mPorterDuffSpinner.setSelection(defaultSelection);
}
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
PorterDuff.Mode mode = PorterDuff.Mode.class.getEnumConstants()[position];
mPreviewView.setColorFilter(Color.GREEN, mode);
mImage.setColorFilter(MASK_HINT_COLOR, mode);
Toast.makeText(this, "Select " + mode, Toast.LENGTH_SHORT).show();
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/Content.java
================================================
package com.avenwu.deepinandroid;
public interface Content {
public String getContent();
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/CurtainLayoutFragment.java
================================================
package com.avenwu.deepinandroid;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
/**
* Created by aven on 12/25/15.
*/
public class CurtainLayoutFragment extends Fragment {
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
return View.inflate(getActivity(), R.layout.curtain_demo, null);
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/CustomDrawableDemo.java
================================================
package com.avenwu.deepinandroid;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.TypedValue;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import net.avenwu.support.widget.SegmentDrawable;
public class CustomDrawableDemo extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.custom_drawable_layout);
final int color = 0xff35b558;
int strokeWidth = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 2f, getResources().getDisplayMetrics());
int corner = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 5f, getResources().getDisplayMetrics());
SegmentDrawable drawable1 = new SegmentDrawable(SegmentDrawable.Style.LEFT_EDGE);
drawable1.setStrokeWidth(strokeWidth);
drawable1.setColor(color);
drawable1.setCornerRadius(corner);
findViewById(R.id.label).setBackgroundDrawable(drawable1);
SegmentDrawable drawable2 = new SegmentDrawable(SegmentDrawable.Style.MIDDLE);
drawable2.setStrokeWidth(strokeWidth);
drawable2.setColor(color);
drawable2.setCornerRadius(corner);
findViewById(R.id.label2).setBackgroundDrawable(drawable2);
SegmentDrawable drawable3 = new SegmentDrawable(SegmentDrawable.Style.RIGHT_EDGE);
drawable3.setStrokeWidth(strokeWidth);
drawable3.setColor(color);
drawable3.setCornerRadius(corner);
findViewById(R.id.label3).setBackgroundDrawable(drawable3);
RadioGroup group = (RadioGroup) findViewById(R.id.container);
int count = group.getChildCount();
for (int i = 0; i < count; i++) {
RadioButton child = (RadioButton) group.getChildAt(i);
SegmentDrawable drawable;
if (i == 0) {
drawable = new SegmentDrawable(SegmentDrawable.Style.LEFT_EDGE);
child.setChecked(true);
} else if (i == count - 1) {
drawable = new SegmentDrawable(SegmentDrawable.Style.RIGHT_EDGE);
} else {
drawable = new SegmentDrawable(SegmentDrawable.Style.MIDDLE);
}
drawable.setColor(color);
drawable.setStrokeWidth(strokeWidth);
drawable.setCornerRadius(corner);
child.setButtonDrawable(null);
child.setBackgroundDrawable(drawable.newStateListDrawable());
}
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/CustomProgressActivity.java
================================================
package com.avenwu.deepinandroid;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
/**
* Created by aven on 10/20/15.
*/
public class CustomProgressActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_progress_layout);
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/CustomTabActivity.java
================================================
package com.avenwu.deepinandroid;
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentTabHost;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TabWidget;
import android.widget.TextView;
import android.widget.Toast;
import net.avenwu.support.widget.SimpleTab;
/**
* Created by aven on 5/3/15.
*/
public class CustomTabActivity extends FragmentActivity {
SimpleTab mSimpleTab;
FragmentTabHost mTabHost;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.custom_tab_activity);
ViewGroup viewGroup = (ViewGroup) findViewById(R.id.container);
mSimpleTab = new SimpleTab.Builder(this)
.newItem(new SimpleTab.Item().setLabelWithIcon(R.string.tab_1, R.drawable.ic_launcher))
.newItem(new SimpleTab.Item().setLabelWithIcon(R.string.tab_2, R.drawable.ic_launcher))
.newItem(new SimpleTab.Item().setLabelWithIcon(R.string.tab_3, R.drawable.ic_launcher))
.newItem(new SimpleTab.Item().setLabelWithIcon(R.string.tab_4, R.drawable.ic_launcher))
.setOnTabClickListener(new SimpleTab.OnTabClickListener() {
@Override
public void onItemClick(View view, SimpleTab.Item item, int position) {
Toast.makeText(CustomTabActivity.this, "position=" + position, Toast
.LENGTH_SHORT).show();
}
})
.create();
mSimpleTab.injectInto(viewGroup);
// TabWidget
mTabHost = (FragmentTabHost) findViewById(android.R.id.tabhost);
mTabHost.setup(this, getSupportFragmentManager(), android.R.id.tabcontent);
mTabHost.addTab(
mTabHost.newTabSpec("tab1").setIndicator("Tab 1", null).setIndicator(getTabIndicator(this, R.string.tab_1, R.drawable.ic_launcher)),
FragmentTab.class, null);
mTabHost.addTab(
mTabHost.newTabSpec("tab2").setIndicator("Tab 2", null).setIndicator
(getTabIndicator(this, R.string.tab_2, R.drawable.ic_launcher)),
FragmentTab.class, null);
mTabHost.addTab(
mTabHost.newTabSpec("tab3").setIndicator("Tab 3", null).setIndicator
(getTabIndicator(this, R.string.tab_3, R.drawable.ic_launcher)),
FragmentTab.class, null);
mTabHost.addTab(
mTabHost.newTabSpec("tab4").setIndicator("Tab 3", null).setIndicator
(getTabIndicator(this, R.string.tab_4, R.drawable.ic_launcher)),
FragmentTab.class, null);
}
private View getTabIndicator(Context context, int title, int icon) {
View view = LayoutInflater.from(context).inflate(R.layout.fragment_tab_item, null);
ImageView iv = (ImageView) view.findViewById(R.id.imageView);
iv.setImageResource(icon);
TextView tv = (TextView) view.findViewById(R.id.textView);
tv.setText(title);
return view;
}
public static class FragmentTab extends Fragment {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.fragment_tab_host, container, false);
TextView tv = (TextView) v.findViewById(R.id.text);
tv.setText(this.getTag() + " Content");
return v;
}
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/CustomTextViewActivity.java
================================================
package com.avenwu.deepinandroid;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.Html;
import android.text.Spanned;
import android.widget.TextView;
/**
* Created by chaobin on 11/18/15.
*/
public class CustomTextViewActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.textview_layout);
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/DrawerDemoFragment.java
================================================
package com.avenwu.deepinandroid;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CompoundButton;
import android.widget.FrameLayout;
import android.widget.Switch;
import android.widget.TextView;
import android.widget.Toast;
import com.github.avenwu.imageview.IndexImageView;
import net.avenwu.support.widget.DrawerFrame;
/**
* Created by Chaobin Wu on 2014/10/10.
*/
public class DrawerDemoFragment extends Fragment {
DrawerFrame drawerFrame;
public DrawerDemoFragment() {
}
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.activity_my, container);
drawerFrame = (DrawerFrame) view.findViewById(R.id.view);
Switch s = (Switch) view.findViewById(R.id.switch1);
s.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if (isChecked) {
drawerFrame.showMenuSmoothly();
} else {
drawerFrame.dismissSmoothly();
}
}
});
TextView menu = new TextView(getActivity());
menu.setText("Menu Layout");
menu.setBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
menu.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(getActivity(), "Menu clicked", Toast.LENGTH_SHORT).show();
}
});
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
menu.setLayoutParams(layoutParams);
menu.setGravity(Gravity.CENTER | Gravity.CENTER_VERTICAL);
drawerFrame.setMenuView(menu);
IndexImageView imageView = new IndexImageView(getActivity());
imageView.setImageResource(R.drawable.ic_launcher);
imageView.setIndexEnable(true);
imageView.setText("121");
imageView.setTextDimension(40);
FrameLayout.LayoutParams layoutParams2 = new FrameLayout.LayoutParams(200, 200);
layoutParams2.gravity = Gravity.CENTER;
imageView.setLayoutParams(layoutParams2);
drawerFrame.setContentView(imageView);
imageView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(getActivity(), "Image cliked", Toast.LENGTH_SHORT).show();
}
});
return view;
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/ExifViewerFragment.java
================================================
package com.avenwu.deepinandroid;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.media.ExifInterface;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.os.AsyncTaskCompat;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.drew.imaging.ImageMetadataReader;
import com.drew.imaging.ImageProcessingException;
import com.drew.metadata.Directory;
import com.drew.metadata.Metadata;
import com.drew.metadata.Tag;
import net.avenwu.support.widget.FlatTabGroup;
import java.io.IOException;
import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
/**
* Created by chaobin on 3/4/15.
*/
public class ExifViewerFragment extends Fragment {
ImageView mImageView;
TextView mTextView;
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.exif_layout, null);
mImageView = (ImageView) view.findViewById(R.id.image);
mTextView = (TextView) view.findViewById(R.id.text);
FlatTabGroup tabs = (FlatTabGroup) view.findViewById(R.id.tabs);
tabs.setSelection(0);
tabs.setOnTabCheckedListener(new FlatTabGroup.OnTabCheckedListener() {
@Override
public void onChecked(FlatTabGroup group, int position) {
switch (position) {
case 0:
decodeWith(new AssetsImageExifDecoder());
break;
case 1:
decodeWith(new ExternalImageExifDecoder());
break;
}
}
});
return view;
}
private void decodeWith(ExifDecoder decoder) {
AsyncTaskCompat.executeParallel(new AsyncTask<ExifDecoder, Void, ExifBean>() {
@Override
protected ExifBean doInBackground(ExifDecoder... params) {
return new ExifBean(params[0].decodeBitmap(), params[0].extractExif());
}
@Override
protected void onPostExecute(ExifBean exifBean) {
if (exifBean.bitmap != null) {
mImageView.setImageBitmap(exifBean.bitmap);
}
if (exifBean.value != null) {
mTextView.setText(exifBean.value);
}
}
}, decoder);
}
interface ExifDecoder {
Bitmap decodeBitmap();
String extractExif();
}
/**
* ExifInterface seems not support image in assets
*/
class AssetsImageExifDecoder implements ExifDecoder {
final String ASSETS_IMAGE_PATH = "image2.jpg";
@Override
public Bitmap decodeBitmap() {
try {
return BitmapFactory.decodeStream(getResources().getAssets().open(ASSETS_IMAGE_PATH));
} catch (IOException e) {
Log.d("ExifViewerFragment", "AssetsImageExifDecoder decodeBitmap failed");
e.printStackTrace();
}
return null;
}
@Override
public String extractExif() {
try {
Metadata metadata = ImageMetadataReader.readMetadata(getResources().getAssets().open(ASSETS_IMAGE_PATH));
Iterator<Directory> iterator = metadata.getDirectories().iterator();
final String output = "%s=%s";
StringBuilder builder = new StringBuilder();
while (iterator.hasNext()) {
Directory d = iterator.next();
for (Tag tag : d.getTags()) {
builder.append(String.format(output, tag.getTagName(), tag.getDescription()))
.append("\n");
}
}
return builder.toString();
} catch (ImageProcessingException e) {
e.printStackTrace();
Log.d("ExifViewerFragment", "get attributes failed");
} catch (IOException e) {
e.printStackTrace();
Log.d("ExifViewerFragment", "get attributes failed");
}
return null;
}
}
class ExternalImageExifDecoder implements ExifDecoder {
//TODO replace with your own image path
final String EXTRANAL_IMAGE_PATH = "/storage/sdcard1/DCIM/Camera/IMG_20150304_162932.jpg";
@Override
public Bitmap decodeBitmap() {
return BitmapFactory.decodeFile(EXTRANAL_IMAGE_PATH);
}
@Override
public String extractExif() {
try {
ExifInterface exifInterface = new ExifInterface(EXTRANAL_IMAGE_PATH);
StringBuilder builder = new StringBuilder();
final String output = "%s=%s";
try {
Field field = exifInterface.getClass().getDeclaredField("mAttributes");
field.setAccessible(true);
HashMap<String, String> attrs = (HashMap<String, String>) field.get(exifInterface);
for (Map.Entry<String, String> entry : attrs.entrySet()) {
builder.append(String.format(output, entry.getKey(), entry.getValue())).append("\n");
}
} catch (NoSuchFieldException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
return builder.toString();
} catch (IOException e) {
Log.d("ExifViewerFragment", "get attributes failed");
e.printStackTrace();
}
return null;
}
}
class ExifBean {
Bitmap bitmap;
String value;
public ExifBean(Bitmap bitmap, String value) {
this.bitmap = bitmap;
this.value = value;
}
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/FeatureActivity.java
================================================
package com.avenwu.deepinandroid;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
public class FeatureActivity extends AppCompatActivity {
View mLeft, mRight;
ViewPager viewPager;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.feature_layout);
viewPager = (ViewPager) findViewById(R.id.viewpager);
viewPager.setAdapter(new Adapter(getSupportFragmentManager()));
mLeft = findViewById(R.id.iv_left);
mRight = findViewById(R.id.iv_right);
mLeft.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
viewPager.setCurrentItem(viewPager.getCurrentItem() + 1);
}
});
mRight.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
viewPager.setCurrentItem(viewPager.getCurrentItem() - 1);
}
});
viewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
@Override
public void onPageScrolled(int i, float v, int i1) {
}
@Override
public void onPageSelected(int i) {
mLeft.setVisibility(i == 0 ? View.GONE : View.VISIBLE);
mRight.setVisibility(i == 2 ? View.GONE : View.VISIBLE);
}
@Override
public void onPageScrollStateChanged(int i) {
}
});
}
class Adapter extends FragmentPagerAdapter {
public Adapter(FragmentManager fm) {
super(fm);
}
@Override
public Fragment getItem(int i) {
Fragment fragment = new FragmentItem();
Bundle bundle = new Bundle();
switch (i) {
case 0:
bundle.putString(KEY_LABEL, getString(R.string.page_1_text));
bundle.putInt(KEY_IMAGE_ID, R.drawable.page_1_image);
bundle.putInt(KEY_COLOR_ABOVE, getResources().getColor(R.color.page_1_dark));
bundle.putInt(KEY_COLOR_BELOW, getResources().getColor(R.color.page_1));
break;
case 1:
bundle.putString(KEY_LABEL, getString(R.string.page_2_text));
bundle.putInt(KEY_IMAGE_ID, R.drawable.page_2_image);
bundle.putInt(KEY_COLOR_ABOVE, getResources().getColor(R.color.page_2_dark));
bundle.putInt(KEY_COLOR_BELOW, getResources().getColor(R.color.page_2));
break;
case 2:
bundle.putString(KEY_LABEL, getString(R.string.page_3_text));
bundle.putInt(KEY_IMAGE_ID, R.drawable.page_3_image);
bundle.putInt(KEY_COLOR_ABOVE, getResources().getColor(R.color.page_3_dark));
bundle.putInt(KEY_COLOR_BELOW, getResources().getColor(R.color.page_3));
break;
}
fragment.setArguments(bundle);
return fragment;
}
@Override
public int getCount() {
return 3;
}
}
public static final String KEY_LABEL = "key_label";
public static final String KEY_IMAGE_ID = "key_image_id";
public static final String KEY_COLOR_ABOVE = "key_color_above";
public static final String KEY_COLOR_BELOW = "key_color_below";
public static class FragmentItem extends Fragment {
public FragmentItem() {
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.feature_item_layout, null);
String label = getArguments().getString(KEY_LABEL);
((TextView) view.findViewById(R.id.tv_label)).setText(label);
int color1 = getArguments().getInt(KEY_COLOR_ABOVE);
view.findViewById(R.id.ll_above).setBackgroundColor(color1);
int color2 = getArguments().getInt(KEY_COLOR_BELOW);
view.findViewById(R.id.ll_below).setBackgroundColor(color2);
int image = getArguments().getInt(KEY_IMAGE_ID);
((ImageView) view.findViewById(R.id.iv_image)).setImageResource(image);
return view;
}
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/FlipFragmentDemo.java
================================================
package com.avenwu.deepinandroid;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import net.avenwu.support.widget.FlipLayout;
/**
* Created by aven on 1/19/16.
*/
public class FlipFragmentDemo extends Fragment {
FlipLayout mFlipLayout;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
return inflater.inflate(R.layout.flip_layout, null);
}
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mFlipLayout = (FlipLayout) view.findViewById(R.id.flip_layout);
mFlipLayout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mFlipLayout.flip();
}
});
mFlipLayout.setViewOrder(view.findViewById(R.id.iv_image1), view.findViewById(R.id.iv_image2));
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/GradientColorFragment.java
================================================
package com.avenwu.deepinandroid;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
/**
* Created by chaobin on 3/6/15.
*/
public class GradientColorFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.gradient_layout, null);
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/LargeHeightImageDisplayFragment.java
================================================
package com.avenwu.deepinandroid;
import android.content.Context;
import android.content.res.AssetManager;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.BitmapRegionDecoder;
import android.graphics.Color;
import android.graphics.Rect;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.os.AsyncTaskCompat;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import java.io.IOException;
/**
* Created by chaobin on 3/2/15.
*/
public class LargeHeightImageDisplayFragment extends Fragment {
private static final String TAG = LargeHeightImageDisplayFragment.class.getSimpleName();
private ViewGroup mContainer;
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
ScrollView scrollView = new ScrollView(getActivity());
scrollView.setBackgroundColor(Color.WHITE);
scrollView.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
LinearLayout linearLayout = new LinearLayout(getActivity());
linearLayout.setOrientation(LinearLayout.VERTICAL);
linearLayout.setLayoutParams(new ScrollView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
mContainer = linearLayout;
scrollView.addView(linearLayout);
return scrollView;
}
AsyncTask<Context, Bitmap, Object> mDecodeTask;
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
mDecodeTask = new AsyncTask<Context, Bitmap, Object>() {
@Override
protected Object doInBackground(Context... params) {
Log.d(TAG, "Start decode image...");
BitmapRegionDecoder decoder = null;
try {
//TODO According to api document both jpeg and png are supported, however jpeg image just failed to be decoded on this case
decoder = BitmapRegionDecoder.newInstance(params[0].getAssets().open("image.png", AssetManager.ACCESS_RANDOM), false);
final int screenWidth = params[0].getResources().getDisplayMetrics().widthPixels;
final int imageWidth = decoder.getWidth();
final int imageHeight = decoder.getHeight();
final int eachHeight = (int) (screenWidth * ((imageWidth + 0.5f) / screenWidth));
int heightRemained = imageHeight;
Rect corpRect = new Rect(0, 0, imageWidth, 0);
//TODO the while case is only for test, should only load specific bitmap data when scrolled to be visible
while (heightRemained > 0 && !isCancelled()) {
Log.d(TAG, "clip image");
if (heightRemained >= eachHeight) {
corpRect.set(corpRect.left, corpRect.bottom, corpRect.right, corpRect.bottom + eachHeight);
heightRemained -= eachHeight;
} else {
corpRect.set(corpRect.left, corpRect.bottom, corpRect.right, corpRect.bottom + heightRemained);
heightRemained = 0;
}
Log.d(TAG, "corptBitmap, " + corpRect.toString());
Bitmap corptBitmap = decoder.decodeRegion(corpRect, null);
publishProgress(corptBitmap);
}
Log.d(TAG, "Image decode finished");
} catch (IOException e) {
Log.d(TAG, "Image decode failed");
e.printStackTrace();
} finally {
if (decoder != null) {
decoder.recycle();
}
}
return null;
}
@Override
protected void onProgressUpdate(Bitmap... values) {
if (getActivity() != null && !isRemoving() && values[0] != null) {
ImageView imageView = new ImageView(getActivity());
imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
imageView.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
imageView.setImageBitmap(values[0]);
mContainer.addView(imageView);
}
}
};
AsyncTaskCompat.executeParallel(mDecodeTask, getActivity());
}
@Override
public void onDestroyView() {
if (mContainer != null) {
mContainer.removeAllViews();
}
if (mDecodeTask != null) {
mDecodeTask.cancel(true);
}
super.onDestroyView();
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/LinearGradientView.java
================================================
package com.avenwu.deepinandroid;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.LinearGradient;
import android.graphics.Paint;
import android.graphics.Shader;
import android.util.AttributeSet;
import android.view.View;
/**
* Created by chaobin on 3/6/15.
*/
public class LinearGradientView extends View {
Paint mPaint;
LinearGradient mGradient;
public LinearGradientView(Context context) {
this(context, null);
}
public LinearGradientView(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public LinearGradientView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
mGradient = new LinearGradient(0, 0, 500, 0, new int[]{
Color.RED, Color.YELLOW, Color.GREEN
}, null, Shader.TileMode.CLAMP);
mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
mPaint.setShader(mGradient);
}
@Override
protected void onDraw(Canvas canvas) {
canvas.drawRect(0, 0, 500, 500, mPaint);
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/MainActivity.java
================================================
package com.avenwu.deepinandroid;
import android.content.Intent;
import android.graphics.drawable.RippleDrawable;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.Fragment;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Toast;
import com.avenwu.annotation.PrintMe;
@PrintMe
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void showShortcut(View view) {
startActivity(new Intent(this, ShortcutDemo.class));
}
@PrintMe
public void showDrawerFrame(View view) {
// Intent intent = new Intent(this, RefreshWidgetActivity.class);
// intent.putExtra("fragment", DrawerDemoFragment.class);
// startActivity(intent);
}
@PrintMe
public void showRefreshLayout(View view) {
// Intent intent = new Intent(this, RefreshWidgetActivity.class);
// intent.putExtra("fragment", RefreshDemoFragment.class);
// startActivity(intent);
}
public void openActivity(View view) {
try {
startActivity(new Intent(this, Class.forName((String) view.getTag())));
} catch (ClassNotFoundException e) {
error(e);
}
}
public void openFragment(View view) {
try {
getSupportFragmentManager().beginTransaction()
.add(R.id.container, (Fragment) Class.forName((String) view.getTag()).newInstance(), "fragment")
.addToBackStack(null)
.commitAllowingStateLoss();
} catch (InstantiationException e) {
error(e);
} catch (IllegalAccessException e) {
error(e);
} catch (ClassNotFoundException e) {
error(e);
}
}
private void error(Exception e) {
e.printStackTrace();
Toast.makeText(this, e.getLocalizedMessage(), Toast.LENGTH_SHORT).show();
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/MarkdownDemo.java
================================================
package com.avenwu.deepinandroid;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.view.ViewPager;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.widget.EditText;
import org.markdown4j.Markdown4jProcessor;
import java.io.IOException;
import java.util.Locale;
import butterknife.ButterKnife;
import butterknife.InjectView;
public class MarkdownDemo extends ActionBarActivity implements ActionBar.TabListener, Content {
SectionsPagerAdapter mSectionsPagerAdapter;
ViewPager mViewPager;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_markdown_demo);
// Set up the action bar.
final ActionBar actionBar = getSupportActionBar();
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
// Create the adapter that will return a fragment for each of the three
// primary sections of the activity.
mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());
// Set up the ViewPager with the sections adapter.
mViewPager = (ViewPager) findViewById(R.id.pager);
mViewPager.setAdapter(mSectionsPagerAdapter);
// When swiping between different sections, select the corresponding
// tab. We can also use ActionBar.Tab#select() to do this if we have
// a reference to the Tab.
mViewPager.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() {
@Override
public void onPageSelected(int position) {
actionBar.setSelectedNavigationItem(position);
}
});
// For each of the sections in the app, add a tab to the action bar.
for (int i = 0; i < mSectionsPagerAdapter.getCount(); i++) {
actionBar.addTab(
actionBar.newTab()
.setText(mSectionsPagerAdapter.getPageTitle(i))
.setTabListener(this));
}
}
@Override
public void onTabSelected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {
mViewPager.setCurrentItem(tab.getPosition());
}
@Override
public void onTabUnselected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {
}
@Override
public void onTabReselected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {
}
private static String makeFragmentName(int viewId, long id) {
return "android:switcher:" + viewId + ":" + id;
}
@Override
public String getContent() {
Fragment fragment = getSupportFragmentManager().findFragmentByTag(makeFragmentName(mViewPager.getId(), 0));
if (fragment instanceof Content) {
return ((Content) fragment).getContent();
}
return "";
}
/**
* A {@link FragmentPagerAdapter} that returns a fragment corresponding to
* one of the sections/tabs/pages.
*/
public class SectionsPagerAdapter extends FragmentPagerAdapter {
public SectionsPagerAdapter(FragmentManager fm) {
super(fm);
}
@Override
public Fragment getItem(int position) {
switch (position) {
case 0:
return new EditFragment();
default:
return new PreviewFragment();
}
}
@Override
public int getCount() {
return 2;
}
@Override
public CharSequence getPageTitle(int position) {
Locale l = Locale.getDefault();
switch (position) {
case 0:
return getString(R.string.title_section1).toUpperCase(l);
case 1:
return getString(R.string.title_section2).toUpperCase(l);
}
return null;
}
}
/**
* A placeholder fragment containing a simple view.
*/
public static class EditFragment extends Fragment implements Content {
@InjectView(R.id.edt_input)
EditText mInputView;
// String TEMPLATE_DATA = "#Hello\nThis is simple text in format of markdown.\n- li\n- li";
String TEMPLATE_DATA = "# Mou\n" +
"\n" +
"\n" +
"\n" +
"## Overview\n" +
"\n" +
"**Mou**, the missing Markdown editor for *web developers*.\n" +
"\n" +
"### Syntax\n" +
"\n" +
"#### Strong and Emphasize \n" +
"\n" +
"**strong** or __strong__ ( Cmd + B )\n" +
"\n" +
"*emphasize* or _emphasize_ ( Cmd + I )\n" +
"\n" +
"**Sometimes I want a lot of text to be bold.\n" +
"Like, seriously, a _LOT_ of text**\n" +
"\n" +
"#### Blockquotes\n" +
"\n" +
"> Right angle brackets > are used for block quotes.\n" +
"\n" +
"#### Links and Email\n" +
"\n" +
"An email <example@example.com> link.\n" +
"\n" +
"Simple inline link <http://chenluois.com>, another inline link [Smaller](http://25.io/smaller/), one more inline link with title [Resize](http://resizesafari.com \"a Safari extension\").\n" +
"\n" +
"A [reference style][id] link. Input id, then anywhere in the doc, define the link with corresponding id:\n" +
"\n" +
"[id]: http://25.io/mou/ \"Markdown editor on Mac OS X\"\n" +
"\n" +
"Titles ( or called tool tips ) in the links are optional.\n" +
"\n" +
"#### Images\n" +
"\n" +
"An inline image , title is optional.\n" +
"\n" +
"A ![Resize icon][2] reference style image.\n" +
"\n" +
"[2]: http://resizesafari.com/favicon.ico \"Title\"\n" +
"\n" +
"#### Inline code and Block code\n" +
"\n" +
"Inline code are surround by `backtick` key. To create a block code:\n" +
"\n" +
"\tIndent each line by at least 1 tab, or 4 spaces.\n" +
" var Mou = exactlyTheAppIwant; \n" +
"\n" +
"#### Ordered Lists\n" +
"\n" +
"Ordered lists are created using \"1.\" + Space:\n" +
"\n" +
"1. Ordered list item\n" +
"2. Ordered list item\n" +
"3. Ordered list item\n" +
"\n" +
"#### Unordered Lists\n" +
"\n" +
"Unordered list are created using \"*\" + Space:\n" +
"\n" +
"* Unordered list item\n" +
"* Unordered list item\n" +
"* Unordered list item \n" +
"\n" +
"Or using \"-\" + Space:\n" +
"\n" +
"- Unordered list item\n" +
"- Unordered list item\n" +
"- Unordered list item\n" +
"\n" +
"#### Hard Linebreak\n" +
"\n" +
"End a line with two or more spaces will create a hard linebreak, called `<br />` in HTML. ( Control + Return ) \n" +
"Above line ended with 2 spaces.\n" +
"\n" +
"#### Horizontal Rules\n" +
"\n" +
"Three or more asterisks or dashes:\n" +
"\n" +
"***\n" +
"\n" +
"---\n" +
"\n" +
"- - - -\n" +
"\n" +
"#### Headers\n" +
"\n" +
"Setext-style:\n" +
"\n" +
"This is H1\n" +
"==========\n" +
"\n" +
"This is H2\n" +
"----------\n" +
"\n" +
"atx-style:\n" +
"\n" +
"# This is H1\n" +
"## This is H2\n" +
"### This is H3\n" +
"#### This is H4\n" +
"##### This is H5\n" +
"###### This is H6\n" +
"\n" +
"\n" +
"### Extra Syntax\n" +
"\n" +
"#### Footnotes\n" +
"\n" +
"Footnotes work mostly like reference-style links. A footnote is made of two things: a marker in the text that will become a superscript number; a footnote definition that will be placed in a list of footnotes at the end of the document. A footnote looks like this:\n" +
"\n" +
"That's some text with a footnote.[^1]\n" +
"\n" +
"[^1]: And that's the footnote.\n" +
"\n" +
"\n" +
"#### Strikethrough\n" +
"\n" +
"Wrap with 2 tilde characters:\n" +
"\n" +
"~~Strikethrough~~\n" +
"\n" +
"\n" +
"#### Fenced Code Blocks\n" +
"\n" +
"Start with a line containing 3 or more backticks, and ends with the first line with the same number of backticks:\n" +
"\n" +
"```\n" +
"Fenced code blocks are like Stardard Markdown’s regular code\n" +
"blocks, except that they’re not indented and instead rely on\n" +
"a start and end fence lines to delimit the code block.\n" +
"```\n" +
"\n" +
"\n" +
"### Shortcuts\n" +
"\n" +
"#### View\n" +
"\n" +
"* Toggle live preview: Shift + Cmd + I\n" +
"* Toggle Words Counter: Shift + Cmd + W\n" +
"* Toggle Transparent: Shift + Cmd + T\n" +
"* Toggle Floating: Shift + Cmd + F\n" +
"* Left/Right = 1/1: Cmd + 0\n" +
"* Left/Right = 3/1: Cmd + +\n" +
"* Left/Right = 1/3: Cmd + -\n" +
"* Toggle Writing orientation: Cmd + L\n" +
"* Toggle fullscreen: Control + Cmd + F\n" +
"\n" +
"#### Actions\n" +
"\n" +
"* Copy HTML: Option + Cmd + C\n" +
"* Strong: Select text, Cmd + B\n" +
"* Emphasize: Select text, Cmd + I\n" +
"* Inline Code: Select text, Cmd + K\n" +
"* Strikethrough: Select text, Cmd + U\n" +
"* Link: Select text, Control + Shift + L\n" +
"* Image: Select text, Control + Shift + I\n" +
"* Select Word: Control + Option + W\n" +
"* Select Line: Shift + Cmd + L\n" +
"* Select All: Cmd + A\n" +
"* Deselect All: Cmd + D\n" +
"* Convert to Uppercase: Select text, Control + U\n" +
"* Convert to Lowercase: Select text, Control + Shift + U\n" +
"* Convert to Titlecase: Select text, Control + Option + U\n" +
"* Convert to List: Select lines, Control + L\n" +
"* Convert to Blockquote: Select lines, Control + Q\n" +
"* Convert to H1: Cmd + 1\n" +
"* Convert to H2: Cmd + 2\n" +
"* Convert to H3: Cmd + 3\n" +
"* Convert to H4: Cmd + 4\n" +
"* Convert to H5: Cmd + 5\n" +
"* Convert to H6: Cmd + 6\n" +
"* Convert Spaces to Tabs: Control + [\n" +
"* Convert Tabs to Spaces: Control + ]\n" +
"* Insert Current Date: Control + Shift + 1\n" +
"* Insert Current Time: Control + Shift + 2\n" +
"* Insert entity <: Control + Shift + ,\n" +
"* Insert entity >: Control + Shift + .\n" +
"* Insert entity &: Control + Shift + 7\n" +
"* Insert entity Space: Control + Shift + Space\n" +
"* Insert Scriptogr.am Header: Control + Shift + G\n" +
"* Shift Line Left: Select lines, Cmd + [\n" +
"* Shift Line Right: Select lines, Cmd + ]\n" +
"* New Line: Cmd + Return\n" +
"* Comment: Cmd + /\n" +
"* Hard Linebreak: Control + Return\n" +
"\n" +
"#### Edit\n" +
"\n" +
"* Auto complete current word: Esc\n" +
"* Find: Cmd + F\n" +
"* Close find bar: Esc\n" +
"\n" +
"#### Post\n" +
"\n" +
"* Post on Scriptogr.am: Control + Shift + S\n" +
"* Post on Tumblr: Control + Shift + T\n" +
"\n" +
"#### Export\n" +
"\n" +
"* Export HTML: Option + Cmd + E\n" +
"* Export PDF: Option + Cmd + P\n" +
"\n" +
"\n" +
"### And more?\n" +
"\n" +
"Don't forget to check Preferences, lots of useful options are there.\n" +
"\n" +
"Follow [@Mou](https://twitter.com/mou) on Twitter for the latest news.\n" +
"\n" +
"For feedback, use the menu `Help` - `Send Feedback`";
public EditFragment() {
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.markdown_edit, container, false);
ButterKnife.inject(this, rootView);
mInputView.setText(TEMPLATE_DATA);
return rootView;
}
@Override
public String getContent() {
return mInputView.getText().toString();
}
}
public static class PreviewFragment extends Fragment {
private WebView mWebView;
private boolean mIsWebViewAvailable;
private Markdown4jProcessor mProcessor;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
if (mWebView != null) {
mWebView.destroy();
}
mWebView = new WebView(getActivity());
mIsWebViewAvailable = true;
mProcessor = new Markdown4jProcessor();
return mWebView;
}
@Override
public void onPause() {
super.onPause();
mWebView.onPause();
}
@Override
public void onResume() {
mWebView.onResume();
super.onResume();
}
@Override
public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
if (isVisibleToUser) {
String data = ((Content) getActivity()).getContent();
mWebView.loadData(renderMarkdownString(data), "text/html", "UTF-8");
}
}
String mTemplate = "<link rel=\"stylesheet\" href=\"file:///android_asset/github-markdown.css\"/><div class=\"markdown-body\">%s</div>";
String renderMarkdownString(String raw) {
try {
return String.format(mTemplate, mProcessor.process(raw));
} catch (IOException e) {
e.printStackTrace();
return String.format(mTemplate, raw);
}
}
@Override
public void onDestroyView() {
mIsWebViewAvailable = false;
super.onDestroyView();
}
@Override
public void onDestroy() {
if (mWebView != null) {
mWebView.destroy();
mWebView = null;
}
super.onDestroy();
}
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/QQDraggingCircleDemo.java
================================================
package com.avenwu.deepinandroid;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.widget.SeekBar;
import net.avenwu.support.widget.PolygonWithQuadraticBezirView;
import butterknife.ButterKnife;
import butterknife.InjectView;
/**
* Created by chaobin on 12/25/14.
*/
public class QQDraggingCircleDemo extends ActionBarActivity {
@InjectView(R.id.shape2)
PolygonWithQuadraticBezirView mShape2;
@InjectView(R.id.shape1)
PolygonWithQuadraticBezirView mShape1;
@InjectView(R.id.seekBarX)
SeekBar mSeekX;
@InjectView(R.id.seekBarY)
SeekBar mSeekY;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.qq_dragging_circle_layout);
ButterKnife.inject(this);
mShape2.setFilled(true);
mSeekX.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
mShape1.moveHorizontal(progress / 100.0f);
mShape2.moveHorizontal(progress / 100.0f);
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
}
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
}
});
mSeekY.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
mShape1.moveVertical(progress / 100.0f);
mShape2.moveVertical(progress / 100.0f);
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
}
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
}
});
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/RefreshDemoFragment.java
================================================
package com.avenwu.deepinandroid;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.SimpleAdapter;
import net.avenwu.support.widget.RefreshLayout;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Created by Chaobin Wu on 2014/10/10.
*/
public class RefreshDemoFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
RefreshLayout view = new RefreshLayout(getActivity());
view.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
view.setBackgroundColor(getResources().getColor(android.R.color.holo_purple));
List<Map<String, String>> data = new ArrayList<Map<String, String>>(30);
for (int i = 0; i < 20; i++) {
Map<String, String> item = new HashMap<String, String>(2);
item.put("index", i + "");
item.put("text", "This is content " + i);
data.add(item);
}
view.setAdapter(new SimpleAdapter(getActivity(), data, android.R.layout.simple_list_item_2,
new String[]{"index", "text"}, new int[]{android.R.id.text1, android.R.id.text2}));
return view;
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/RefreshWidgetActivity.java
================================================
package com.avenwu.deepinandroid;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.app.ActionBarActivity;
public class RefreshWidgetActivity extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_refresh_widget);
try {
getSupportFragmentManager().beginTransaction()
.replace(R.id.container, (Fragment) (((Class) getIntent().getSerializableExtra("fragment")).newInstance()))
.commitAllowingStateLoss();
} catch (Exception e) {
e.printStackTrace();
}
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/ScaleSubActivity.java
================================================
/*
* Copyright (C) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.avenwu.deepinandroid;
import android.app.Activity;
import android.os.Bundle;
import android.view.ViewTreeObserver;
import android.view.animation.DecelerateInterpolator;
import android.widget.ImageView;
/**
* See WindowAnimations.java for comments on the overall application.
* <p/>
* This is a sub-activity which provides custom animation behavior. When this activity
* is exited, the user will see the behavior specified in the overridePendingTransition() call.
*/
public class ScaleSubActivity extends Activity {
int leftDeta, topDeta;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_window_scale_sub);
final int left = getIntent().getIntExtra("left", 0);
final int top = getIntent().getIntExtra("top", 0);
final int width = getIntent().getIntExtra("width", 0);
final int height = getIntent().getIntExtra("height", 0);
final ImageView imageView = (ImageView) findViewById(R.id.image);
ViewTreeObserver observer = imageView.getViewTreeObserver();
observer.addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
@Override
public boolean onPreDraw() {
int[] position = new int[2];
imageView.getLocationOnScreen(position);
imageView.getViewTreeObserver().removeOnPreDrawListener(this);
leftDeta = left - position[0];
topDeta = top - position[1];
float widthScale = (float) width / imageView.getWidth();
float heightScale = (float) height / imageView.getHeight();
imageView.setPivotX(0);
imageView.setPivotY(0);
imageView.setTranslationX(leftDeta);
imageView.setTranslationY(topDeta);
imageView.setScaleX(widthScale);
imageView.setScaleY(heightScale);
imageView.animate().setDuration(5000).setInterpolator(new DecelerateInterpolator())
.translationX(0).translationX(0).scaleX(1).scaleY(1).start();
return true;
}
});
}
@Override
public void finish() {
super.finish();
overridePendingTransition(0, 0);
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/ShortcutDemo.java
================================================
package com.avenwu.deepinandroid;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.drawable.AnimationDrawable;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ImageView;
public class ShortcutDemo extends ActionBarActivity {
public static String INSTALL_SHORTCUT = "com.android.launcher.action.INSTALL_SHORTCUT";
public static String UNINSTALL_SHORTCUT = "com.android.launcher.action.UNINSTALL_SHORTCUT";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.shorcut_layout);
findViewById(R.id.imageView).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
AnimationDrawable animationDrawable = (AnimationDrawable) ((ImageView) v).getDrawable();
animationDrawable.start();
}
});
findViewById(R.id.btn_install).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
shortcutAdd("测试", count++, ShortcutDemo.class);
}
});
findViewById(R.id.btn_uninstall).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
shortcutDel("测试", ShortcutDemo.class);
}
});
}
public static int count = 0;
private void shortcutAdd(String name, int number, Class<? extends Activity> cls) {
// Intent to be send, when shortcut is pressed by user ("launched")
Intent shortcutIntent = new Intent(getApplicationContext(), cls);
shortcutIntent.setAction(Intent.ACTION_MAIN);
shortcutIntent.addCategory(Intent.CATEGORY_LAUNCHER);
// Create bitmap with number in it -> very default. You probably want to give it a more stylish look
Bitmap bitmap = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888);
Paint paint = new Paint();
paint.setColor(0xFF808080); // gray
paint.setTextAlign(Paint.Align.CENTER);
paint.setTextSize(50);
new Canvas(bitmap).drawText("" + number, 50, 50, paint);
// Decorate the shortcut
Intent addIntent = new Intent();
addIntent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);
addIntent.putExtra(Intent.EXTRA_SHORTCUT_NAME, name);
addIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON, bitmap);
// Inform launcher to create shortcut
addIntent.setAction(INSTALL_SHORTCUT);
getApplicationContext().sendBroadcast(addIntent);
}
private void shortcutDel(String name, Class<? extends Activity> cls) {
// Intent to be send, when shortcut is pressed by user ("launched")
Intent shortcutIntent = new Intent(getApplicationContext(), cls);
shortcutIntent.setAction(Intent.ACTION_MAIN);
shortcutIntent.addCategory(Intent.CATEGORY_LAUNCHER);
// Decorate the shortcut
Intent delIntent = new Intent();
delIntent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);
delIntent.putExtra(Intent.EXTRA_SHORTCUT_NAME, name);
// Inform launcher to remove shortcut
delIntent.setAction(UNINSTALL_SHORTCUT);
getApplicationContext().sendBroadcast(delIntent);
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/SlideMenuFragment.java
================================================
package com.avenwu.deepinandroid;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.widget.DrawerLayout;
import android.support.v4.widget.SlidingPaneLayout;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import net.avenwu.support.widget.DrawerFrameV2;
/**
* Created by chaobin on 2/16/15.
*/
public class SlideMenuFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
DrawerFrameV2 view =
(DrawerFrameV2) inflater.inflate(R.layout.slide_layout, null);
return view;
// DrawerLayout
// SlidingPaneLayout
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/SlidePanelDemo.java
================================================
package com.avenwu.deepinandroid;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
/**
* Created by chaobin on 2/18/15.
*/
public class SlidePanelDemo extends ActionBarActivity {
int[] mColors = {Color.RED, Color.BLUE, Color.CYAN, Color.GREEN, Color.YELLOW};
ViewGroup mContentView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.slidepanel_layout);
mContentView = (ViewGroup) findViewById(R.id.fl_container);
// ListView menuList = (ListView) findViewById(R.id.lv_memu_list);
// menuList.setAdapter(new ArrayAdapter<String>(
// this,
// android.R.layout.simple_list_item_1,
// android.R.id.text1,
// new String[]{"RED", "BLUE", "CYAN", "GREEN", "YELLOW"}
// ));
// menuList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
// @Override
// public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
// mContentView.setBackgroundColor(mColors[position]);
// }
// });
mContentView.setBackgroundColor(0xff03a9f4);
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/StackZFragment.java
================================================
package com.avenwu.deepinandroid;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewCompat;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
/**
* Created by aven on 1/27/16.
*/
public class StackZFragment extends Fragment {
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_stack_z, null);
}
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
int count = ((ViewGroup) view).getChildCount();
for (int i = 0; i < count; i++) {
View card = ((ViewGroup) view).getChildAt(i);
ViewCompat.setTranslationZ(card, (i + 1) * 8 * getResources().getDisplayMetrics().density);
}
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/StyledRadioButtonDemo.java
================================================
package com.avenwu.deepinandroid;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.widget.LinearLayout;
import net.avenwu.support.widget.FlatTabGroup;
import butterknife.InjectView;
/**
* Created by chaobin on 2/4/15.
*/
public class StyledRadioButtonDemo extends ActionBarActivity {
@InjectView(R.id.ll_container)
LinearLayout mContainer;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.styled_radio_button);
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/TagInputDemo.java
================================================
package com.avenwu.deepinandroid;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.widget.TextView;
import net.avenwu.support.widget.TagFlowLayout;
/**
* Created by chaobin on 1/14/15.
*/
public class TagInputDemo extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// setContentView(new TagInputLayout(this));
setContentView(R.layout.test_tag_input_layout);
// ((TagInputLayout) findViewById(R.id.tags)).setDecorator(new TagInputLayout.SimpleDecorator(this) {
// Drawable[] mDrawable = new Drawable[]{
// getResources().getDrawable(R.drawable.b1),
// getResources().getDrawable(R.drawable.b2)
// };
//
// @Override
// public Drawable[] getBackgroundDrawable() {
// return mDrawable;
// }
// });
}
public void onGetTags(View view) {
TextView tv = (TextView) findViewById(R.id.tv_tags);
tv.setText("All tags:\n");
for (CharSequence tag : ((TagFlowLayout) findViewById(R.id.tags)).getTagArray()) {
tv.append(tag);
tv.append(" ");
}
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/TypefaceActivity.java
================================================
package com.avenwu.deepinandroid;
import android.content.Context;
import android.graphics.Typeface;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;
import net.avenwu.support.util.TypefaceContextWrapper;
import net.avenwu.support.util.TypefaceUtils;
public class TypefaceActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_typeface);
//1. 直接设置TextView setTypeface
final Typeface typeface = Typeface.createFromAsset(getAssets(), "fonts/Oswald-Stencbab" +
".ttf");
TextView textView = (TextView) findViewById(R.id.tv_label_font);
textView.setTypeface(typeface);
//2. 缓存/复用Typeface,避免内存浪费
TypefaceUtils.setTypeface(this, (TextView) findViewById(R.id.tv_label_font_2),
"fonts/Roboto-Bold.ttf");
//3. 自定义LayoutInflator
}
@Override
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(TypefaceContextWrapper.wrap(newBase));
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/WindowAnimationFragment.java
================================================
package com.avenwu.deepinandroid;
import android.app.ActivityOptions;
import android.content.Intent;
import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.TransitionDrawable;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
/**
* Created by aven on 4/26/15.
*/
public class WindowAnimationFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.animation_layout, null);
view.findViewById(R.id.button).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
// Using the AnimatedSubActivity also allows us to animate exiting that
// activity - see that activity for details
Intent subActivity = new Intent(v.getContext(),
AnimatedSubActivity.class);
// The enter/exit animations for the two activities are specified by xml resources
Bundle translateBundle =
ActivityOptions.makeCustomAnimation(v.getContext(),
R.anim.slide_in_left, R.anim.slide_out_left).toBundle();
getActivity().startActivity(subActivity, translateBundle);
} else {
getActivity().overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_left);
getActivity().startActivity(new Intent(v.getContext(),
AnimatedSubActivity.class));
}
}
});
view.findViewById(R.id.image).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent subActivity = new Intent(v.getContext(),
AnimatedSubActivity.class);
// Bundle scaleBundle = ActivityOptions.makeScaleUpAnimation(
// v, 0, 0, v.getWidth(), v.getHeight()).toBundle();
// getActivity().startActivity(subActivity, scaleBundle);
v.setDrawingCacheEnabled(true);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
getActivity().startActivity(subActivity, ActivityOptions.makeThumbnailScaleUpAnimation(v, v.getDrawingCache(), 0, 0).toBundle());
} else {
getActivity().overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_left);
getActivity().startActivity(new Intent(v.getContext(),
AnimatedSubActivity.class));
}
}
});
return view;
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
ImageView imageView = (ImageView) view.findViewById(R.id.image2);
BitmapDrawable[] bitmapDrawable = new BitmapDrawable[2];
bitmapDrawable[0] = new BitmapDrawable(getResources(), BitmapFactory.decodeResource(getResources(), R.drawable.image1));
bitmapDrawable[1] = new BitmapDrawable(getResources(), BitmapFactory.decodeResource(getResources(), R.drawable.image2));
final TransitionDrawable drawable = new TransitionDrawable(bitmapDrawable);
imageView.setImageDrawable(drawable);
imageView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (currentDrawable == 0) {
drawable.startTransition(500);
currentDrawable = 1;
} else {
drawable.reverseTransition(500);
currentDrawable = 0;
}
}
});
view.findViewById(R.id.image3).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int[] position = new int[2];
v.getLocationOnScreen(position);
startActivity(new Intent(getActivity(), ScaleSubActivity.class)
.putExtra("left", position[0]).putExtra("top", position[1])
.putExtra("width", v.getWidth()).putExtra("height", v.getHeight()));
}
});
}
int currentDrawable = 0;
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/eventbus/Bus.java
================================================
package com.avenwu.deepinandroid.eventbus;
import android.os.Looper;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CopyOnWriteArrayList;
/**
* Created by chaobin on 1/29/15.
*/
public class Bus {
static volatile Bus sInstance;
Finder mFinder;
Map<Class<?>, CopyOnWriteArrayList<Subscriber>> mSubscriberMap;
PostHandler mPostHandler;
private Bus() {
mFinder = new NameBasedFinder();
mSubscriberMap = new HashMap<>();
mPostHandler = new PostHandler(Looper.getMainLooper(), this);
}
public static Bus getDefault() {
if (sInstance == null) {
synchronized (Bus.class) {
if (sInstance == null) {
sInstance = new Bus();
}
}
}
return sInstance;
}
public void register(Object subscriber) {
List<Method> methods = mFinder.findSubscriber(subscriber.getClass());
if (methods == null || methods.size() < 1) {
return;
}
CopyOnWriteArrayList<Subscriber> subscribers = mSubscriberMap.get(subscriber.getClass());
if (subscribers == null) {
subscribers = new CopyOnWriteArrayList<>();
mSubscriberMap.put(methods.get(0).getParameterTypes()[0], subscribers);
}
for (Method method : methods) {
Subscriber newSubscriber = new Subscriber(subscriber, method);
subscribers.add(newSubscriber);
}
}
public void unregister(Object subscriber) {
CopyOnWriteArrayList<Subscriber> subscribers = mSubscriberMap.remove(subscriber.getClass());
if (subscribers != null) {
for (Subscriber s : subscribers) {
s.mMethod = null;
s.mSubscriber = null;
}
}
}
public void post(Object event) {
//TODO post with handler
mPostHandler.enqueue(event);
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/eventbus/Finder.java
================================================
package com.avenwu.deepinandroid.eventbus;
import java.lang.reflect.Method;
import java.util.List;
/**
* Created by chaobin on 1/29/15.
*/
public interface Finder {
List<Method> findSubscriber(Class<?> subscriber);
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/eventbus/NameBasedFinder.java
================================================
package com.avenwu.deepinandroid.eventbus;
import android.util.Log;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
/**
* Created by chaobin on 1/29/15.
*/
public class NameBasedFinder implements Finder {
@Override
public List<Method> findSubscriber(Class<?> subscriber) {
List<Method> methods = new ArrayList<>();
for (Method method : subscriber.getDeclaredMethods()) {
if (method.getName().startsWith("onEvent") && method.getParameterTypes().length == 1) {
methods.add(method);
Log.d("findSubscriber", "add method:" + method.getName());
}
}
return methods;
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/eventbus/PostHandler.java
================================================
package com.avenwu.deepinandroid.eventbus;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import java.util.concurrent.CopyOnWriteArrayList;
/**
* Created by chaobin on 1/29/15.
*/
public class PostHandler extends Handler {
final Bus mBus;
public PostHandler(Looper looper, Bus bus) {
super(looper);
mBus = bus;
}
@Override
public void handleMessage(Message msg) {
CopyOnWriteArrayList<Subscriber> subscribers = mBus.mSubscriberMap.get(msg.obj.getClass());
for (Subscriber subscriber : subscribers) {
subscriber.mMethod.setAccessible(true);
try {
subscriber.mMethod.invoke(subscriber.mSubscriber, msg.obj);
} catch (Exception e) {
e.printStackTrace();
}
}
}
void enqueue(Object event) {
Message message = obtainMessage();
message.obj = event;
sendMessage(message);
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/eventbus/Subscriber.java
================================================
package com.avenwu.deepinandroid.eventbus;
import java.lang.reflect.Method;
/**
* Created by chaobin on 1/29/15.
*/
public class Subscriber {
Object mSubscriber;
Method mMethod;
Class<?> mEventType;
public Subscriber(Object subscriber, Method method) {
mSubscriber = subscriber;
mMethod = method;
mEventType = method.getParameterTypes()[0];
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/util/SystemUiHider.java
================================================
package com.avenwu.deepinandroid.util;
import android.app.Activity;
import android.os.Build;
import android.view.View;
/**
* A utility class that helps with showing and hiding system UI such as the
* status bar and navigation/system bar. This class uses backward-compatibility
* techniques described in <a href=
* "http://developer.android.com/training/backward-compatible-ui/index.html">
* Creating Backward-Compatible UIs</a> to ensure that devices running any
* version of Android OS are supported. More specifically, there are separate
* implementations of this abstract class: for newer devices,
* {@link #getInstance} will return a {@link SystemUiHiderHoneycomb} instance,
* while on older devices {@link #getInstance} will return a
* {@link SystemUiHiderBase} instance.
* <p/>
* For more on system bars, see <a href=
* "http://developer.android.com/design/get-started/ui-overview.html#system-bars"
* > System Bars</a>.
*
* @see android.view.View#setSystemUiVisibility(int)
* @see android.view.WindowManager.LayoutParams#FLAG_FULLSCREEN
*/
public abstract class SystemUiHider {
/**
* When this flag is set, the
* {@link android.view.WindowManager.LayoutParams#FLAG_LAYOUT_IN_SCREEN}
* flag will be set on older devices, making the status bar "float" on top
* of the activity layout. This is most useful when there are no controls at
* the top of the activity layout.
* <p/>
* This flag isn't used on newer devices because the <a
* href="http://developer.android.com/design/patterns/actionbar.html">action
* bar</a>, the most important structural element of an Android app, should
* be visible and not obscured by the system UI.
*/
public static final int FLAG_LAYOUT_IN_SCREEN_OLDER_DEVICES = 0x1;
/**
* When this flag is set, {@link #show()} and {@link #hide()} will toggle
* the visibility of the status bar. If there is a navigation bar, show and
* hide will toggle low profile mode.
*/
public static final int FLAG_FULLSCREEN = 0x2;
/**
* When this flag is set, {@link #show()} and {@link #hide()} will toggle
* the visibility of the navigation bar, if it's present on the device and
* the device allows hiding it. In cases where the navigation bar is present
* but cannot be hidden, show and hide will toggle low profile mode.
*/
public static final int FLAG_HIDE_NAVIGATION = FLAG_FULLSCREEN | 0x4;
/**
* The activity associated with this UI hider object.
*/
protected Activity mActivity;
/**
* The view on which {@link View#setSystemUiVisibility(int)} will be called.
*/
protected View mAnchorView;
/**
* The current UI hider flags.
*
* @see #FLAG_FULLSCREEN
* @see #FLAG_HIDE_NAVIGATION
* @see #FLAG_LAYOUT_IN_SCREEN_OLDER_DEVICES
*/
protected int mFlags;
/**
* The current visibility callback.
*/
protected OnVisibilityChangeListener mOnVisibilityChangeListener = sDummyListener;
/**
* Creates and returns an instance of {@link SystemUiHider} that is
* appropriate for this device. The object will be either a
* {@link SystemUiHiderBase} or {@link SystemUiHiderHoneycomb} depending on
* the device.
*
* @param activity The activity whose window's system UI should be
* controlled by this class.
* @param anchorView The view on which
* {@link View#setSystemUiVisibility(int)} will be called.
* @param flags Either 0 or any combination of {@link #FLAG_FULLSCREEN},
* {@link #FLAG_HIDE_NAVIGATION}, and
* {@link #FLAG_LAYOUT_IN_SCREEN_OLDER_DEVICES}.
*/
public static SystemUiHider getInstance(Activity activity, View anchorView, int flags) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
return new SystemUiHiderHoneycomb(activity, anchorView, flags);
} else {
return new SystemUiHiderBase(activity, anchorView, flags);
}
}
protected SystemUiHider(Activity activity, View anchorView, int flags) {
mActivity = activity;
mAnchorView = anchorView;
mFlags = flags;
}
/**
* Sets up the system UI hider. Should be called from
* {@link Activity#onCreate}.
*/
public abstract void setup();
/**
* Returns whether or not the system UI is visible.
*/
public abstract boolean isVisible();
/**
* Hide the system UI.
*/
public abstract void hide();
/**
* Show the system UI.
*/
public abstract void show();
/**
* Toggle the visibility of the system UI.
*/
public void toggle() {
if (isVisible()) {
hide();
} else {
show();
}
}
/**
* Registers a callback, to be triggered when the system UI visibility
* changes.
*/
public void setOnVisibilityChangeListener(OnVisibilityChangeListener listener) {
if (listener == null) {
listener = sDummyListener;
}
mOnVisibilityChangeListener = listener;
}
/**
* A dummy no-op callback for use when there is no other listener set.
*/
private static OnVisibilityChangeListener sDummyListener = new OnVisibilityChangeListener() {
@Override
public void onVisibilityChange(boolean visible) {
}
};
/**
* A callback interface used to listen for system UI visibility changes.
*/
public interface OnVisibilityChangeListener {
/**
* Called when the system UI visibility has changed.
*
* @param visible True if the system UI is visible.
*/
public void onVisibilityChange(boolean visible);
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/util/SystemUiHiderBase.java
================================================
package com.avenwu.deepinandroid.util;
import android.app.Activity;
import android.view.View;
import android.view.WindowManager;
/**
* A base implementation of {@link SystemUiHider}. Uses APIs available in all
* API levels to show and hide the status bar.
*/
public class SystemUiHiderBase extends SystemUiHider {
/**
* Whether or not the system UI is currently visible. This is a cached value
* from calls to {@link #hide()} and {@link #show()}.
*/
private boolean mVisible = true;
/**
* Constructor not intended to be called by clients. Use
* {@link SystemUiHider#getInstance} to obtain an instance.
*/
protected SystemUiHiderBase(Activity activity, View anchorView, int flags) {
super(activity, anchorView, flags);
}
@Override
public void setup() {
if ((mFlags & FLAG_LAYOUT_IN_SCREEN_OLDER_DEVICES) == 0) {
mActivity.getWindow().setFlags(
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
| WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
| WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
}
}
@Override
public boolean isVisible() {
return mVisible;
}
@Override
public void hide() {
if ((mFlags & FLAG_FULLSCREEN) != 0) {
mActivity.getWindow().setFlags(
WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
mOnVisibilityChangeListener.onVisibilityChange(false);
mVisible = false;
}
@Override
public void show() {
if ((mFlags & FLAG_FULLSCREEN) != 0) {
mActivity.getWindow().setFlags(
0,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
mOnVisibilityChangeListener.onVisibilityChange(true);
mVisible = true;
}
}
================================================
FILE: sample/src/main/java/com/avenwu/deepinandroid/util/SystemUiHiderHoneycomb.java
================================================
package com.avenwu.deepinandroid.util;
import android.annotation.TargetApi;
import android.app.Activity;
import android.os.Build;
import android.view.View;
import android.view.WindowManager;
/**
* An API 11+ implementation of {@link SystemUiHider}. Uses APIs available in
* Honeycomb and later (specifically {@link View#setSystemUiVisibility(int)}) to
* show and hide the system UI.
*/
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public class SystemUiHiderHoneycomb extends SystemUiHiderBase {
/**
* Flags for {@link View#setSystemUiVisibility(int)} to use when showing the
* system UI.
*/
private int mShowFlags;
/**
* Flags for {@link View#setSystemUiVisibility(int)} to use when hiding the
* system UI.
*/
private int mHideFlags;
/**
* Flags to test against the first parameter in
* {@link android.view.View.OnSystemUiVisibilityChangeListener#onSystemUiVisibilityChange(int)}
* to determine the system UI visibility state.
*/
private int mTestFlags;
/**
* Whether or not the system UI is currently visible. This is cached from
* {@link android.view.View.OnSystemUiVisibilityChangeListener}.
*/
private boolean mVisible = true;
/**
* Constructor not intended to be called by clients. Use
* {@link SystemUiHider#getInstance} to obtain an instance.
*/
protected SystemUiHiderHoneycomb(Activity activity, View anchorView, int flags) {
super(activity, anchorView, flags);
mShowFlags = View.SYSTEM_UI_FLAG_VISIBLE;
mHideFlags = View.SYSTEM_UI_FLAG_LOW_PROFILE;
mTestFlags = View.SYSTEM_UI_FLAG_LOW_PROFILE;
if ((mFlags & FLAG_FULLSCREEN) != 0) {
// If the client requested fullscreen, add flags relevant to hiding
// the status bar. Note that some of these constants are new as of
// API 16 (Jelly Bean). It is safe to use them, as they are inlined
// at compile-time and do nothing on pre-Jelly Bean devices.
mShowFlags |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
mHideFlags |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_FULLSCREEN;
}
if ((mFlags & FLAG_HIDE_NAVIGATION) != 0) {
// If the client requested hiding navigation, add relevant flags.
mShowFlags |= View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;
mHideFlags |= View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
mTestFlags |= View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
}
}
/**
* {@inheritDoc}
*/
@Override
public void setup() {
mAnchorView.setOnSystemUiVisibilityChangeListener(mSystemUiVisibilityChangeListener);
}
/**
* {@inheritDoc}
*/
@Override
public void hide() {
mAnchorView.setSystemUiVisibility(mHideFlags);
}
/**
* {@inheritDoc}
*/
@Override
public void show() {
mAnchorView.setSystemUiVisibility(mShowFlags);
}
/**
* {@inheritDoc}
*/
@Override
public boolean isVisible() {
return mVisible;
}
private View.OnSystemUiVisibilityChangeListener mSystemUiVisibilityChangeListener
= new View.OnSystemUiVisibilityChangeListener() {
@Override
public void onSystemUiVisibilityChange(int vis) {
// Test against mTestFlags to see if the system UI is visible.
if ((vis & mTestFlags) != 0) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
// Pre-Jelly Bean, we must manually hide the action bar
// and use the old window flags API.
mActivity.getActionBar().hide();
mActivity.getWindow().setFlags(
WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
// Trigger the registered listener and cache the visibility
// state.
mOnVisibilityChangeListener.onVisibilityChange(false);
mVisible = false;
} else {
mAnchorView.setSystemUiVisibility(mShowFlags);
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
// Pre-Jelly Bean, we must manually show the action bar
// and use the old window flags API.
mActivity.getActionBar().show();
mActivity.getWindow().setFlags(
0,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
// Trigger the registered listener and cache the visibility
// state.
mOnVisibilityChangeListener.onVisibilityChange(true);
mVisible = true;
}
}
};
}
================================================
FILE: sample/src/main/res/anim/scale_up_left.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<scale xmlns:android="http://schemas.android.com/apk/res/android"
android:fromXDelta="-100%p" android:toXDelta="0"
android:duration="500" />
================================================
FILE: sample/src/main/res/anim/scale_up_rightt.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<scale xmlns:android="http://schemas.android.com/apk/res/android"
android:fromXDelta="-100%p" android:toXDelta="0"
android:duration="500" />
================================================
FILE: sample/src/main/res/anim/slide_in_left.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromXDelta="100%p" android:toXDelta="0"
android:duration="500" />
================================================
FILE: sample/src/main/res/anim/slide_in_right.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromXDelta="-50%p" android:toXDelta="0"
android:duration="500" />
================================================
FILE: sample/src/main/res/anim/slide_out_left.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromXDelta="0" android:toXDelta="-50%p"
android:duration="500" />
================================================
FILE: sample/src/main/res/anim/slide_out_right.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromXDelta="0" android:toXDelta="100%p"
android:duration="500" />
================================================
FILE: sample/src/main/res/color/radio_button_color.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@android:color/holo_red_dark" android:state_checked="true" />
<item android:color="@android:color/white" />
</selector>
================================================
FILE: sample/src/main/res/color/radio_button_color_blue.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/tab_blue" android:state_checked="true" />
<item android:color="@android:color/white" />
</selector>
================================================
FILE: sample/src/main/res/color/radio_button_color_green.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/tab_green" android:state_checked="true" />
<item android:color="@android:color/white" />
</selector>
================================================
FILE: sample/src/main/res/color/radio_button_color_light_blue.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/tab_light_blue" android:state_checked="true" />
<item android:color="@android:color/white" />
</selector>
================================================
FILE: sample/src/main/res/color/radio_button_color_orange.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/tab_orange" android:state_checked="true" />
<item android:color="@android:color/white" />
</selector>
================================================
FILE: sample/src/main/res/color/radio_button_color_purple.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/tab_purple" android:state_checked="true" />
<item android:color="@android:color/white" />
</selector>
================================================
FILE: sample/src/main/res/drawable/animate_drawable.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
android:oneshot="false">
<item android:drawable="@drawable/sun" android:duration="200" />
<item android:drawable="@drawable/rain" android:duration="200" />
<item android:drawable="@drawable/snow" android:duration="200" />
<item android:drawable="@drawable/heavy_cloud" android:duration="200" />
</animation-list>
================================================
FILE: sample/src/main/res/drawable/flat_round_shape_left.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true">
<shape android:shape="rectangle">
<corners android:topLeftRadius="5dp" android:bottomLeftRadius="5dp" />
<solid android:color="@android:color/white" />
<stroke android:color="@android:color/white" android:width="1dp" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<corners android:topLeftRadius="5dp" android:bottomLeftRadius="5dp" />
<solid android:color="@android:color/transparent" />
<stroke android:color="@android:color/white" android:width="1dp" />
</shape>
</item>
</selector>
================================================
FILE: sample/src/main/res/drawable/flat_round_shape_middle.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true">
<shape android:shape="rectangle">
<solid android:color="@android:color/white" />
<stroke android:color="@android:color/white" android:width="1dp"/>
</shape>
</item>
<item>
<shape android:shape="rectangle">
<solid android:color="@android:color/transparent" />
<stroke android:color="@android:color/white" android:width="1dp"/>
</shape>
</item>
</selector>
================================================
FILE: sample/src/main/res/drawable/flat_round_shape_right.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true">
<shape android:shape="rectangle">
<corners android:topRightRadius="5dp" android:bottomRightRadius="5dp" />
<solid android:color="@android:color/white" />
<stroke android:color="@android:color/white" android:width="1dp" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<corners android:topRightRadius="5dp" android:bottomRightRadius="5dp" />
<solid android:color="@android:color/transparent" />
<stroke android:color="@android:color/white" android:width="1dp" />
</shape>
</item>
</selector>
================================================
FILE: sample/src/main/res/layout/activity_main.xml
================================================
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin">
<!--<Button-->
<!--style="@style/DemoItemStyle"-->
<!--android:text="@string/install_shortcut"-->
<!--android:onClick="showShortcut"/>-->
<!--<Button-->
<!--style="@style/DemoItemStyle"-->
<!--android:text="@string/widget_drawerframe"-->
<!--android:onClick="openFragment" -->
<!--android:tag="com.avenwu.deepinandroid.DrawerDemoFragment" />-->
<Button
style="@style/DemoItemStyle"
android:text="@string/widget_refresh_layout"
android:onClick="openFragment"
android:tag="com.avenwu.deepinandroid.RefreshDemoFragment" />
<Button
style="@style/DemoItemStyle"
android:text="@string/quadratic_bezier_polygon"
android:tag="com.avenwu.deepinandroid.QQDraggingCircleDemo" />
<Button
style="@style/DemoItemStyle"
android:text="@string/tag_input"
android:tag="com.avenwu.deepinandroid.TagInputDemo" />
<Button
style="@style/DemoItemStyle"
android:text="@string/busevent"
android:tag="com.avenwu.deepinandroid.BusEventDemo" />
<Button
style="@style/DemoItemStyle"
android:text="@string/colorfilter"
android:tag="com.avenwu.deepinandroid.ColorFilterDemo" />
<Button
style="@style/DemoItemStyle"
android:text="@string/title_activity_markdown_demo"
android:tag="com.avenwu.deepinandroid.MarkdownDemo" />
<Button
style="@style/DemoItemStyle"
android:text="@string/flat_button"
android:tag="com.avenwu.deepinandroid.StyledRadioButtonDemo" />
<Button
style="@style/DemoItemStyle"
android:onClick="openFragment"
android:text="@string/slide_menu"
android:tag="com.avenwu.deepinandroid.SlideMenuFragment" />
<Button
style="@style/DemoItemStyle"
android:text="自定义ResideMenu"
android:tag="com.avenwu.deepinandroid.SlidePanelDemo" />
<Button
style="@style/DemoItemStyle"
android:text="长图分页加载"
android:onClick="openFragment"
android:tag="com.avenwu.deepinandroid.LargeHeightImageDisplayFragment" />
<Button
style="@style/DemoItemStyle"
android:text="Exif信息"
android:onClick="openFragment"
android:tag="com.avenwu.deepinandroid.ExifViewerFragment" />
<Button
style="@style/DemoItemStyle"
android:text="Gradient渐变"
android:onClick="openFragment"
android:tag="com.avenwu.deepinandroid.GradientColorFragment" />
<Button
style="@style/DemoItemStyle"
android:text="呼吸灯"
android:onClick="openFragment"
android:tag="com.avenwu.deepinandroid.BreathLightViewDemo" />
<Button
style="@style/DemoItemStyle"
android:text="BitmapShader"
android:onClick="openFragment"
android:tag="com.avenwu.deepinandroid.BitmapShaderFragment" />
<Button
style="@style/DemoItemStyle"
android:text="WindowAnimation"
android:onClick="openFragment"
android:tag="com.avenwu.deepinandroid.WindowAnimationFragment"
android:visibility="gone"/>
<Button
style="@style/DemoItemStyle"
android:text="Custom Tab"
android:tag="com.avenwu.deepinandroid.CustomTabActivity"
android:visibility="gone"/>
<Button
style="@style/DemoItemStyle"
android:text="功能引导页"
android:tag="com.avenwu.deepinandroid.FeatureActivity"/>
<Button
style="@style/DemoItemStyle"
android:text="字体设置"
android:tag="com.avenwu.deepinandroid.TypefaceActivity"/>
<!--<Button-->
<!--style="@style/DemoItemStyle"-->
<!--android:text="Progress"-->
<!--android:tag="com.avenwu.deepinandroid.CustomProgressActivity"/>-->
<Button
style="@style/DemoItemStyle"
android:text="ExTextView"
android:tag="com.avenwu.deepinandroid.CustomTextViewActivity"/>
<Button
style="@style/DemoItemStyle"
android:text="拉幕弹层"
android:onClick="openFragment"
android:tag="com.avenwu.deepinandroid.CurtainLayoutFragment" />
<Button
style="@style/DemoItemStyle"
android:text="Flip 3D"
android:onClick="openFragment"
android:tag="com.avenwu.deepinandroid.FlipFragmentDemo" />
<Button
style="@style/DemoItemStyle"
android:text="Matrix + Camera"
android:onClick="openFragment"
android:tag="com.avenwu.deepinandroid.CameraMatrixFragmentDemo" />
<Button
style="@style/DemoItemStyle"
android:text="Translation Z"
android:onClick="openFragment"
android:tag="com.avenwu.deepinandroid.StackZFragment" />
<Button
style="@style/DemoItemStyle"
android:text="自定义Drawable"
android:tag="com.avenwu.deepinandroid.CustomDrawableDemo" />
</LinearLayout>
</ScrollView>
<FrameLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout>
================================================
FILE: sample/src/main/res/layout/activity_markdown_demo.xml
================================================
<android.support.v4.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:id="@+id/pager"
android:layout_width="match_parent" android:layout_height="match_parent"
tools:context="com.avenwu.deepinandroid.MarkdownDemo" />
================================================
FILE: sample/src/main/res/layout/activity_my.xml
================================================
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context=".MyActivity">
<net.avenwu.support.widget.DrawerFrame
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/view"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:visibility="visible"/>
<Switch
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Toggle Menu"
android:id="@+id/switch1"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:textOn="Open"
android:textOff="Closed"/>
</RelativeLayout>
================================================
FILE: sample/src/main/res/layout/activity_progress_layout.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<net.avenwu.support.widget.ExProgressView2
android:layout_width="300dp"
android:layout_height="300dp"
android:layout_centerInParent="true" />
</RelativeLayout>
================================================
FILE: sample/src/main/res/layout/activity_refresh_widget.xml
================================================
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/container"
android:layout_height="match_parent"
android:layout_width="match_parent"/>
================================================
FILE: sample/src/main/res/layout/activity_typeface.xml
================================================
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.avenwu.deepinandroid.TypefaceActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="24sp"
android:text="@string/hello_world"/>
<TextView
android:id="@+id/tv_label_font"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="24sp"
android:text="1. Text in Oswald-Stencbab set by setTypeface"/>
<TextView
android:id="@+id/tv_label_font_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="24sp"
android:text="2. Text in Roboto-Bold set by utils"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="24sp"
android:text="3. Text in RobotoCondensed-Regular set by custom LayoutInflator"/>
</LinearLayout>
================================================
FILE: sample/src/main/res/layout/activity_window_anim_sub.xml
================================================
<!-- Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:background="#888"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/image2"/>
</RelativeLayout>
================================================
FILE: sample/src/main/res/layout/activity_window_scale_sub.xml
================================================
<!-- Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:background="#888"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/image1"
android:layout_centerInParent="true"
android:scaleType="centerInside"/>
</RelativeLayout>
================================================
FILE: sample/src/main/res/layout/animation_layout.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#fff"
android:orientation="vertical">
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="侧滑进入" />
<ImageView
android:id="@+id/image"
android:layout_width="50dp"
android:layout_height="80dp"
android:src="@drawable/image2" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="Click to transit the image drawable" />
<ImageView
android:id="@+id/image2"
android:layout_width="50dp"
android:layout_height="80dp" />
<ImageView
android:id="@+id/image3"
android:layout_width="50dp"
android:layout_height="80dp"
android:src="@drawable/image1"
android:layout_gravity="right"/>
</LinearLayout>
================================================
FILE: sample/src/main/res/layout/bitmap_shader_layout.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#fff"
android:gravity="center">
<ImageView
android:layout_width="200dp"
android:layout_height="wrap_content"
android:src="@drawable/image1"
android:scaleType="centerCrop" />
<net.avenwu.support.widget.ShaderImageView
android:layout_width="200dp"
android:layout_height="wrap_content"
android:src="@drawable/image1"
android:scaleType="centerCrop" />
</LinearLayout>
================================================
FILE: sample/src/main/res/layout/breath_light_layout.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="呼吸灯"
android:textAppearance="?android:textAppearanceLarge"
android:layout_margin="16dp"/>
</LinearLayout>
================================================
FILE: sample/src/main/res/layout/camera_matrix_layout.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:clickable="true"
android:background="#fff">
<net.avenwu.support.widget.MatrixFrameLayout
android:layout_width="300dp"
android:layout_height="450dp"
android:layout_gravity="center"
android:layout_marginTop="30dp">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/image2" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="This is label"
android:textSize="40sp" />
</net.avenwu.support.widget.MatrixFrameLayout>
</LinearLayout>
================================================
FILE: sample/src/main/res/layout/chat_layout.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="#fff000"
android:orientation="horizontal"
android:weightSum="6">
<ImageView
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_gravity="center_vertical"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:src="@drawable/ic_launcher"/>
<TextView
android:layout_width="0dp"
android:layout_height="30dp"
android:layout_gravity="center_vertical"
android:layout_weight="5"
android:background="#ff00ff"/>
</LinearLayout>
================================================
FILE: sample/src/main/res/layout/curtain_demo.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/black"
android:orientation="vertical">
<net.avenwu.support.widget.CurtainLayout
android:layout_width="match_parent"
android:layout_height="match_parent"></net.avenwu.support.widget.CurtainLayout>
</LinearLayout>
================================================
FILE: sample/src/main/res/layout/custom_drawable_layout.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".CustomDrawableDemo">
<TextView
android:id="@+id/label"
android:layout_width="match_parent"
android:layout_height="100dp"
android:gravity="center"
android:text="Hello World!" />
<TextView
android:id="@+id/label2"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_below="@+id/label"
android:layout_marginTop="20dp"
android:gravity="center"
android:text="Hello World!" />
<TextView
android:id="@+id/label3"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_below="@+id/label2"
android:layout_marginTop="20dp"
android:gravity="center"
android:text="Hello World!" />
<RadioGroup
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_below="@+id/label3"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<RadioButton
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<RadioButton
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<RadioButton
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
</RadioGroup>
</RelativeLayout>
================================================
FILE: sample/src/main/res/layout/custom_tab_activity.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:id="@+id/container"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<net.avenwu.support.widget.SimpleTabLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.app.FragmentTabHost
android:id="@android:id/tabhost"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1"/>
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:divider="@null"/>
</LinearLayout>
</android.support.v4.app.FragmentTabHost>
</LinearLayout>
</LinearLayout>
================================================
FILE: sample/src/main/res/layout/eventbus_layout.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="@dimen/activity_horizontal_margin">
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/click_send_message"
android:onClick="onSendClick" />
</LinearLayout>
================================================
FILE: sample/src/main/res/layout/exif_layout.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:background="#fff">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<net.avenwu.support.widget.FlatTabGroup
android:id="@+id/tabs"
android:layout_width="match_parent"
app:tab_items="@array/exif_tab"
android:layout_height="40dp"
app:tab_border_width="1dp"
app:tab_border_color="@color/tab_green"
app:tab_radius="5dp"
app:tab_textSize="16sp"
app:tab_textColor="@color/tab_orange"
android:paddingTop="5dp"
android:paddingBottom="5dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:textAppearanceLarge"
android:text="Exif info" />
<TextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<ImageView
android:id="@+id/image"
android:layout_width="300dp"
android:layout_height="300dp"
android:scaleType="centerInside"
android:layout_gravity="center_horizontal"
android:layout_margin="16dp" />
</LinearLayout>
</ScrollView>
================================================
FILE: sample/src/main/res/layout/feature_item_layout.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/ll_above"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/page_1_dark"
android:gravity="center_horizontal"
android:orientation="vertical">
<ImageView
android:id="@+id/iv_image"
android:layout_width="300dp"
android:layout_height="300dp"
android:layout_alignParentBottom="true"
android:scaleType="fitEnd"
android:src="@drawable/page_1_image"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/ll_below"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1.3"
android:background="@color/page_1"
android:gravity="center_horizontal">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:src="@drawable/bt_ic_reminder_white_24"/>
<TextView
android:id="@+id/tv_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:text="@string/page_1_text"
android:textAppearance="?android:textAppearanceMedium"
android:textColor="#ffffff"/>
</RelativeLayout>
</LinearLayout>
================================================
FILE: sample/src/main/res/layout/feature_layout.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_gravity="bottom">
<ImageView
android:id="@+id/iv_left"
android:layout_width="50dp"
android:layout_height="50dp"
android:scaleType="centerInside"
android:src="@drawable/ic_left_arrow"/>
<ImageView
android:id="@+id/iv_right"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_alignParentRight="true"
android:rotation="180"
android:scaleType="centerInside"
android:src="@drawable/ic_left_arrow"/>
</RelativeLayout>
</FrameLayout>
================================================
FILE: sample/src/main/res/layout/filter_layout.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:background="@android:color/white"
android:padding="8dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:textAppearanceMedium"
android:text="PorterDuff"
android:textStyle="bold" />
<Spinner
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/spinner"
android:layout_marginLeft="10dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:layout_marginTop="10dp"
android:background="@android:color/white"
android:padding="8dp">
<TextView
android:layout_width="70dp"
android:layout_height="wrap_content"
android:textAppearance="?android:textAppearanceMedium"
android:text="SRC"
android:textStyle="bold" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="40dp"
android:src="@drawable/ic_launcher"
android:layout_marginLeft="10dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:layout_marginTop="10dp"
android:background="@android:color/white"
android:padding="8dp">
<TextView
android:layout_width="70dp"
android:layout_height="wrap_content"
android:textAppearance="?android:textAppearanceMedium"
android:text="PRE"
android:textStyle="bold" />
<ImageView
android:id="@+id/iv_preview"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:src="@drawable/ic_launcher"
android:layout_marginLeft="10dp" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#99000000"
android:layout_marginTop="10dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="What can PorterDuff do?"
android:layout_marginTop="10dp"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="10dp">
<ImageView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@drawable/ic_watch" />
<ImageView
android:id="@+id/iv_image"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@drawable/ic_watch" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="10dp">
<FrameLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/ic_watch" />
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#99000000" />
</FrameLayout>
<net.avenwu.support.widget.DimImageView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@drawable/ic_watch" />
</LinearLayout>
</LinearLayout>
</ScrollView>
================================================
FILE: sample/src/main/res/layout/flip_layout.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<net.avenwu.support.widget.FlipLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/flip_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/iv_image1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:scaleType="centerCrop"
android:src="@drawable/image1" />
<ImageView
android:id="@+id/iv_image2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:scaleType="centerCrop"
android:src="@drawable/image2" />
</net.avenwu.support.widget.FlipLayout>
</FrameLayout>
================================================
FILE: sample/src/main/res/layout/fragment_stack_z.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<android.support.percent.PercentFrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#fff"
android:clickable="true">
<TextView
android:id="@+id/tv_card_1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#009688"
android:gravity="center"
android:text="Card Label"
android:textColor="@android:color/black"
android:textSize="24sp"
app:layout_heightPercent="40%"
app:layout_marginLeftPercent="5%"
app:layout_marginTopPercent="10%"
app:layout_widthPercent="90%" />
<TextView
android:id="@+id/tv_card_2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#4CAF50"
android:gravity="center"
android:text="Card Label"
android:textColor="@android:color/black"
android:textSize="24sp"
app:layout_heightPercent="40%"
app:layout_marginLeftPercent="5%"
app:layout_marginTopPercent="25%"
app:layout_widthPercent="90%" />
<TextView
android:id="@+id/tv_card_3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#8BC34A"
android:gravity="center"
android:text="Card Label"
android:textColor="@android:color/black"
android:textSize="24sp"
app:layout_heightPercent="40%"
app:layout_marginLeftPercent="5%"
app:layout_marginTopPercent="40%"
app:layout_widthPercent="90%" />
<TextView
android:id="@+id/tv_card_4"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#CDDC39"
android:gravity="center"
android:text="Card Label"
android:textColor="@android:color/black"
android:textSize="24sp"
app:layout_heightPercent="40%"
app:layout_marginLeftPercent="5%"
app:layout_marginTopPercent="55%"
app:layout_widthPercent="90%" />
</android.support.percent.PercentFrameLayout>
================================================
FILE: sample/src/main/res/layout/fragment_tab_host.xml
================================================
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#eaecee"
android:gravity="center_horizontal"
android:orientation="vertical">
<TextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical|center_horizontal"
android:text="@string/hello_world"
android:textAppearance="?android:attr/textAppearanceMedium"/>
</LinearLayout>
================================================
FILE: sample/src/main/res/layout/fragment_tab_item.xml
================================================
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_centerHorizontal="true"
android:layout_gravity="center_horizontal"/>
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal"/>
</LinearLayout>
================================================
FILE: sample/src/main/res/layout/gradient_layout.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#fff">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="LinearGradient"
android:textAppearance="?android:textAppearanceLarge"
android:layout_margin="16dp" />
<com.avenwu.deepinandroid.LinearGradientView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp" />
</LinearLayout>
================================================
FILE: sample/src/main/res/layout/markdown_edit.xml
================================================
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context="com.avenwu.deepinandroid.MarkdownDemo.EditFragment">
<TextView
android:id="@+id/section_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<EditText
android:id="@+id/edt_input"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="top" />
</RelativeLayout>
================================================
FILE: sample/src/main/res/layout/qq_dragging_circle_layout.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<net.avenwu.support.widget.PolygonWithQuadraticBezirView
android:id="@+id/shape1"
android:layout_width="match_parent"
android:layout_height="200dp"/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#ff222222"/>
<net.avenwu.support.widget.PolygonWithQuadraticBezirView
android:id="@+id/shape2"
android:layout_width="match_parent"
android:layout_height="200dp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Move Horizontal"
android:paddingLeft="15dp"
android:id="@+id/labelX"/>
<SeekBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/seekBarX"
android:max="100"
android:progress="50"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Move Vertical"
android:paddingLeft="15dp"
android:id="@+id/labelY"/>
<SeekBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/seekBarY"
android:max="100"
android:progress="50"/>
</LinearLayout>
================================================
FILE: sample/src/main/res/layout/ripple_layout.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#fff"
android:clickable="false">
<net.avenwu.support.widget.BreathingLayout
android:id="@+id/custom"
android:layout_width="match_parent"
android:layout_height="300dp"
app:_autoStart="true"
app:_rippleEndRadius="100dp"
app:_rippleStartRadius="20dp"
app:_rippleColor="@color/tab_orange">
<Button
android:id="@+id/btnPlay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Click to Play animation"
android:layout_gravity="bottom"
android:layout_margin="16dp"
android:visibility="gone" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="└(^o^)┘"
android:textStyle="bold"
android:textAppearance="?android:textAppearanceMedium"
android:layout_gravity="center"
android:textColo
gitextract_cenee9ug/
├── .gitignore
├── LICENSE
├── README.md
├── build.gradle
├── gradle/
│ └── wrapper/
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── sample/
│ ├── .gitignore
│ ├── build.gradle
│ ├── libs/
│ │ ├── AnnotationProcessorTest.jar
│ │ └── markdown4j-2.2.jar
│ ├── proguard-rules.pro
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── com/
│ │ └── avenwu/
│ │ └── deepinandroid/
│ │ └── ApplicationTest.java
│ └── main/
│ ├── AndroidManifest.xml
│ ├── assets/
│ │ └── github-markdown.css
│ ├── java/
│ │ └── com/
│ │ └── avenwu/
│ │ └── deepinandroid/
│ │ ├── AnimatedSubActivity.java
│ │ ├── BitmapShaderFragment.java
│ │ ├── BreathLightViewDemo.java
│ │ ├── BusEventDemo.java
│ │ ├── CameraMatrixFragmentDemo.java
│ │ ├── ColorFilterDemo.java
│ │ ├── Content.java
│ │ ├── CurtainLayoutFragment.java
│ │ ├── CustomDrawableDemo.java
│ │ ├── CustomProgressActivity.java
│ │ ├── CustomTabActivity.java
│ │ ├── CustomTextViewActivity.java
│ │ ├── DrawerDemoFragment.java
│ │ ├── ExifViewerFragment.java
│ │ ├── FeatureActivity.java
│ │ ├── FlipFragmentDemo.java
│ │ ├── GradientColorFragment.java
│ │ ├── LargeHeightImageDisplayFragment.java
│ │ ├── LinearGradientView.java
│ │ ├── MainActivity.java
│ │ ├── MarkdownDemo.java
│ │ ├── QQDraggingCircleDemo.java
│ │ ├── RefreshDemoFragment.java
│ │ ├── RefreshWidgetActivity.java
│ │ ├── ScaleSubActivity.java
│ │ ├── ShortcutDemo.java
│ │ ├── SlideMenuFragment.java
│ │ ├── SlidePanelDemo.java
│ │ ├── StackZFragment.java
│ │ ├── StyledRadioButtonDemo.java
│ │ ├── TagInputDemo.java
│ │ ├── TypefaceActivity.java
│ │ ├── WindowAnimationFragment.java
│ │ ├── eventbus/
│ │ │ ├── Bus.java
│ │ │ ├── Finder.java
│ │ │ ├── NameBasedFinder.java
│ │ │ ├── PostHandler.java
│ │ │ └── Subscriber.java
│ │ └── util/
│ │ ├── SystemUiHider.java
│ │ ├── SystemUiHiderBase.java
│ │ └── SystemUiHiderHoneycomb.java
│ └── res/
│ ├── anim/
│ │ ├── scale_up_left.xml
│ │ ├── scale_up_rightt.xml
│ │ ├── slide_in_left.xml
│ │ ├── slide_in_right.xml
│ │ ├── slide_out_left.xml
│ │ └── slide_out_right.xml
│ ├── color/
│ │ ├── radio_button_color.xml
│ │ ├── radio_button_color_blue.xml
│ │ ├── radio_button_color_green.xml
│ │ ├── radio_button_color_light_blue.xml
│ │ ├── radio_button_color_orange.xml
│ │ └── radio_button_color_purple.xml
│ ├── drawable/
│ │ ├── animate_drawable.xml
│ │ ├── flat_round_shape_left.xml
│ │ ├── flat_round_shape_middle.xml
│ │ └── flat_round_shape_right.xml
│ ├── layout/
│ │ ├── activity_main.xml
│ │ ├── activity_markdown_demo.xml
│ │ ├── activity_my.xml
│ │ ├── activity_progress_layout.xml
│ │ ├── activity_refresh_widget.xml
│ │ ├── activity_typeface.xml
│ │ ├── activity_window_anim_sub.xml
│ │ ├── activity_window_scale_sub.xml
│ │ ├── animation_layout.xml
│ │ ├── bitmap_shader_layout.xml
│ │ ├── breath_light_layout.xml
│ │ ├── camera_matrix_layout.xml
│ │ ├── chat_layout.xml
│ │ ├── curtain_demo.xml
│ │ ├── custom_drawable_layout.xml
│ │ ├── custom_tab_activity.xml
│ │ ├── eventbus_layout.xml
│ │ ├── exif_layout.xml
│ │ ├── feature_item_layout.xml
│ │ ├── feature_layout.xml
│ │ ├── filter_layout.xml
│ │ ├── flip_layout.xml
│ │ ├── fragment_stack_z.xml
│ │ ├── fragment_tab_host.xml
│ │ ├── fragment_tab_item.xml
│ │ ├── gradient_layout.xml
│ │ ├── markdown_edit.xml
│ │ ├── qq_dragging_circle_layout.xml
│ │ ├── ripple_layout.xml
│ │ ├── shorcut_layout.xml
│ │ ├── slide_layout.xml
│ │ ├── slidepanel_layout.xml
│ │ ├── styled_radio_button.xml
│ │ ├── tag_item.xml
│ │ ├── test_tag_input_layout.xml
│ │ └── textview_layout.xml
│ ├── menu/
│ │ ├── markdown_menu.xml
│ │ ├── menu_main.xml
│ │ └── menu_typeface.xml
│ ├── values/
│ │ ├── arrays.xml
│ │ ├── attrs.xml
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ ├── values-v11/
│ │ └── styles.xml
│ ├── values-w820dp/
│ │ └── dimens.xml
│ └── values-zh/
│ └── strings.xml
├── settings.gradle
└── support/
├── .gitignore
├── build.gradle
├── custom_mvn_push.gradle
├── proguard-rules.pro
└── src/
├── androidTest/
│ └── java/
│ └── net/
│ └── avenwu/
│ └── support/
│ └── ApplicationTest.java
└── main/
├── AndroidManifest.xml
├── java/
│ └── net/
│ └── avenwu/
│ └── support/
│ ├── presenter/
│ │ ├── Presenter.java
│ │ ├── PresenterActivity.java
│ │ └── PresenterFragment.java
│ ├── protocol/
│ │ ├── RenderAction.java
│ │ └── UIAction.java
│ ├── util/
│ │ ├── BitmapUtil.java
│ │ ├── ChartSet.java
│ │ ├── Device.java
│ │ ├── ReflectionUtils.java
│ │ ├── TypefaceContextWrapper.java
│ │ ├── TypefaceLayoutInflator.java
│ │ ├── TypefaceUtils.java
│ │ └── ViewCompat.java
│ └── widget/
│ ├── BreathingDelegate.java
│ ├── BreathingLayout.java
│ ├── CurtainLayout.java
│ ├── CustomSlidePanelLayout.java
│ ├── DimImageView.java
│ ├── DrawerFrame.java
│ ├── DrawerFrameV2.java
│ ├── ExProgressView.java
│ ├── ExTextView.java
│ ├── FlatTabGroup.java
│ ├── FlipLayout.java
│ ├── MatrixFrameLayout.java
│ ├── PolygonWithQuadraticBezirView.java
│ ├── RefreshLayout.java
│ ├── SegmentDrawable.java
│ ├── ShaderImageView.java
│ ├── SimpleTab.java
│ ├── SimpleTabLayout.java
│ └── TagFlowLayout.java
└── res/
├── drawable/
│ └── toast_shape.xml
├── layout/
│ └── custom_toast.xml
└── values/
├── attr_breath_light.xml
├── attr_dim_imagview.xml
├── attr_ex_textview.xml
├── attr_flat_tab_group.xml
├── attrs_drawer_frame.xml
├── ids.xml
└── strings.xml
SYMBOL INDEX (523 symbols across 75 files)
FILE: sample/src/androidTest/java/com/avenwu/deepinandroid/ApplicationTest.java
class ApplicationTest (line 10) | public class ApplicationTest extends ApplicationTestCase<Application> {
method ApplicationTest (line 11) | public ApplicationTest() {
method testEncodeFormat (line 23) | public void testEncodeFormat() {
method isBasicASSIC (line 39) | boolean isBasicASSIC(char c) {
method isEXPANDUNICODE (line 43) | boolean isEXPANDUNICODE(char c) {
method unicode2Assic (line 47) | char unicode2Assic(char c) {
FILE: sample/src/main/java/com/avenwu/deepinandroid/AnimatedSubActivity.java
class AnimatedSubActivity (line 28) | public class AnimatedSubActivity extends Activity {
method onCreate (line 30) | @Override
method finish (line 36) | @Override
FILE: sample/src/main/java/com/avenwu/deepinandroid/BitmapShaderFragment.java
class BitmapShaderFragment (line 12) | public class BitmapShaderFragment extends Fragment {
method onCreateView (line 13) | @Override
FILE: sample/src/main/java/com/avenwu/deepinandroid/BreathLightViewDemo.java
class BreathLightViewDemo (line 12) | public class BreathLightViewDemo extends Fragment {
method onCreateView (line 13) | @Override
FILE: sample/src/main/java/com/avenwu/deepinandroid/BusEventDemo.java
class BusEventDemo (line 14) | public class BusEventDemo extends ActionBarActivity {
method onCreate (line 16) | @Override
method onStart (line 22) | @Override
method onSendClick (line 28) | public void onSendClick(View view) {
method onEvent (line 32) | public void onEvent(String event) {
method onStop (line 37) | @Override
FILE: sample/src/main/java/com/avenwu/deepinandroid/CameraMatrixFragmentDemo.java
class CameraMatrixFragmentDemo (line 13) | public class CameraMatrixFragmentDemo extends Fragment {
method onCreateView (line 14) | @Nullable
FILE: sample/src/main/java/com/avenwu/deepinandroid/ColorFilterDemo.java
class ColorFilterDemo (line 23) | public class ColorFilterDemo extends ActionBarActivity implements Adapte...
method onCreate (line 32) | @Override
method onItemSelected (line 54) | @Override
method onNothingSelected (line 62) | @Override
FILE: sample/src/main/java/com/avenwu/deepinandroid/Content.java
type Content (line 3) | public interface Content {
method getContent (line 4) | public String getContent();
FILE: sample/src/main/java/com/avenwu/deepinandroid/CurtainLayoutFragment.java
class CurtainLayoutFragment (line 13) | public class CurtainLayoutFragment extends Fragment {
method onCreateView (line 15) | @Nullable
FILE: sample/src/main/java/com/avenwu/deepinandroid/CustomDrawableDemo.java
class CustomDrawableDemo (line 11) | public class CustomDrawableDemo extends AppCompatActivity {
method onCreate (line 13) | @Override
FILE: sample/src/main/java/com/avenwu/deepinandroid/CustomProgressActivity.java
class CustomProgressActivity (line 9) | public class CustomProgressActivity extends AppCompatActivity {
method onCreate (line 11) | @Override
FILE: sample/src/main/java/com/avenwu/deepinandroid/CustomTabActivity.java
class CustomTabActivity (line 21) | public class CustomTabActivity extends FragmentActivity {
method onCreate (line 25) | @Override
method getTabIndicator (line 65) | private View getTabIndicator(Context context, int title, int icon) {
class FragmentTab (line 73) | public static class FragmentTab extends Fragment {
method onCreate (line 75) | @Override
method onCreateView (line 80) | @Override
FILE: sample/src/main/java/com/avenwu/deepinandroid/CustomTextViewActivity.java
class CustomTextViewActivity (line 12) | public class CustomTextViewActivity extends AppCompatActivity {
method onCreate (line 14) | @Override
FILE: sample/src/main/java/com/avenwu/deepinandroid/DrawerDemoFragment.java
class DrawerDemoFragment (line 23) | public class DrawerDemoFragment extends Fragment {
method DrawerDemoFragment (line 26) | public DrawerDemoFragment() {
method onCreateView (line 29) | @Override
FILE: sample/src/main/java/com/avenwu/deepinandroid/ExifViewerFragment.java
class ExifViewerFragment (line 35) | public class ExifViewerFragment extends Fragment {
method onCreateView (line 39) | @Override
method decodeWith (line 62) | private void decodeWith(ExifDecoder decoder) {
type ExifDecoder (line 81) | interface ExifDecoder {
method decodeBitmap (line 82) | Bitmap decodeBitmap();
method extractExif (line 84) | String extractExif();
class AssetsImageExifDecoder (line 90) | class AssetsImageExifDecoder implements ExifDecoder {
method decodeBitmap (line 93) | @Override
method extractExif (line 104) | @Override
class ExternalImageExifDecoder (line 131) | class ExternalImageExifDecoder implements ExifDecoder {
method decodeBitmap (line 135) | @Override
method extractExif (line 140) | @Override
class ExifBean (line 167) | class ExifBean {
method ExifBean (line 171) | public ExifBean(Bitmap bitmap, String value) {
FILE: sample/src/main/java/com/avenwu/deepinandroid/FeatureActivity.java
class FeatureActivity (line 16) | public class FeatureActivity extends AppCompatActivity {
method onCreate (line 20) | @Override
class Adapter (line 61) | class Adapter extends FragmentPagerAdapter {
method Adapter (line 62) | public Adapter(FragmentManager fm) {
method getItem (line 66) | @Override
method getCount (line 94) | @Override
class FragmentItem (line 105) | public static class FragmentItem extends Fragment {
method FragmentItem (line 106) | public FragmentItem() {
method onCreateView (line 109) | @Nullable
FILE: sample/src/main/java/com/avenwu/deepinandroid/FlipFragmentDemo.java
class FlipFragmentDemo (line 15) | public class FlipFragmentDemo extends Fragment {
method onCreateView (line 18) | @Nullable
method onViewCreated (line 24) | @Override
FILE: sample/src/main/java/com/avenwu/deepinandroid/GradientColorFragment.java
class GradientColorFragment (line 13) | public class GradientColorFragment extends Fragment {
method onCreateView (line 14) | @Override
FILE: sample/src/main/java/com/avenwu/deepinandroid/LargeHeightImageDisplayFragment.java
class LargeHeightImageDisplayFragment (line 29) | public class LargeHeightImageDisplayFragment extends Fragment {
method onCreateView (line 33) | @Override
method onViewCreated (line 48) | @Override
method onDestroyView (line 104) | @Override
FILE: sample/src/main/java/com/avenwu/deepinandroid/LinearGradientView.java
class LinearGradientView (line 15) | public class LinearGradientView extends View {
method LinearGradientView (line 19) | public LinearGradientView(Context context) {
method LinearGradientView (line 23) | public LinearGradientView(Context context, AttributeSet attrs) {
method LinearGradientView (line 27) | public LinearGradientView(Context context, AttributeSet attrs, int def...
method onDraw (line 36) | @Override
FILE: sample/src/main/java/com/avenwu/deepinandroid/MainActivity.java
class MainActivity (line 15) | @PrintMe
method onCreate (line 18) | @Override
method showShortcut (line 24) | public void showShortcut(View view) {
method showDrawerFrame (line 28) | @PrintMe
method showRefreshLayout (line 35) | @PrintMe
method openActivity (line 42) | public void openActivity(View view) {
method openFragment (line 50) | public void openFragment(View view) {
method error (line 65) | private void error(Exception e) {
FILE: sample/src/main/java/com/avenwu/deepinandroid/MarkdownDemo.java
class MarkdownDemo (line 26) | public class MarkdownDemo extends ActionBarActivity implements ActionBar...
method onCreate (line 31) | @Override
method onTabSelected (line 68) | @Override
method onTabUnselected (line 73) | @Override
method onTabReselected (line 77) | @Override
method makeFragmentName (line 81) | private static String makeFragmentName(int viewId, long id) {
method getContent (line 85) | @Override
class SectionsPagerAdapter (line 98) | public class SectionsPagerAdapter extends FragmentPagerAdapter {
method SectionsPagerAdapter (line 100) | public SectionsPagerAdapter(FragmentManager fm) {
method getItem (line 104) | @Override
method getCount (line 114) | @Override
method getPageTitle (line 119) | @Override
class EditFragment (line 135) | public static class EditFragment extends Fragment implements Content {
method EditFragment (line 353) | public EditFragment() {
method onCreateView (line 356) | @Override
method getContent (line 365) | @Override
class PreviewFragment (line 371) | public static class PreviewFragment extends Fragment {
method onCreateView (line 376) | @Override
method onPause (line 388) | @Override
method onResume (line 394) | @Override
method setUserVisibleHint (line 400) | @Override
method renderMarkdownString (line 411) | String renderMarkdownString(String raw) {
method onDestroyView (line 420) | @Override
method onDestroy (line 426) | @Override
FILE: sample/src/main/java/com/avenwu/deepinandroid/QQDraggingCircleDemo.java
class QQDraggingCircleDemo (line 15) | public class QQDraggingCircleDemo extends ActionBarActivity {
method onCreate (line 25) | @Override
FILE: sample/src/main/java/com/avenwu/deepinandroid/RefreshDemoFragment.java
class RefreshDemoFragment (line 22) | public class RefreshDemoFragment extends Fragment {
method onCreateView (line 24) | @Override
FILE: sample/src/main/java/com/avenwu/deepinandroid/RefreshWidgetActivity.java
class RefreshWidgetActivity (line 7) | public class RefreshWidgetActivity extends ActionBarActivity {
method onCreate (line 9) | @Override
FILE: sample/src/main/java/com/avenwu/deepinandroid/ScaleSubActivity.java
class ScaleSubActivity (line 31) | public class ScaleSubActivity extends Activity {
method onCreate (line 34) | @Override
method finish (line 67) | @Override
FILE: sample/src/main/java/com/avenwu/deepinandroid/ShortcutDemo.java
class ShortcutDemo (line 17) | public class ShortcutDemo extends ActionBarActivity {
method onCreate (line 21) | @Override
method shortcutAdd (line 48) | private void shortcutAdd(String name, int number, Class<? extends Acti...
method shortcutDel (line 73) | private void shortcutDel(String name, Class<? extends Activity> cls) {
FILE: sample/src/main/java/com/avenwu/deepinandroid/SlideMenuFragment.java
class SlideMenuFragment (line 17) | public class SlideMenuFragment extends Fragment {
method onCreateView (line 18) | @Override
FILE: sample/src/main/java/com/avenwu/deepinandroid/SlidePanelDemo.java
class SlidePanelDemo (line 15) | public class SlidePanelDemo extends ActionBarActivity {
method onCreate (line 19) | @Override
FILE: sample/src/main/java/com/avenwu/deepinandroid/StackZFragment.java
class StackZFragment (line 15) | public class StackZFragment extends Fragment {
method onCreateView (line 17) | @Nullable
method onViewCreated (line 23) | @Override
FILE: sample/src/main/java/com/avenwu/deepinandroid/StyledRadioButtonDemo.java
class StyledRadioButtonDemo (line 14) | public class StyledRadioButtonDemo extends ActionBarActivity {
method onCreate (line 18) | @Override
FILE: sample/src/main/java/com/avenwu/deepinandroid/TagInputDemo.java
class TagInputDemo (line 13) | public class TagInputDemo extends ActionBarActivity {
method onCreate (line 14) | @Override
method onGetTags (line 32) | public void onGetTags(View view) {
FILE: sample/src/main/java/com/avenwu/deepinandroid/TypefaceActivity.java
class TypefaceActivity (line 12) | public class TypefaceActivity extends AppCompatActivity {
method onCreate (line 14) | @Override
method attachBaseContext (line 33) | @Override
FILE: sample/src/main/java/com/avenwu/deepinandroid/WindowAnimationFragment.java
class WindowAnimationFragment (line 19) | public class WindowAnimationFragment extends Fragment {
method onCreateView (line 20) | @Override
method onViewCreated (line 65) | @Override
FILE: sample/src/main/java/com/avenwu/deepinandroid/eventbus/Bus.java
class Bus (line 14) | public class Bus {
method Bus (line 24) | private Bus() {
method getDefault (line 30) | public static Bus getDefault() {
method register (line 41) | public void register(Object subscriber) {
method unregister (line 57) | public void unregister(Object subscriber) {
method post (line 67) | public void post(Object event) {
FILE: sample/src/main/java/com/avenwu/deepinandroid/eventbus/Finder.java
type Finder (line 9) | public interface Finder {
method findSubscriber (line 11) | List<Method> findSubscriber(Class<?> subscriber);
FILE: sample/src/main/java/com/avenwu/deepinandroid/eventbus/NameBasedFinder.java
class NameBasedFinder (line 12) | public class NameBasedFinder implements Finder {
method findSubscriber (line 14) | @Override
FILE: sample/src/main/java/com/avenwu/deepinandroid/eventbus/PostHandler.java
class PostHandler (line 13) | public class PostHandler extends Handler {
method PostHandler (line 17) | public PostHandler(Looper looper, Bus bus) {
method handleMessage (line 22) | @Override
method enqueue (line 35) | void enqueue(Object event) {
FILE: sample/src/main/java/com/avenwu/deepinandroid/eventbus/Subscriber.java
class Subscriber (line 8) | public class Subscriber {
method Subscriber (line 16) | public Subscriber(Object subscriber, Method method) {
FILE: sample/src/main/java/com/avenwu/deepinandroid/util/SystemUiHider.java
class SystemUiHider (line 26) | public abstract class SystemUiHider {
method getInstance (line 94) | public static SystemUiHider getInstance(Activity activity, View anchor...
method SystemUiHider (line 102) | protected SystemUiHider(Activity activity, View anchorView, int flags) {
method setup (line 112) | public abstract void setup();
method isVisible (line 117) | public abstract boolean isVisible();
method hide (line 122) | public abstract void hide();
method show (line 127) | public abstract void show();
method toggle (line 132) | public void toggle() {
method setOnVisibilityChangeListener (line 144) | public void setOnVisibilityChangeListener(OnVisibilityChangeListener l...
method onVisibilityChange (line 156) | @Override
type OnVisibilityChangeListener (line 164) | public interface OnVisibilityChangeListener {
method onVisibilityChange (line 170) | public void onVisibilityChange(boolean visible);
FILE: sample/src/main/java/com/avenwu/deepinandroid/util/SystemUiHiderBase.java
class SystemUiHiderBase (line 11) | public class SystemUiHiderBase extends SystemUiHider {
method SystemUiHiderBase (line 22) | protected SystemUiHiderBase(Activity activity, View anchorView, int fl...
method setup (line 26) | @Override
method isVisible (line 37) | @Override
method hide (line 42) | @Override
method show (line 53) | @Override
FILE: sample/src/main/java/com/avenwu/deepinandroid/util/SystemUiHiderHoneycomb.java
class SystemUiHiderHoneycomb (line 14) | @TargetApi(Build.VERSION_CODES.HONEYCOMB)
method SystemUiHiderHoneycomb (line 45) | protected SystemUiHiderHoneycomb(Activity activity, View anchorView, i...
method setup (line 74) | @Override
method hide (line 82) | @Override
method show (line 90) | @Override
method isVisible (line 98) | @Override
method onSystemUiVisibilityChange (line 105) | @Override
FILE: support/src/androidTest/java/net/avenwu/support/ApplicationTest.java
class ApplicationTest (line 9) | public class ApplicationTest extends ApplicationTestCase<Application> {
method ApplicationTest (line 11) | public ApplicationTest() {
FILE: support/src/main/java/net/avenwu/support/presenter/Presenter.java
class Presenter (line 19) | public class Presenter {
method attach (line 24) | public void attach() {
method addCallback (line 28) | public <T> Callback<T> addCallback(DetachableCallback<T> callback) {
method addAction (line 36) | public Presenter addAction(String key, RenderAction<?> action) {
method detach (line 44) | public void detach() {
method invoke (line 62) | public void invoke(String key, Object data) {
class DetachableCallback (line 74) | protected static class DetachableCallback<T> implements Callback<T> {
method DetachableCallback (line 77) | public DetachableCallback(Callback<T> callback) {
method success (line 81) | @Override
method failure (line 88) | @Override
method detach (line 95) | public void detach() {
FILE: support/src/main/java/net/avenwu/support/presenter/PresenterActivity.java
class PresenterActivity (line 9) | public abstract class PresenterActivity<P extends Presenter> extends App...
method getPresenterClass (line 12) | protected abstract Class<? extends P> getPresenterClass();
method onCreate (line 14) | @Override
method onDestroy (line 27) | @Override
method getPresenter (line 33) | public P getPresenter() {
FILE: support/src/main/java/net/avenwu/support/presenter/PresenterFragment.java
class PresenterFragment (line 6) | public abstract class PresenterFragment<P extends Presenter> extends Fra...
method getPresenterClass (line 9) | protected abstract Class<? extends P> getPresenterClass();
method onCreate (line 11) | @Override
method onDetach (line 24) | @Override
method getPresenter (line 30) | public P getPresenter() {
FILE: support/src/main/java/net/avenwu/support/protocol/RenderAction.java
type RenderAction (line 6) | public interface RenderAction<T> {
method onUpdate (line 7) | void onUpdate(T data);
FILE: support/src/main/java/net/avenwu/support/protocol/UIAction.java
class UIAction (line 6) | public abstract class UIAction<T> implements RenderAction<T> {
method onUpdate (line 7) | @Override
method onUpdateUI (line 11) | public abstract void onUpdateUI(T data);
FILE: support/src/main/java/net/avenwu/support/util/BitmapUtil.java
class BitmapUtil (line 15) | public class BitmapUtil {
method getRoundedCornerBitmap (line 22) | public static Bitmap getRoundedCornerBitmap(Bitmap bitmap, float radiu...
FILE: support/src/main/java/net/avenwu/support/util/ChartSet.java
class ChartSet (line 8) | public class ChartSet {
method convertDBCS (line 19) | public static String convertDBCS(CharSequence text) {
method isCharNeedConvert (line 33) | public static boolean isCharNeedConvert(char c) {
method convert (line 37) | public static char convert(char c) {
FILE: support/src/main/java/net/avenwu/support/util/Device.java
class Device (line 6) | public class Device {
method isARMBasedDevice (line 11) | public static boolean isARMBasedDevice() {
FILE: support/src/main/java/net/avenwu/support/util/ReflectionUtils.java
class ReflectionUtils (line 11) | class ReflectionUtils {
method getField (line 13) | static Field getField(Class clazz, String fieldName) {
method getValue (line 23) | static Object getValue(Field field, Object obj) {
method setValue (line 31) | static void setValue(Field field, Object obj, Object value) {
method getMethod (line 38) | static Method getMethod(Class clazz, String methodName) {
method invokeMethod (line 49) | static void invokeMethod(Object object, Method method, Object... args) {
FILE: support/src/main/java/net/avenwu/support/util/TypefaceContextWrapper.java
class TypefaceContextWrapper (line 10) | public class TypefaceContextWrapper extends ContextWrapper {
method TypefaceContextWrapper (line 13) | public TypefaceContextWrapper(Context base) {
method wrap (line 17) | public static ContextWrapper wrap(Context base) {
method getSystemService (line 21) | @Override
FILE: support/src/main/java/net/avenwu/support/util/TypefaceLayoutInflator.java
class TypefaceLayoutInflator (line 22) | public class TypefaceLayoutInflator extends LayoutInflater {
method TypefaceLayoutInflator (line 23) | public TypefaceLayoutInflator(Context context) {
method TypefaceLayoutInflator (line 27) | public TypefaceLayoutInflator(LayoutInflater original, Context newCont...
method cloneInContext (line 31) | @Override
method onCreateView (line 36) | @Override
method onCreateView (line 43) | @Override
method setFactory2 (line 50) | @Override
method setFactory (line 61) | @Override
method inflate (line 71) | @Override
method setPrivateFactoryInternal (line 79) | private void setPrivateFactoryInternal() {
class WrapperFactory (line 100) | private static class WrapperFactory implements LayoutInflater.Factory {
method WrapperFactory (line 104) | public WrapperFactory(Factory factory, TypefaceLayoutInflator inflat...
method onCreateView (line 109) | @Override
method onViewCreatedInternal (line 127) | static void onViewCreatedInternal(View view, final Context context, At...
method createCustomViewInternal (line 146) | private View createCustomViewInternal(View parent, View view, String n...
class WrapperFactory2 (line 181) | @TargetApi(11)
method WrapperFactory2 (line 185) | public WrapperFactory2(Factory2 factory2) {
method onCreateView (line 189) | @Override
method onCreateView (line 196) | @Override
class PrivateWrapperFactory2 (line 204) | @TargetApi(11)
method PrivateWrapperFactory2 (line 209) | public PrivateWrapperFactory2(Factory2 factory2, TypefaceLayoutInfla...
method onCreateView (line 214) | @Override
FILE: support/src/main/java/net/avenwu/support/util/TypefaceUtils.java
class TypefaceUtils (line 17) | public class TypefaceUtils {
method load (line 27) | public static Typeface load(final AssetManager assetManager, final Str...
method setTypeface (line 44) | public static void setTypeface(Context context, TextView textView, Str...
FILE: support/src/main/java/net/avenwu/support/util/ViewCompat.java
class ViewCompat (line 26) | public class ViewCompat {
method enableOverScroll (line 33) | public static void enableOverScroll(AbsListView listView, int distance) {
method customEdgeEffectColor (line 52) | public static void customEdgeEffectColor(AbsListView listView, @ColorR...
method setEdgeEffectColor (line 68) | public static void setEdgeEffectColor(final EdgeEffect edgeEffect, @Co...
method removeContentInsetOfToolbar (line 99) | public static boolean removeContentInsetOfToolbar(View customView) {
method makeText (line 117) | public static Toast makeText(Context context, String text, int duratio...
method makeText (line 127) | public static Toast makeText(Context context, @StringRes int text, int...
FILE: support/src/main/java/net/avenwu/support/widget/BreathingDelegate.java
class BreathingDelegate (line 23) | @SuppressWarnings("NewApi")
method BreathingDelegate (line 37) | public BreathingDelegate(Context context, AttributeSet attrs, View vie...
method get (line 67) | @Override
method set (line 72) | @Override
method get (line 78) | @Override
method set (line 83) | @Override
method getRadius (line 89) | private float getRadius() {
method setRadius (line 93) | private void setRadius(float radius) {
method getRippleAlpha (line 97) | public int getRippleAlpha() {
method setRippleAlpha (line 101) | public void setRippleAlpha(int rippleAlpha) {
method prepareAnimation (line 105) | private void prepareAnimation() {
method toggle (line 125) | public void toggle() {
method start (line 135) | public void start() {
method stop (line 139) | public void stop() {
method getContext (line 143) | private Context getContext() {
method onDraw (line 147) | public void onDraw(Canvas canvas) {
method onLayout (line 154) | public void onLayout(boolean changed, int left, int top, int right, in...
method onDetachedFromWindow (line 159) | public void onDetachedFromWindow() {
FILE: support/src/main/java/net/avenwu/support/widget/BreathingLayout.java
class BreathingLayout (line 11) | public class BreathingLayout extends FrameLayout {
method BreathingLayout (line 14) | public BreathingLayout(Context context) {
method BreathingLayout (line 18) | public BreathingLayout(Context context, AttributeSet attrs) {
method BreathingLayout (line 22) | public BreathingLayout(Context context, AttributeSet attrs, int defSty...
method onDraw (line 28) | @Override
method onLayout (line 33) | @Override
method onDetachedFromWindow (line 39) | @Override
FILE: support/src/main/java/net/avenwu/support/widget/CurtainLayout.java
class CurtainLayout (line 10) | public class CurtainLayout extends FrameLayout {
method CurtainLayout (line 11) | public CurtainLayout(Context context) {
method CurtainLayout (line 15) | public CurtainLayout(Context context, AttributeSet attrs) {
FILE: support/src/main/java/net/avenwu/support/widget/CustomSlidePanelLayout.java
class CustomSlidePanelLayout (line 20) | @TargetApi(11)
method CustomSlidePanelLayout (line 26) | public CustomSlidePanelLayout(Context context) {
method CustomSlidePanelLayout (line 30) | public CustomSlidePanelLayout(Context context, AttributeSet attrs) {
method CustomSlidePanelLayout (line 34) | public CustomSlidePanelLayout(Context context, AttributeSet attrs, int...
method onPanelSlide (line 44) | @Override
method onPanelOpened (line 73) | @Override
method onPanelClosed (line 80) | @Override
method setPanelSlideListener (line 89) | @Override
method onDraw (line 98) | @Override
method drawChild (line 106) | @Override
method dimOnForeground (line 120) | private void dimOnForeground(Canvas canvas) {
method setSlideEnable (line 126) | public void setSlideEnable(boolean slideEnable) {
method onInterceptTouchEvent (line 130) | @Override
method onTouchEvent (line 135) | @Override
FILE: support/src/main/java/net/avenwu/support/widget/DimImageView.java
class DimImageView (line 14) | public class DimImageView extends ImageView {
method DimImageView (line 18) | public DimImageView(Context context) {
method DimImageView (line 22) | public DimImageView(Context context, AttributeSet attrs) {
method DimImageView (line 26) | public DimImageView(Context context, AttributeSet attrs, int defStyleA...
method onDraw (line 33) | @Override
FILE: support/src/main/java/net/avenwu/support/widget/DrawerFrame.java
class DrawerFrame (line 18) | public class DrawerFrame extends FrameLayout {
method DrawerFrame (line 23) | public DrawerFrame(Context context) {
method DrawerFrame (line 27) | public DrawerFrame(Context context, AttributeSet attrs) {
method DrawerFrame (line 31) | public DrawerFrame(Context context, AttributeSet attrs, int defStyle) {
method init (line 36) | private void init(AttributeSet attrs, int defStyle) {
method onInterceptTouchEvent (line 65) | @Override
method setSlide (line 92) | public void setSlide(boolean enable) {
method onTouchEvent (line 96) | @Override
method onLayout (line 142) | @Override
method showMenuSmoothly (line 161) | public void showMenuSmoothly() {
method dismissSmoothly (line 166) | public void dismissSmoothly() {
method setMenuView (line 172) | public void setMenuView(View view) {
method setContentView (line 178) | public void setContentView(View view) {
method computeScroll (line 184) | @Override
method d (line 202) | private void d(String tag, String text) {
FILE: support/src/main/java/net/avenwu/support/widget/DrawerFrameV2.java
class DrawerFrameV2 (line 24) | public class DrawerFrameV2 extends FrameLayout {
method DrawerFrameV2 (line 35) | public DrawerFrameV2(Context context) {
method DrawerFrameV2 (line 39) | public DrawerFrameV2(Context context, AttributeSet attrs) {
method DrawerFrameV2 (line 43) | public DrawerFrameV2(Context context, AttributeSet attrs, int defStyle) {
method init (line 48) | private void init(AttributeSet attrs, int defStyle) {
method onFinishInflate (line 62) | @Override
method onInterceptTouchEvent (line 90) | @Override
method setSlide (line 113) | public void setSlide(boolean enable) {
method onTouchEvent (line 117) | @Override
method onLayout (line 155) | @Override
method isContentView (line 207) | boolean isContentView(View child) {
method isDrawerView (line 211) | boolean isDrawerView(View child) {
method showMenuSmoothly (line 219) | public void showMenuSmoothly() {
method dismissSmoothly (line 224) | public void dismissSmoothly() {
method setMenuView (line 230) | public void setMenuView(View view) {
method setContentView (line 238) | public void setContentView(View view) {
method computeScroll (line 246) | @Override
method d (line 268) | private void d(String tag, String text) {
method onScrollChanged (line 285) | protected void onScrollChanged(int l, int t, int oldl, int oldt) {
FILE: support/src/main/java/net/avenwu/support/widget/ExProgressView.java
class ExProgressView (line 22) | @TargetApi(14)
method ExProgressView (line 32) | public ExProgressView(Context context) {
method ExProgressView (line 36) | public ExProgressView(Context context, AttributeSet attrs) {
method getmCurrentIndex (line 60) | public int getmCurrentIndex() {
method setmCurrentIndex (line 64) | public void setmCurrentIndex(int mCurrentIndex) {
method get (line 69) | @Override
method set (line 74) | @Override
method onDraw (line 80) | @Override
method onMeasure (line 96) | @Override
method getRectByIndex (line 108) | private float[] getRectByIndex(Rect rect, int index) {
FILE: support/src/main/java/net/avenwu/support/widget/ExTextView.java
class ExTextView (line 24) | @TargetApi(11)
method ExTextView (line 46) | public ExTextView(Context context) {
method ExTextView (line 50) | public ExTextView(Context context, AttributeSet attrs) {
method onMeasure (line 73) | @Override
method onLayout (line 101) | @Override
method reflectMaxLines (line 120) | private void reflectMaxLines() {
method reflectCurrentBufferType (line 132) | private BufferType reflectCurrentBufferType() {
method setText (line 145) | @Override
method onClick (line 161) | @Override
method onAnimationUpdate (line 194) | @Override
method isExpandable (line 200) | private boolean isExpandable() {
method setOnClickListener (line 205) | @Override
type Style (line 210) | public interface Style {
method collapsedText (line 212) | CharSequence collapsedText(TextView textView, Drawable drawable, Cha...
method onLayout (line 215) | void onLayout(boolean collapsed, TextView textView, Drawable drawable);
class EndStyle (line 218) | private static class EndStyle implements Style {
method collapsedText (line 222) | @Override
method onLayout (line 249) | @Override
class RightStyle (line 254) | private static class RightStyle implements Style {
method collapsedText (line 255) | @Override
method onLayout (line 262) | @Override
FILE: support/src/main/java/net/avenwu/support/widget/FlatTabGroup.java
class FlatTabGroup (line 25) | public class FlatTabGroup extends RadioGroup implements RadioGroup.OnChe...
method FlatTabGroup (line 26) | public FlatTabGroup(Context context) {
method FlatTabGroup (line 40) | public FlatTabGroup(Context context, AttributeSet attrs) {
method generateTabView (line 58) | private void generateTabView(Context context, AttributeSet attrs) {
method setOnTabCheckedListener (line 77) | public void setOnTabCheckedListener(OnTabCheckedListener listener) {
method setSelection (line 81) | public void setSelection(int position) {
method onCheckedChanged (line 85) | @Override
method setOnCheckedChangeListener (line 105) | @Deprecated()
method onFinishInflate (line 111) | @Override
method updateChildBackground (line 117) | private void updateChildBackground() {
method generateTabBackground (line 126) | private Drawable generateTabBackground(int position, int color) {
method generateDrawable (line 133) | private Drawable generateDrawable(int position, int color) {
method generateViewId (line 172) | public static int generateViewId() {
type OnTabCheckedListener (line 184) | public static interface OnTabCheckedListener {
method onChecked (line 185) | public void onChecked(FlatTabGroup group, int position);
FILE: support/src/main/java/net/avenwu/support/widget/FlipLayout.java
class FlipLayout (line 18) | public class FlipLayout extends FrameLayout {
method FlipLayout (line 23) | public FlipLayout(Context context) {
method FlipLayout (line 27) | public FlipLayout(Context context, AttributeSet attrs) {
method addView (line 31) | @Override
method setViewOrder (line 44) | public void setViewOrder(View front, View back) {
method flip (line 54) | public void flip() {
class FlipAnimation (line 93) | private static class FlipAnimation extends Animation {
method FlipAnimation (line 103) | public FlipAnimation(float mCenterX, float mCenterY, boolean scaleDo...
method initialize (line 116) | @Override
method applyTransformation (line 122) | @Override
class SimpleAnimationListener (line 143) | private static class SimpleAnimationListener implements Animation.Anim...
method onAnimationStart (line 144) | @Override
method onAnimationEnd (line 149) | @Override
method onAnimationRepeat (line 154) | @Override
FILE: support/src/main/java/net/avenwu/support/widget/MatrixFrameLayout.java
class MatrixFrameLayout (line 16) | public class MatrixFrameLayout extends FrameLayout {
method MatrixFrameLayout (line 21) | public MatrixFrameLayout(Context context) {
method MatrixFrameLayout (line 25) | public MatrixFrameLayout(Context context, AttributeSet attrs) {
method draw (line 30) | @Override
FILE: support/src/main/java/net/avenwu/support/widget/PolygonWithQuadraticBezirView.java
class PolygonWithQuadraticBezirView (line 16) | public class PolygonWithQuadraticBezirView extends View {
method PolygonWithQuadraticBezirView (line 29) | public PolygonWithQuadraticBezirView(Context context) {
method PolygonWithQuadraticBezirView (line 33) | public PolygonWithQuadraticBezirView(Context context, AttributeSet att...
method PolygonWithQuadraticBezirView (line 37) | public PolygonWithQuadraticBezirView(Context context, AttributeSet att...
method onDraw (line 59) | @Override
method setFilled (line 94) | public void setFilled(boolean fill) {
method moveHorizontal (line 105) | public void moveHorizontal(float percent) {
method moveVertical (line 110) | public void moveVertical(float percent) {
FILE: support/src/main/java/net/avenwu/support/widget/RefreshLayout.java
class RefreshLayout (line 24) | public class RefreshLayout extends LinearLayout {
method RefreshLayout (line 35) | public RefreshLayout(Context context) {
method RefreshLayout (line 39) | public RefreshLayout(Context context, AttributeSet attrs) {
method addHeaderChild (line 67) | public void addHeaderChild(View view) {
method setAdapter (line 74) | public void setAdapter(ListAdapter adapter) {
method isFirstItemVisible (line 81) | private boolean isFirstItemVisible() {
method isLastItemVisible (line 96) | private boolean isLastItemVisible() {
method getListView (line 104) | public ListView getListView() {
method onInterceptTouchEvent (line 108) | @Override
method onTouchEvent (line 139) | @Override
method computeScroll (line 188) | @Override
FILE: support/src/main/java/net/avenwu/support/widget/SegmentDrawable.java
class SegmentDrawable (line 19) | public class SegmentDrawable extends Drawable {
type Style (line 26) | public interface Style {
method SegmentDrawable (line 32) | public SegmentDrawable(int style) {
method SegmentDrawable (line 43) | public SegmentDrawable(SegmentDrawable drawable) {
method setStrokeWidth (line 50) | public void setStrokeWidth(int px) {
method setCornerRadius (line 54) | public void setCornerRadius(int radius) {
method setColor (line 58) | public void setColor(int color) {
method draw (line 63) | @Override
method setAlpha (line 68) | @Override
method setColorFilter (line 73) | @Override
method getOpacity (line 78) | @Override
method onBoundsChange (line 83) | @Override
method updateShape (line 89) | private void updateShape() {
method clone (line 129) | @Override
method newStateListDrawable (line 134) | public StateListDrawable newStateListDrawable() {
FILE: support/src/main/java/net/avenwu/support/widget/ShaderImageView.java
class ShaderImageView (line 21) | public class ShaderImageView extends ImageView {
method ShaderImageView (line 26) | public ShaderImageView(Context context) {
method ShaderImageView (line 30) | public ShaderImageView(Context context, AttributeSet attrs) {
method ShaderImageView (line 34) | public ShaderImageView(Context context, AttributeSet attrs, int defSty...
method onDraw (line 39) | @Override
method drawBitmap (line 64) | private Bitmap drawBitmap(Bitmap original) {
method getColorMatrix (line 77) | private ColorMatrix getColorMatrix() {
method onTouchEvent (line 83) | @Override
method onLayout (line 97) | @Override
FILE: support/src/main/java/net/avenwu/support/widget/SimpleTab.java
class SimpleTab (line 22) | public class SimpleTab {
method injectInto (line 26) | public void injectInto(ViewGroup parent) {
type OnTabClickListener (line 30) | public interface OnTabClickListener {
method onItemClick (line 31) | void onItemClick(View view, Item item, int position);
class Item (line 33) | public static class Item {
method setLabelWithIcon (line 41) | public Item setLabelWithIcon(@StringRes int label, @DrawableRes int
method setCustomItemLayout (line 48) | public Item setCustomItemLayout(int layout, Decorate decorate) {
type Decorate (line 55) | public interface Decorate {
method onBind (line 56) | void onBind(View contentView);
class SimpleListener (line 59) | private static abstract class SimpleListener implements View.OnClickLi...
method SimpleListener (line 62) | public SimpleListener(int position) {
class Builder (line 67) | public static class Builder {
method Builder (line 72) | public Builder(Context context) {
method bind (line 77) | protected SimpleTab bind(SimpleTabLayout layout) {
method create (line 84) | public SimpleTab create(@LayoutRes int... layout) {
method init (line 97) | private void init(final SimpleTab tab) {
method newItem (line 134) | public Builder newItem(Item item, int... position) {
method setOnTabClickListener (line 143) | public Builder setOnTabClickListener(OnTabClickListener listener) {
FILE: support/src/main/java/net/avenwu/support/widget/SimpleTabLayout.java
class SimpleTabLayout (line 14) | public class SimpleTabLayout extends LinearLayout {
method SimpleTabLayout (line 17) | public SimpleTabLayout(Context context) {
method SimpleTabLayout (line 21) | public SimpleTabLayout(Context context, AttributeSet attrs) {
FILE: support/src/main/java/net/avenwu/support/widget/TagFlowLayout.java
class TagFlowLayout (line 37) | public class TagFlowLayout extends ViewGroup
method TagFlowLayout (line 64) | public TagFlowLayout(Context context) {
method TagFlowLayout (line 68) | public TagFlowLayout(Context context, AttributeSet attrs) {
method onMeasure (line 84) | @Override
method nullChildView (line 120) | private boolean nullChildView(View child) {
method getImprovedSize (line 124) | private int getImprovedSize(int measureSpec, int size) {
method onLayout (line 137) | @Override
method setChildFrame (line 162) | private void setChildFrame(View child, int left, int top, int width, i...
method generateLayoutParams (line 166) | @Override
method generateLayoutParams (line 176) | @Override
method generateDefaultLayoutParams (line 186) | @Override
method setActionKeyCode (line 204) | public void setActionKeyCode(char[] keyChar, int... keyCode) {
method onKey (line 213) | @Override
method isKeyCodeHit (line 231) | private boolean isKeyCodeHit(int keyCode) {
method isKeyCharHit (line 242) | private boolean isKeyCharHit(char keyChar) {
method beforeTextChanged (line 253) | @Override
method onTextChanged (line 257) | @Override
method afterTextChanged (line 261) | @Override
method onClick (line 273) | @Override
method deleteTag (line 302) | private void deleteTag() {
method autoComplete (line 313) | public void autoComplete() {
method generateTag (line 322) | private void generateTag(CharSequence tag) {
method updateCheckStatus (line 356) | private void updateCheckStatus(View view, boolean checked) {
method previewInEditMode (line 373) | private void previewInEditMode() {
method setDecorator (line 384) | public void setDecorator(Decorator decorator) {
method setInnerAttribute (line 399) | private void setInnerAttribute()
method getTagArray (line 443) | public CharSequence[] getTagArray() {
method setTagArray (line 458) | public void setTagArray(CharSequence... tags) {
method clearTags (line 464) | public void clearTags() {
method setInputable (line 471) | public void setInputable(boolean enable) {
type Decorator (line 479) | interface Decorator {
method getTextSize (line 484) | public int getTextSize();
method getPadding (line 489) | public int[] getPadding();
method getMargin (line 494) | public int[] getMargin();
method getTextColor (line 499) | public int[] getTextColor();
method getBackgroundDrawable (line 504) | public Drawable[] getBackgroundDrawable();
method getHeight (line 510) | public int getHeight();
method getLayout (line 518) | public int getLayout();
method getMaxLength (line 523) | public int getMaxLength();
class SimpleDecorator (line 529) | public static class SimpleDecorator implements Decorator {
method SimpleDecorator (line 543) | public SimpleDecorator(Context context) {
method getPixelSize (line 554) | private int getPixelSize(Context context, int unit, int size) {
method getTextSize (line 559) | @Override
method getPadding (line 564) | @Override
method getMargin (line 569) | @Override
method getTextColor (line 574) | @Override
method getHeight (line 579) | public int getHeight() {
method getBackgroundDrawable (line 583) | public Drawable[] getBackgroundDrawable() {
method getLayout (line 590) | @Override
method getMaxLength (line 595) | @Override
method newRoundRectShape (line 600) | protected Drawable newRoundRectShape(int color, int radius) {
Condensed preview — 170 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (379K chars).
[
{
"path": ".gitignore",
"chars": 98,
"preview": ".gradle\n/local.properties\n/.idea/workspace.xml\n/.idea/libraries\n.DS_Store\n/build\n**/*.iml\n.idea\n\n\n"
},
{
"path": "LICENSE",
"chars": 11308,
"preview": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licens"
},
{
"path": "README.md",
"chars": 3407,
"preview": "Support\n========\n\nCustom Android support library, include some useful utils and widget.\n\n\tsupport内是自定义的一些东西,sammple中包含su"
},
{
"path": "build.gradle",
"chars": 436,
"preview": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n r"
},
{
"path": "gradle/wrapper/gradle-wrapper.properties",
"chars": 232,
"preview": "#Wed Apr 10 15:27:10 PDT 2013\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_"
},
{
"path": "gradle.properties",
"chars": 855,
"preview": "# Project-wide Gradle settings.\n\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will o"
},
{
"path": "gradlew",
"chars": 5080,
"preview": "#!/usr/bin/env bash\n\n##############################################################################\n##\n## Gradle start "
},
{
"path": "gradlew.bat",
"chars": 2314,
"preview": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem "
},
{
"path": "sample/.gitignore",
"chars": 7,
"preview": "/build\n"
},
{
"path": "sample/build.gradle",
"chars": 1082,
"preview": "apply plugin: 'com.android.application'\n\nandroid {\n compileSdkVersion 23\n buildToolsVersion \"23.0.1\"\n\n defaultC"
},
{
"path": "sample/proguard-rules.pro",
"chars": 645,
"preview": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in F:"
},
{
"path": "sample/src/androidTest/java/com/avenwu/deepinandroid/ApplicationTest.java",
"chars": 1405,
"preview": "package com.avenwu.deepinandroid;\n\nimport android.app.Application;\nimport android.test.ApplicationTestCase;\nimport andro"
},
{
"path": "sample/src/main/AndroidManifest.xml",
"chars": 2469,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n package="
},
{
"path": "sample/src/main/assets/github-markdown.css",
"chars": 13750,
"preview": "@font-face {\n font-family: octicons-anchor;\n src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAYcAA0AAAAACjQA"
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/AnimatedSubActivity.java",
"chars": 1362,
"preview": "/*\n * Copyright (C) 2013 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/BitmapShaderFragment.java",
"chars": 550,
"preview": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.v4.app.Fragment;\nimport android.view"
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/BreathLightViewDemo.java",
"chars": 542,
"preview": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.v4.app.Fragment;\nimport android.view"
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/BusEventDemo.java",
"chars": 1012,
"preview": "package com.avenwu.deepinandroid;\n\nimport com.avenwu.deepinandroid.eventbus.Bus;\n\nimport android.os.Bundle;\nimport andro"
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/CameraMatrixFragmentDemo.java",
"chars": 545,
"preview": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.annotation.Nullable;\nimport android."
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/ColorFilterDemo.java",
"chars": 2330,
"preview": "package com.avenwu.deepinandroid;\n\nimport android.graphics.Color;\nimport android.graphics.PorterDuff;\nimport android.os."
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/Content.java",
"chars": 95,
"preview": "package com.avenwu.deepinandroid;\n\npublic interface Content {\n public String getContent();\n}"
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/CurtainLayoutFragment.java",
"chars": 547,
"preview": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.annotation.Nullable;\nimport android."
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/CustomDrawableDemo.java",
"chars": 2553,
"preview": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.v7.app.AppCompatActivity;\nimport and"
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/CustomProgressActivity.java",
"chars": 398,
"preview": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.v7.app.AppCompatActivity;\n\n/**\n * Cr"
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/CustomTabActivity.java",
"chars": 3915,
"preview": "package com.avenwu.deepinandroid;\n\nimport android.content.Context;\nimport android.os.Bundle;\nimport android.support.v4.a"
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/CustomTextViewActivity.java",
"chars": 479,
"preview": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.v7.app.AppCompatActivity;\nimport and"
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/DrawerDemoFragment.java",
"chars": 2567,
"preview": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.annotation.Nullable;\nimport android."
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/ExifViewerFragment.java",
"chars": 6249,
"preview": "package com.avenwu.deepinandroid;\n\nimport android.graphics.Bitmap;\nimport android.graphics.BitmapFactory;\nimport android"
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/FeatureActivity.java",
"chars": 4836,
"preview": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.annotation.Nullable;\nimport android."
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/FlipFragmentDemo.java",
"chars": 1129,
"preview": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.annotation.Nullable;\nimport android."
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/GradientColorFragment.java",
"chars": 545,
"preview": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.annotation.Nullable;\nimport android."
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/LargeHeightImageDisplayFragment.java",
"chars": 5215,
"preview": "package com.avenwu.deepinandroid;\n\nimport android.content.Context;\nimport android.content.res.AssetManager;\nimport andro"
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/LinearGradientView.java",
"chars": 1124,
"preview": "package com.avenwu.deepinandroid;\n\nimport android.content.Context;\nimport android.graphics.Canvas;\nimport android.graphi"
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/MainActivity.java",
"chars": 2160,
"preview": "package com.avenwu.deepinandroid;\n\nimport android.content.Intent;\nimport android.graphics.drawable.RippleDrawable;\nimpor"
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/MarkdownDemo.java",
"chars": 15130,
"preview": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.v4.app.Fragment;\nimport android.supp"
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/QQDraggingCircleDemo.java",
"chars": 1954,
"preview": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.v7.app.ActionBarActivity;\nimport and"
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/RefreshDemoFragment.java",
"chars": 1429,
"preview": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.annotation.Nullable;\nimport android."
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/RefreshWidgetActivity.java",
"chars": 633,
"preview": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.v4.app.Fragment;\nimport android.supp"
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/ScaleSubActivity.java",
"chars": 2958,
"preview": "/*\n * Copyright (C) 2013 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/ShortcutDemo.java",
"chars": 3207,
"preview": "package com.avenwu.deepinandroid;\n\nimport android.app.Activity;\nimport android.content.Intent;\nimport android.graphics.B"
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/SlideMenuFragment.java",
"chars": 805,
"preview": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.annotation.Nullable;\nimport android."
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/SlidePanelDemo.java",
"chars": 1447,
"preview": "package com.avenwu.deepinandroid;\n\nimport android.graphics.Color;\nimport android.os.Bundle;\nimport android.support.v7.ap"
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/StackZFragment.java",
"chars": 1002,
"preview": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.annotation.Nullable;\nimport android."
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/StyledRadioButtonDemo.java",
"chars": 573,
"preview": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.v7.app.ActionBarActivity;\nimport and"
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/TagInputDemo.java",
"chars": 1304,
"preview": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.v7.app.ActionBarActivity;\nimport and"
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/TypefaceActivity.java",
"chars": 1157,
"preview": "package com.avenwu.deepinandroid;\n\nimport android.content.Context;\nimport android.graphics.Typeface;\nimport android.os.B"
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/WindowAnimationFragment.java",
"chars": 4673,
"preview": "package com.avenwu.deepinandroid;\n\nimport android.app.ActivityOptions;\nimport android.content.Intent;\nimport android.gra"
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/eventbus/Bus.java",
"chars": 2008,
"preview": "package com.avenwu.deepinandroid.eventbus;\n\nimport android.os.Looper;\n\nimport java.lang.reflect.Method;\nimport java.util"
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/eventbus/Finder.java",
"chars": 226,
"preview": "package com.avenwu.deepinandroid.eventbus;\n\nimport java.lang.reflect.Method;\nimport java.util.List;\n\n/**\n * Created by c"
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/eventbus/NameBasedFinder.java",
"chars": 705,
"preview": "package com.avenwu.deepinandroid.eventbus;\n\nimport android.util.Log;\n\nimport java.lang.reflect.Method;\nimport java.util."
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/eventbus/PostHandler.java",
"chars": 987,
"preview": "package com.avenwu.deepinandroid.eventbus;\n\n\nimport android.os.Handler;\nimport android.os.Looper;\nimport android.os.Mess"
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/eventbus/Subscriber.java",
"chars": 397,
"preview": "package com.avenwu.deepinandroid.eventbus;\n\nimport java.lang.reflect.Method;\n\n/**\n * Created by chaobin on 1/29/15.\n */\n"
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/util/SystemUiHider.java",
"chars": 5851,
"preview": "package com.avenwu.deepinandroid.util;\n\nimport android.app.Activity;\nimport android.os.Build;\nimport android.view.View;\n"
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/util/SystemUiHiderBase.java",
"chars": 2019,
"preview": "package com.avenwu.deepinandroid.util;\n\nimport android.app.Activity;\nimport android.view.View;\nimport android.view.Windo"
},
{
"path": "sample/src/main/java/com/avenwu/deepinandroid/util/SystemUiHiderHoneycomb.java",
"chars": 4988,
"preview": "package com.avenwu.deepinandroid.util;\n\nimport android.annotation.TargetApi;\nimport android.app.Activity;\nimport android"
},
{
"path": "sample/src/main/res/anim/scale_up_left.xml",
"chars": 827,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2013 The Android Open Source Project\n\n Licensed under the "
},
{
"path": "sample/src/main/res/anim/scale_up_rightt.xml",
"chars": 827,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2013 The Android Open Source Project\n\n Licensed under the "
},
{
"path": "sample/src/main/res/anim/slide_in_left.xml",
"chars": 830,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2013 The Android Open Source Project\n\n Licensed under the "
},
{
"path": "sample/src/main/res/anim/slide_in_right.xml",
"chars": 830,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2013 The Android Open Source Project\n\n Licensed under the "
},
{
"path": "sample/src/main/res/anim/slide_out_left.xml",
"chars": 830,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2013 The Android Open Source Project\n\n Licensed under the "
},
{
"path": "sample/src/main/res/anim/slide_out_right.xml",
"chars": 830,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2013 The Android Open Source Project\n\n Licensed under the "
},
{
"path": "sample/src/main/res/color/radio_button_color.xml",
"chars": 257,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item a"
},
{
"path": "sample/src/main/res/color/radio_button_color_blue.xml",
"chars": 236,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n<item andro"
},
{
"path": "sample/src/main/res/color/radio_button_color_green.xml",
"chars": 245,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item a"
},
{
"path": "sample/src/main/res/color/radio_button_color_light_blue.xml",
"chars": 250,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item a"
},
{
"path": "sample/src/main/res/color/radio_button_color_orange.xml",
"chars": 246,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item a"
},
{
"path": "sample/src/main/res/color/radio_button_color_purple.xml",
"chars": 246,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item a"
},
{
"path": "sample/src/main/res/drawable/animate_drawable.xml",
"chars": 446,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<animation-list xmlns:android=\"http://schemas.android.com/apk/res/android\"\n an"
},
{
"path": "sample/src/main/res/drawable/flat_round_shape_left.xml",
"chars": 764,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item a"
},
{
"path": "sample/src/main/res/drawable/flat_round_shape_middle.xml",
"chars": 596,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item a"
},
{
"path": "sample/src/main/res/drawable/flat_round_shape_right.xml",
"chars": 768,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item a"
},
{
"path": "sample/src/main/res/layout/activity_main.xml",
"chars": 6820,
"preview": "<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:tools=\"http://schemas.android.com/tool"
},
{
"path": "sample/src/main/res/layout/activity_markdown_demo.xml",
"chars": 307,
"preview": "<android.support.v4.view.ViewPager xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:tools=\"http://sc"
},
{
"path": "sample/src/main/res/layout/activity_my.xml",
"chars": 1265,
"preview": "<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:tools=\"http://schemas.a"
},
{
"path": "sample/src/main/res/layout/activity_progress_layout.xml",
"chars": 419,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n an"
},
{
"path": "sample/src/main/res/layout/activity_refresh_widget.xml",
"chars": 191,
"preview": "<FrameLayout\n xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:id=\"@+id/container\"\n android:"
},
{
"path": "sample/src/main/res/layout/activity_typeface.xml",
"chars": 1540,
"preview": "<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:tools=\"http://schemas.andro"
},
{
"path": "sample/src/main/res/layout/activity_window_anim_sub.xml",
"chars": 1034,
"preview": "<!-- Copyright (C) 2013 The Android Open Source Project\n\n Licensed under the Apache License, Version 2.0 (the \"Licen"
},
{
"path": "sample/src/main/res/layout/activity_window_scale_sub.xml",
"chars": 1152,
"preview": "<!-- Copyright (C) 2013 The Android Open Source Project\n\n Licensed under the Apache License, Version 2.0 (the \"Licen"
},
{
"path": "sample/src/main/res/layout/animation_layout.xml",
"chars": 1135,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n andr"
},
{
"path": "sample/src/main/res/layout/bitmap_shader_layout.xml",
"chars": 695,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n andr"
},
{
"path": "sample/src/main/res/layout/breath_light_layout.xml",
"chars": 477,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n andr"
},
{
"path": "sample/src/main/res/layout/camera_matrix_layout.xml",
"chars": 963,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n andr"
},
{
"path": "sample/src/main/res/layout/chat_layout.xml",
"chars": 775,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout\n xmlns:android=\"http://schemas.android.com/apk/res/android\"\n "
},
{
"path": "sample/src/main/res/layout/curtain_demo.xml",
"chars": 467,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n andr"
},
{
"path": "sample/src/main/res/layout/custom_drawable_layout.xml",
"chars": 2044,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xm"
},
{
"path": "sample/src/main/res/layout/custom_tab_activity.xml",
"chars": 1524,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout\n android:id=\"@+id/container\"\n xmlns:android=\"http://schemas.a"
},
{
"path": "sample/src/main/res/layout/eventbus_layout.xml",
"chars": 494,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n andr"
},
{
"path": "sample/src/main/res/layout/exif_layout.xml",
"chars": 1628,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<ScrollView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:"
},
{
"path": "sample/src/main/res/layout/feature_item_layout.xml",
"chars": 1837,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n "
},
{
"path": "sample/src/main/res/layout/feature_layout.xml",
"chars": 1160,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n "
},
{
"path": "sample/src/main/res/layout/filter_layout.xml",
"chars": 5234,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<ScrollView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n androi"
},
{
"path": "sample/src/main/res/layout/flip_layout.xml",
"chars": 1061,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n andro"
},
{
"path": "sample/src/main/res/layout/fragment_stack_z.xml",
"chars": 2340,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<android.support.percent.PercentFrameLayout xmlns:android=\"http://schemas.android"
},
{
"path": "sample/src/main/res/layout/fragment_tab_host.xml",
"chars": 591,
"preview": "<LinearLayout\n xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:layout_width=\"match_parent\"\n "
},
{
"path": "sample/src/main/res/layout/fragment_tab_item.xml",
"chars": 667,
"preview": "<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:layout_width=\"fill_parent"
},
{
"path": "sample/src/main/res/layout/gradient_layout.xml",
"chars": 697,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n andr"
},
{
"path": "sample/src/main/res/layout/markdown_edit.xml",
"chars": 855,
"preview": "<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:tools=\"http://schemas.android.com/t"
},
{
"path": "sample/src/main/res/layout/qq_dragging_circle_layout.xml",
"chars": 1580,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n "
},
{
"path": "sample/src/main/res/layout/ripple_layout.xml",
"chars": 1968,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xm"
},
{
"path": "sample/src/main/res/layout/shorcut_layout.xml",
"chars": 1630,
"preview": "<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:tools=\"http://schemas.android.com/t"
},
{
"path": "sample/src/main/res/layout/slide_layout.xml",
"chars": 2171,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<net.avenwu.support.widget.DrawerFrameV2 xmlns:android=\"http://schemas.android.co"
},
{
"path": "sample/src/main/res/layout/slidepanel_layout.xml",
"chars": 1344,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<net.avenwu.support.widget.CustomSlidePanelLayout xmlns:android=\"http://schemas.a"
},
{
"path": "sample/src/main/res/layout/styled_radio_button.xml",
"chars": 7478,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<ScrollView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:"
},
{
"path": "sample/src/main/res/layout/tag_item.xml",
"chars": 264,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<TextView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:"
},
{
"path": "sample/src/main/res/layout/test_tag_input_layout.xml",
"chars": 938,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n andr"
},
{
"path": "sample/src/main/res/layout/textview_layout.xml",
"chars": 1944,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout\n xmlns:android=\"http://schemas.android.com/apk/res/android\"\n "
},
{
"path": "sample/src/main/res/menu/markdown_menu.xml",
"chars": 389,
"preview": "<menu xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:app=\"http://schemas.android.com/apk/res-auto\""
},
{
"path": "sample/src/main/res/menu/menu_main.xml",
"chars": 361,
"preview": "<menu xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:app=\"http://schemas.android.com/apk/res-auto\""
},
{
"path": "sample/src/main/res/menu/menu_typeface.xml",
"chars": 420,
"preview": "<menu xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:app=\"http://schemas.android.com/apk/res-aut"
},
{
"path": "sample/src/main/res/values/arrays.xml",
"chars": 891,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <string-array name=\"porter_duff_array\">\n <item>CLEAR</item"
},
{
"path": "sample/src/main/res/values/attrs.xml",
"chars": 497,
"preview": "<resources>\n\n <!-- Declare custom theme attributes that allow changing which styles are\n used for button bars"
},
{
"path": "sample/src/main/res/values/colors.xml",
"chars": 602,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <color name=\"tab_blue\">#283593</color>\n <color name=\"tab_light"
},
{
"path": "sample/src/main/res/values/dimens.xml",
"chars": 211,
"preview": "<resources>\n <!-- Default screen margins, per the Android Design guidelines. -->\n <dimen name=\"activity_horizontal"
},
{
"path": "sample/src/main/res/values/strings.xml",
"chars": 2240,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n <string name=\"app_name\">深入理解Android</string>\n <string name=\"h"
},
{
"path": "sample/src/main/res/values/styles.xml",
"chars": 2182,
"preview": "<resources>\n\n <!-- Base application theme. -->\n <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.DarkActionBar"
},
{
"path": "sample/src/main/res/values-v11/styles.xml",
"chars": 647,
"preview": "<resources>\n\n <style name=\"FullscreenTheme\" parent=\"Theme.AppCompat.NoActionBar\">\n <item name=\"android:actionB"
},
{
"path": "sample/src/main/res/values-w820dp/dimens.xml",
"chars": 358,
"preview": "<resources>\n <!-- Example customization of dimensions originally defined in res/values/dimens.xml\n (such as s"
},
{
"path": "sample/src/main/res/values-zh/strings.xml",
"chars": 1081,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n <string name=\"app_name\">Android深入解析</string>\n <string name=\"h"
},
{
"path": "settings.gradle",
"chars": 30,
"preview": "include ':sample', ':support'\n"
},
{
"path": "support/.gitignore",
"chars": 7,
"preview": "/build\n"
},
{
"path": "support/build.gradle",
"chars": 507,
"preview": "apply plugin: 'com.android.library'\n//apply from: 'custom_mvn_push.gradle'\n\nandroid {\n compileSdkVersion 22\n build"
},
{
"path": "support/custom_mvn_push.gradle",
"chars": 4061,
"preview": "/*\n * Copyright 2013 Chris Banes, 2014 Chaobin Wu\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "support/proguard-rules.pro",
"chars": 654,
"preview": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in /U"
},
{
"path": "support/src/androidTest/java/net/avenwu/support/ApplicationTest.java",
"chars": 350,
"preview": "package net.avenwu.support;\n\nimport android.app.Application;\nimport android.test.ApplicationTestCase;\n\n/**\n * <a href=\"h"
},
{
"path": "support/src/main/AndroidManifest.xml",
"chars": 168,
"preview": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n package=\"net.avenwu.support\">\n\n <appli"
},
{
"path": "support/src/main/java/net/avenwu/support/presenter/Presenter.java",
"chars": 2698,
"preview": "package net.avenwu.support.presenter;\n\nimport net.avenwu.support.protocol.RenderAction;\nimport net.avenwu.support.protoc"
},
{
"path": "support/src/main/java/net/avenwu/support/presenter/PresenterActivity.java",
"chars": 919,
"preview": "package net.avenwu.support.presenter;\n\nimport android.os.Bundle;\nimport android.support.v7.app.AppCompatActivity;\n\n/**\n "
},
{
"path": "support/src/main/java/net/avenwu/support/presenter/PresenterFragment.java",
"chars": 841,
"preview": "package net.avenwu.support.presenter;\n\nimport android.os.Bundle;\nimport android.support.v4.app.Fragment;\n\npublic abstrac"
},
{
"path": "support/src/main/java/net/avenwu/support/protocol/RenderAction.java",
"chars": 144,
"preview": "package net.avenwu.support.protocol;\n\n/**\n * Created by chaobin on 7/14/15.\n */\npublic interface RenderAction<T> {\n v"
},
{
"path": "support/src/main/java/net/avenwu/support/protocol/UIAction.java",
"chars": 247,
"preview": "package net.avenwu.support.protocol;\n\n/**\n * Created by chaobin on 7/14/15.\n */\npublic abstract class UIAction<T> implem"
},
{
"path": "support/src/main/java/net/avenwu/support/util/BitmapUtil.java",
"chars": 1661,
"preview": "package net.avenwu.support.util;\n\nimport android.graphics.Bitmap;\nimport android.graphics.Canvas;\nimport android.graphic"
},
{
"path": "support/src/main/java/net/avenwu/support/util/ChartSet.java",
"chars": 1060,
"preview": "package net.avenwu.support.util;\n\nimport android.util.Log;\n\n/**\n * Created by chaobin on 11/22/15.\n */\npublic class Char"
},
{
"path": "support/src/main/java/net/avenwu/support/util/Device.java",
"chars": 417,
"preview": "package net.avenwu.support.util;\n\n/**\n * Created by chaobin on 3/15/15.\n */\npublic class Device {\n /**\n * simple "
},
{
"path": "support/src/main/java/net/avenwu/support/util/ReflectionUtils.java",
"chars": 1538,
"preview": "package net.avenwu.support.util;\n\nimport java.lang.reflect.Field;\nimport java.lang.reflect.InvocationTargetException;\nim"
},
{
"path": "support/src/main/java/net/avenwu/support/util/TypefaceContextWrapper.java",
"chars": 841,
"preview": "package net.avenwu.support.util;\n\nimport android.content.Context;\nimport android.content.ContextWrapper;\nimport android."
},
{
"path": "support/src/main/java/net/avenwu/support/util/TypefaceLayoutInflator.java",
"chars": 9007,
"preview": "package net.avenwu.support.util;\n\nimport android.annotation.TargetApi;\nimport android.content.Context;\nimport android.os"
},
{
"path": "support/src/main/java/net/avenwu/support/util/TypefaceUtils.java",
"chars": 1892,
"preview": "package net.avenwu.support.util;\n\nimport android.content.Context;\nimport android.content.res.AssetManager;\nimport androi"
},
{
"path": "support/src/main/java/net/avenwu/support/util/ViewCompat.java",
"chars": 5244,
"preview": "package net.avenwu.support.util;\n\nimport android.content.Context;\nimport android.graphics.Paint;\nimport android.graphics"
},
{
"path": "support/src/main/java/net/avenwu/support/widget/BreathingDelegate.java",
"chars": 5699,
"preview": "package net.avenwu.support.widget;\n\nimport android.animation.AnimatorSet;\nimport android.animation.ObjectAnimator;\nimpor"
},
{
"path": "support/src/main/java/net/avenwu/support/widget/BreathingLayout.java",
"chars": 1162,
"preview": "package net.avenwu.support.widget;\n\nimport android.content.Context;\nimport android.graphics.Canvas;\nimport android.util."
},
{
"path": "support/src/main/java/net/avenwu/support/widget/CurtainLayout.java",
"chars": 410,
"preview": "package net.avenwu.support.widget;\n\nimport android.content.Context;\nimport android.util.AttributeSet;\nimport android.wid"
},
{
"path": "support/src/main/java/net/avenwu/support/widget/CustomSlidePanelLayout.java",
"chars": 3933,
"preview": "package net.avenwu.support.widget;\n\n\nimport android.annotation.TargetApi;\nimport android.content.Context;\nimport android"
},
{
"path": "support/src/main/java/net/avenwu/support/widget/DimImageView.java",
"chars": 1052,
"preview": "package net.avenwu.support.widget;\n\nimport android.content.Context;\nimport android.content.res.TypedArray;\nimport androi"
},
{
"path": "support/src/main/java/net/avenwu/support/widget/DrawerFrame.java",
"chars": 5924,
"preview": "package net.avenwu.support.widget;\n\nimport net.avenwu.support.BuildConfig;\nimport net.avenwu.support.R;\n\nimport android."
},
{
"path": "support/src/main/java/net/avenwu/support/widget/DrawerFrameV2.java",
"chars": 10696,
"preview": "package net.avenwu.support.widget;\n\nimport android.content.Context;\nimport android.graphics.Canvas;\nimport android.graph"
},
{
"path": "support/src/main/java/net/avenwu/support/widget/ExProgressView.java",
"chars": 3861,
"preview": "package net.avenwu.support.widget;\n\nimport android.animation.ObjectAnimator;\nimport android.animation.ValueAnimator;\nimp"
},
{
"path": "support/src/main/java/net/avenwu/support/widget/ExTextView.java",
"chars": 9159,
"preview": "package net.avenwu.support.widget;\n\nimport android.animation.ValueAnimator;\nimport android.annotation.TargetApi;\nimport "
},
{
"path": "support/src/main/java/net/avenwu/support/widget/FlatTabGroup.java",
"chars": 6711,
"preview": "package net.avenwu.support.widget;\n\nimport android.content.Context;\nimport android.content.res.ColorStateList;\nimport an"
},
{
"path": "support/src/main/java/net/avenwu/support/widget/FlipLayout.java",
"chars": 5516,
"preview": "package net.avenwu.support.widget;\n\nimport android.content.Context;\nimport android.graphics.Camera;\nimport android.graph"
},
{
"path": "support/src/main/java/net/avenwu/support/widget/MatrixFrameLayout.java",
"chars": 1584,
"preview": "package net.avenwu.support.widget;\n\nimport android.content.Context;\nimport android.graphics.Camera;\nimport android.graph"
},
{
"path": "support/src/main/java/net/avenwu/support/widget/PolygonWithQuadraticBezirView.java",
"chars": 4054,
"preview": "package net.avenwu.support.widget;\n\nimport android.content.Context;\nimport android.graphics.Canvas;\nimport android.graph"
},
{
"path": "support/src/main/java/net/avenwu/support/widget/RefreshLayout.java",
"chars": 6160,
"preview": "package net.avenwu.support.widget;\n\nimport android.content.Context;\nimport android.util.AttributeSet;\nimport android.uti"
},
{
"path": "support/src/main/java/net/avenwu/support/widget/SegmentDrawable.java",
"chars": 4956,
"preview": "package net.avenwu.support.widget;\n\nimport android.graphics.Canvas;\nimport android.graphics.Color;\nimport android.graphi"
},
{
"path": "support/src/main/java/net/avenwu/support/widget/ShaderImageView.java",
"chars": 3320,
"preview": "package net.avenwu.support.widget;\n\nimport android.content.Context;\nimport android.graphics.Bitmap;\nimport android.graph"
},
{
"path": "support/src/main/java/net/avenwu/support/widget/SimpleTab.java",
"chars": 4910,
"preview": "package net.avenwu.support.widget;\n\nimport android.content.Context;\nimport android.graphics.drawable.Drawable;\nimport an"
},
{
"path": "support/src/main/java/net/avenwu/support/widget/SimpleTabLayout.java",
"chars": 1530,
"preview": "package net.avenwu.support.widget;\n\nimport android.content.Context;\nimport android.util.AttributeSet;\nimport android.vie"
},
{
"path": "support/src/main/java/net/avenwu/support/widget/TagFlowLayout.java",
"chars": 21011,
"preview": "package net.avenwu.support.widget;\n\nimport android.content.Context;\nimport android.content.res.TypedArray;\nimport androi"
},
{
"path": "support/src/main/res/drawable/toast_shape.xml",
"chars": 222,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:"
},
{
"path": "support/src/main/res/layout/custom_toast.xml",
"chars": 621,
"preview": "<LinearLayout\n xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:layout_width=\"match_parent\"\n "
},
{
"path": "support/src/main/res/values/attr_breath_light.xml",
"chars": 471,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <!-- 避免命名冲突,强行加一个前缀-->\n <declare-styleable name=\"BreathingLayo"
},
{
"path": "support/src/main/res/values/attr_dim_imagview.xml",
"chars": 185,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <declare-styleable name=\"DimImageView\">\n <attr name=\"dim\" "
},
{
"path": "support/src/main/res/values/attr_ex_textview.xml",
"chars": 412,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <declare-styleable name=\"ExTextView\">\n <attr name=\"expand_"
},
{
"path": "support/src/main/res/values/attr_flat_tab_group.xml",
"chars": 508,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <declare-styleable name=\"FlatTabGroup\">\n <attr name=\"tab_i"
},
{
"path": "support/src/main/res/values/attrs_drawer_frame.xml",
"chars": 324,
"preview": "<resources>\n <declare-styleable name=\"DrawerFrame\">\n <attr name=\"exampleString\" format=\"string\" />\n <at"
},
{
"path": "support/src/main/res/values/ids.xml",
"chars": 131,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <item name=\"menu\" type=\"id\"/>\n <item name=\"main\" type=\"id\"/>\n<"
},
{
"path": "support/src/main/res/values/strings.xml",
"chars": 70,
"preview": "<resources>\n <string name=\"app_name\">Support</string>\n</resources>\n"
}
]
// ... and 3 more files (download for full content)
About this extraction
This page contains the full source code of the avenwu/support GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 170 files (339.0 KB), approximately 85.2k tokens, and a symbol index with 523 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.