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.
76 lines
2.0 KiB
76 lines
2.0 KiB
package com.community.pocket.ui.main.ui.visitor;
|
|
|
|
import android.os.Build;
|
|
import android.os.Bundle;
|
|
import android.view.View;
|
|
import android.widget.Button;
|
|
|
|
import androidx.annotation.NonNull;
|
|
import androidx.annotation.Nullable;
|
|
import androidx.annotation.RequiresApi;
|
|
import androidx.core.widget.NestedScrollView;
|
|
|
|
import com.community.pocket.R;
|
|
import com.community.pocket.ui.main.MainFragment;
|
|
|
|
import org.xutils.view.annotation.ContentView;
|
|
import org.xutils.view.annotation.Event;
|
|
import org.xutils.view.annotation.ViewInject;
|
|
|
|
/**
|
|
* 访客框架
|
|
*/
|
|
@ContentView(R.layout.visitor)
|
|
public class VisitorFragment extends MainFragment {
|
|
|
|
//访客预约按钮
|
|
@ViewInject(R.id.visitor_reservation)
|
|
private Button myBtn;
|
|
|
|
@ViewInject(R.id.scroll_body)
|
|
private NestedScrollView scrollView;
|
|
|
|
NestedScrollView getScrollView() {
|
|
return scrollView;
|
|
}
|
|
|
|
@Override
|
|
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
|
super.onViewCreated(view, savedInstanceState);
|
|
|
|
myBtn.setOnClickListener(this::reservation);
|
|
}
|
|
|
|
//跳转到访客预约界面
|
|
@RequiresApi(api = Build.VERSION_CODES.KITKAT)
|
|
@Event(value = R.id.visitor_appointment)
|
|
private void appointment(View view) {
|
|
ctrl().navigate(R.id.visitorAppointmentFragment);
|
|
changeColor(view);
|
|
}
|
|
|
|
//跳转到我的预约界面
|
|
@RequiresApi(api = Build.VERSION_CODES.KITKAT)
|
|
public void reservation(View view) {
|
|
ctrl().navigate(R.id.visitorReservationFragment);
|
|
changeColor(view);
|
|
}
|
|
|
|
//跳转到我的访客界面
|
|
@Event(value = R.id.visitor_visitor)
|
|
@RequiresApi(api = Build.VERSION_CODES.KITKAT)
|
|
private void my(View view) {
|
|
ctrl().navigate(R.id.visitorMyFragment);
|
|
changeColor(view);
|
|
}
|
|
|
|
@Override
|
|
protected int fragmentId() {
|
|
return R.id.fragment;
|
|
}
|
|
|
|
@Override
|
|
protected int[] button_ids() {
|
|
return new int[]{R.id.visitor_appointment, R.id.visitor_reservation, R.id.visitor_visitor};
|
|
}
|
|
}
|
|
|