|
|
|
@ -1,11 +1,18 @@ |
|
|
|
package com.qhclh.ytzh.work.weighingsingle; |
|
|
|
|
|
|
|
import android.support.v7.widget.Toolbar; |
|
|
|
import android.view.Menu; |
|
|
|
import android.view.MenuItem; |
|
|
|
import android.view.View; |
|
|
|
import android.widget.ListView; |
|
|
|
import android.widget.TextView; |
|
|
|
|
|
|
|
import com.qhclh.ytzh.R; |
|
|
|
import com.qhclh.ytzh.base.BaseActivity; |
|
|
|
import com.qhclh.ytzh.ui.CalendarDialogFragment; |
|
|
|
import com.qhclh.ytzh.ui.RefreshLayout; |
|
|
|
|
|
|
|
import java.util.Date; |
|
|
|
|
|
|
|
import butterknife.BindView; |
|
|
|
|
|
|
|
@ -13,11 +20,16 @@ import butterknife.BindView; |
|
|
|
* Created by 青花瓷 on 2018/3/12. |
|
|
|
*/ |
|
|
|
|
|
|
|
public class WeightListActivity extends BaseActivity { |
|
|
|
public class WeightListActivity extends BaseActivity implements RefreshLayout.OnLoadListener,CalendarDialogFragment.CalendarClickListener { |
|
|
|
@BindView(R.id.toolbar) |
|
|
|
Toolbar mToolbar; |
|
|
|
@BindView(R.id.tv_toolbar_title) |
|
|
|
TextView tv_toolbar_title; |
|
|
|
@BindView(R.id.lv_infos_weight) |
|
|
|
ListView lv_infos_weight; |
|
|
|
@BindView(R.id.rfl_weightlist) |
|
|
|
RefreshLayout rfl_weightlist; |
|
|
|
private int page =0; |
|
|
|
@Override |
|
|
|
protected int setLayoutId() { |
|
|
|
return R.layout.act_weightlist; |
|
|
|
@ -31,6 +43,7 @@ public class WeightListActivity extends BaseActivity { |
|
|
|
finish(); |
|
|
|
} |
|
|
|
}); |
|
|
|
rfl_weightlist.setEnabled(false); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@ -40,6 +53,49 @@ public class WeightListActivity extends BaseActivity { |
|
|
|
|
|
|
|
@Override |
|
|
|
protected void initOper() { |
|
|
|
rfl_weightlist.setOnLoadListener(this); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
protected void onResume() { |
|
|
|
super.onResume(); |
|
|
|
page = 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public boolean onCreateOptionsMenu(Menu menu) { |
|
|
|
getMenuInflater().inflate(R.menu.chosetime, menu); |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public boolean onOptionsItemSelected(MenuItem item) { |
|
|
|
switch (item.getItemId()) { |
|
|
|
case R.id.chose_time: |
|
|
|
new CalendarDialogFragment().show(getSupportFragmentManager(), "start"); |
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
return super.onOptionsItemSelected(item); |
|
|
|
} |
|
|
|
@Override |
|
|
|
public void onLoad() { |
|
|
|
rfl_weightlist.postDelayed(new Runnable() { |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
rfl_weightlist.setLoading(false); |
|
|
|
} |
|
|
|
},1000); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void onStartCalendarClick(Date date) { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void onEndCalendarClick(Date date) { |
|
|
|
|
|
|
|
} |
|
|
|
} |