|
|
@ -11,6 +11,8 @@ import com.qhclh.ytzh.R; |
|
|
import com.qhclh.ytzh.ui.CalendarDialogFragment; |
|
|
import com.qhclh.ytzh.ui.CalendarDialogFragment; |
|
|
import com.qhclh.ytzh.utils.DateTimeUtil; |
|
|
import com.qhclh.ytzh.utils.DateTimeUtil; |
|
|
|
|
|
|
|
|
|
|
|
import org.greenrobot.eventbus.EventBus; |
|
|
|
|
|
|
|
|
import java.util.Date; |
|
|
import java.util.Date; |
|
|
|
|
|
|
|
|
import butterknife.BindView; |
|
|
import butterknife.BindView; |
|
|
@ -120,13 +122,13 @@ public class CarsManageActivity extends BaseActivity1 implements CalendarDialogF |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void clearAllTabState() { |
|
|
private void clearAllTabState() { |
|
|
///< 首页 |
|
|
|
|
|
|
|
|
///< 鸡苗 |
|
|
chicks.setTextColor(this.getResources().getColor(R.color.grey666666)); |
|
|
chicks.setTextColor(this.getResources().getColor(R.color.grey666666)); |
|
|
chicks.setBackgroundColor(this.getResources().getColor(R.color.white)); |
|
|
chicks.setBackgroundColor(this.getResources().getColor(R.color.white)); |
|
|
///< 工作 |
|
|
|
|
|
|
|
|
///< 毛鸡 |
|
|
GrossChicken.setTextColor(this.getResources().getColor(R.color.grey666666)); |
|
|
GrossChicken.setTextColor(this.getResources().getColor(R.color.grey666666)); |
|
|
GrossChicken.setBackgroundColor(this.getResources().getColor(R.color.white)); |
|
|
GrossChicken.setBackgroundColor(this.getResources().getColor(R.color.white)); |
|
|
///< 我的 |
|
|
|
|
|
|
|
|
///< 饲料 |
|
|
feed.setTextColor(this.getResources().getColor(R.color.grey666666)); |
|
|
feed.setTextColor(this.getResources().getColor(R.color.grey666666)); |
|
|
feed.setBackgroundColor(this.getResources().getColor(R.color.white)); |
|
|
feed.setBackgroundColor(this.getResources().getColor(R.color.white)); |
|
|
|
|
|
|
|
|
@ -186,23 +188,30 @@ public class CarsManageActivity extends BaseActivity1 implements CalendarDialogF |
|
|
@Override |
|
|
@Override |
|
|
public boolean onCreateOptionsMenu(Menu menu) { |
|
|
public boolean onCreateOptionsMenu(Menu menu) { |
|
|
getMenuInflater().inflate(R.menu.screen, menu); |
|
|
getMenuInflater().inflate(R.menu.screen, menu); |
|
|
menu.findItem(R.id.screenr).setVisible(true); |
|
|
|
|
|
|
|
|
menu.findItem(R.id.sc_time).setVisible(true); |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public boolean onOptionsItemSelected(MenuItem item) { |
|
|
public boolean onOptionsItemSelected(MenuItem item) { |
|
|
switch (item.getItemId()) { |
|
|
switch (item.getItemId()) { |
|
|
case R.id.screenr: |
|
|
|
|
|
|
|
|
case R.id.sc_time: |
|
|
new CalendarDialogFragment().show(getSupportFragmentManager(), "start"); |
|
|
new CalendarDialogFragment().show(getSupportFragmentManager(), "start"); |
|
|
break; |
|
|
break; |
|
|
|
|
|
case R.id.sc_driver: |
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
|
case R.id.sc_factry: |
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
} |
|
|
} |
|
|
return super.onOptionsItemSelected(item); |
|
|
return super.onOptionsItemSelected(item); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public void onStartCalendarClick(Date date) { |
|
|
public void onStartCalendarClick(Date date) { |
|
|
showToast(DateTimeUtil.FormatDate(date)); |
|
|
|
|
|
|
|
|
// showToast(DateTimeUtil.FormatDate(date)); |
|
|
|
|
|
EventBus.getDefault().post(new TimeEvent(date.getTime())); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
|