You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.1 KiB
42 lines
1.1 KiB
package com.community.pocket.ui.main.ui.garbage;
|
|
|
|
import android.os.Build;
|
|
import android.view.View;
|
|
|
|
import androidx.annotation.RequiresApi;
|
|
|
|
import com.community.pocket.R;
|
|
import com.community.pocket.ui.main.MainFragment;
|
|
|
|
import org.xutils.view.annotation.ContentView;
|
|
import org.xutils.view.annotation.Event;
|
|
|
|
|
|
@ContentView(R.layout.garbage)
|
|
public class GarbageFragment extends MainFragment {
|
|
@Override
|
|
protected int fragmentId() {
|
|
return R.id.grabage_fragment;
|
|
}
|
|
|
|
//跳转到垃圾分类界面
|
|
@RequiresApi(api = Build.VERSION_CODES.KITKAT)
|
|
@Event(value = R.id.garbage_sorting)
|
|
private void sorting(View view) {
|
|
ctrl().navigate(R.id.garbageSortingFragment);
|
|
changeColor(view);
|
|
}
|
|
|
|
//跳转到废品回收界面
|
|
@RequiresApi(api = Build.VERSION_CODES.KITKAT)
|
|
@Event(value = R.id.garbage_waste)
|
|
private void waste(View view) {
|
|
ctrl().navigate(R.id.garbageWasteFragment);
|
|
changeColor(view);
|
|
}
|
|
|
|
@Override
|
|
protected int[] button_ids() {
|
|
return new int[]{R.id.garbage_sorting, R.id.garbage_waste};
|
|
}
|
|
}
|
|
|