|
|
@@ -26,6 +26,7 @@ public class HomeHeaderView extends RelativeLayout {
|
|
|
|
|
|
public static HomeHeaderView headerView(Context ctx) {
|
|
|
HomeHeaderView headerView = (HomeHeaderView) LayoutInflater.from(ctx).inflate(R.layout.home_header_view,null);
|
|
|
+ headerView.init();
|
|
|
return headerView;
|
|
|
}
|
|
|
|
|
|
@@ -44,14 +45,6 @@ public class HomeHeaderView extends RelativeLayout {
|
|
|
}
|
|
|
|
|
|
private boolean initialized = false;
|
|
|
- @Override
|
|
|
- protected void onAttachedToWindow() {
|
|
|
- super.onAttachedToWindow();
|
|
|
-
|
|
|
- if (!initialized) {
|
|
|
- init();
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
private View newContainer, processingContainer, finishedContainer;
|
|
|
private TextView newCountTv,processingCountTv,finishCountTv,availableTv;
|
|
|
@@ -62,7 +55,7 @@ public class HomeHeaderView extends RelativeLayout {
|
|
|
private HomeHeaderDelegate delegate;
|
|
|
private int newCount,processingCount,finishCount;
|
|
|
|
|
|
- public void init() {
|
|
|
+ private void init() {
|
|
|
|
|
|
if (initialized) {
|
|
|
return;
|