|
|
@@ -106,21 +106,12 @@ public class KPIFragment extends Fragment implements KPICell.KPIListener {
|
|
|
super.onDestroyView();
|
|
|
}
|
|
|
|
|
|
- private int mWidth,mHeight;
|
|
|
@Override
|
|
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
|
|
Bundle savedInstanceState) {
|
|
|
// Inflate the layout for this fragment
|
|
|
View root = inflater.inflate(R.layout.fragment_kpi, container, false);
|
|
|
|
|
|
- if (savedInstanceState != null) {
|
|
|
- mWidth = savedInstanceState.getInt("width");
|
|
|
- mHeight = savedInstanceState.getInt("height");
|
|
|
- } else {
|
|
|
- mWidth = container.getMeasuredWidth();
|
|
|
- mHeight = container.getMeasuredHeight();
|
|
|
- }
|
|
|
-
|
|
|
mContext = getContext();
|
|
|
self = this;
|
|
|
|
|
|
@@ -237,8 +228,6 @@ public class KPIFragment extends Fragment implements KPICell.KPIListener {
|
|
|
if (mData != null) {
|
|
|
outState.putString("KPIData",mData.toString());
|
|
|
outState.putInt("currentKPI",currentKPI);
|
|
|
- outState.putInt("width",mWidth);
|
|
|
- outState.putInt("height",mHeight);
|
|
|
}
|
|
|
mKPIArr.clear();
|
|
|
mAdapter.notifyDataSetChanged();
|
|
|
@@ -476,7 +465,7 @@ public class KPIFragment extends Fragment implements KPICell.KPIListener {
|
|
|
KPICell cell = null;
|
|
|
if (mReusePool.isEmpty()) {
|
|
|
cell = (KPICell) LayoutInflater.from(mContext).inflate(R.layout.kpi_cell,null);
|
|
|
- cell.init(mWidth,mHeight);
|
|
|
+ cell.init();
|
|
|
} else {
|
|
|
cell = mReusePool.get(0);
|
|
|
mReusePool.remove(cell);
|