Search in sources :

Example 1 with HttpUtils

use of com.luckyzyx.tools.utils.HttpUtils in project luckyzyxtools by luckyzyx.

the class UserFragment method onViewCreated.

@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    MaterialCardView user = requireActivity().findViewById(R.id.user);
    user.setOnClickListener(v -> Snackbar.make(v, "不认识字? 还点?", Snackbar.LENGTH_SHORT).show());
    MaterialCardView checkupdate_card = requireActivity().findViewById(R.id.checkupdate_card);
    checkupdate_card.setOnClickListener(v -> new HttpUtils(requireActivity()).CheckUpdate(true));
    MaterialCardView settings = requireActivity().findViewById(R.id.settings_card);
    settings.setOnClickListener(v -> startActivity(new Intent(getActivity(), SettingsActivity.class)));
    MaterialCardView about = requireActivity().findViewById(R.id.about_card);
    about.setOnClickListener(v -> startActivity(new Intent(getActivity(), AboutActivity.class)));
}
Also used : MaterialCardView(com.google.android.material.card.MaterialCardView) HttpUtils(com.luckyzyx.tools.utils.HttpUtils) Intent(android.content.Intent)

Aggregations

Intent (android.content.Intent)1 MaterialCardView (com.google.android.material.card.MaterialCardView)1 HttpUtils (com.luckyzyx.tools.utils.HttpUtils)1