forked from racofix/architecture-for-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
zjlong
committed
Jun 1, 2016
1 parent
99af799
commit c4edf23
Showing
22 changed files
with
175 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ava/com/android/core/util/ScreenUtil.java → .../com/android/core/control/ScreenUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../com/android/core/util/StatusBarUtil.java → ...m/android/core/control/StatusBarUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
core/src/main/java/com/android/core/control/XRecyclerViewControl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package com.android.core.control; | ||
|
||
import android.content.Context; | ||
import android.support.v7.widget.LinearLayoutManager; | ||
|
||
import com.android.core.R; | ||
import com.jcodecraeer.xrecyclerview.ProgressStyle; | ||
import com.jcodecraeer.xrecyclerview.XRecyclerView; | ||
|
||
/** | ||
* @author: 蜡笔小新 | ||
* @date: 2016-06-01 17:42 | ||
* @GitHub: https://github.com/meikoz | ||
*/ | ||
public class XRecyclerViewControl { | ||
static XRecyclerViewControl ourInstance; | ||
|
||
public XRecyclerViewControl() { | ||
|
||
} | ||
|
||
public static XRecyclerViewControl init() { | ||
if (ourInstance == null) | ||
ourInstance = new XRecyclerViewControl(); | ||
return ourInstance; | ||
} | ||
|
||
|
||
public void setLinearLayout(Context context, XRecyclerView mRecy) { | ||
LinearLayoutManager layoutManager = new LinearLayoutManager(context); | ||
layoutManager.setOrientation(LinearLayoutManager.VERTICAL); | ||
|
||
mRecy.setLayoutManager(layoutManager); | ||
//设置分隔线 | ||
// mRecy.addItemDecoration(new SpacesItemDecoration(1)); | ||
mRecy.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader); | ||
mRecy.setLoadingMoreProgressStyle(ProgressStyle.BallRotate); | ||
mRecy.setArrowImageView(R.drawable.abc_icon_down_arrow); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
core/src/main/java/com/android/core/widget/LoadingView.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
package com.android.core.widget; | ||
|
||
import android.app.Dialog; | ||
import android.content.Context; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
import android.widget.ProgressBar; | ||
|
||
import com.android.core.R; | ||
import com.github.ybq.android.spinkit.style.DoubleBounce; | ||
/** | ||
* @author: 蜡笔小新 | ||
* @date: 2016-06-01 17:58 | ||
* @GitHub: https://github.com/meikoz | ||
*/ | ||
public class LoadingView extends Dialog implements View.OnClickListener { | ||
|
||
int[] colors = new int[]{ | ||
android.graphics.Color.parseColor("#D55400"), | ||
android.graphics.Color.parseColor("#2B3E51"), | ||
android.graphics.Color.parseColor("#00BD9C"), | ||
android.graphics.Color.parseColor("#227FBB"), | ||
android.graphics.Color.parseColor("#7F8C8D"), | ||
android.graphics.Color.parseColor("#FFCC5C"), | ||
android.graphics.Color.parseColor("#D55400"), | ||
android.graphics.Color.parseColor("#1AAF5D"), | ||
}; | ||
|
||
public LoadingView(Context context) { | ||
super(context, R.style.loading_dialog_style); | ||
onInit(); | ||
} | ||
|
||
private void onInit() { | ||
View view = getLayoutInflater().inflate(R.layout.abc_view_loading, null); | ||
|
||
ProgressBar mProgressBar = (ProgressBar) view.findViewById(R.id.progress); | ||
DoubleBounce doubleBounce = new DoubleBounce(); | ||
doubleBounce.setBounds(0, 0, | ||
100, | ||
100); | ||
doubleBounce.setColor(colors[7]); | ||
mProgressBar.setIndeterminateDrawable(doubleBounce); | ||
|
||
view.setOnClickListener(this); | ||
setContentView(view); | ||
getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); | ||
} | ||
|
||
@Override | ||
public void onClick(View v) { | ||
this.dismiss(); | ||
} | ||
|
||
@Override | ||
public void show() { | ||
super.show(); | ||
} | ||
|
||
|
||
@Override | ||
public void dismiss() { | ||
super.dismiss(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?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:background="@color/abc_white"> | ||
|
||
<ProgressBar | ||
android:id="@+id/progress" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_centerInParent="true" | ||
android:indeterminate="true" /> | ||
|
||
</RelativeLayout> |
Oops, something went wrong.