Search in sources :

Example 1 with UpdateLog

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

the class HomeFragment method onViewCreated.

@SuppressLint({ "SetTextI18n", "InflateParams" })
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
    // Xposed
    MaterialTextView xposed_info = requireActivity().findViewById(R.id.xposed_info);
    xposed_info.setText("版本: " + BuildConfig.VERSION_NAME + "\n版本号: " + BuildConfig.VERSION_CODE);
    // Button
    MaterialButton xposed = requireActivity().findViewById(R.id.xposed_btn);
    xposed.setOnClickListener(v -> startActivity(new Intent(requireActivity(), XposedActivity.class)));
    MaterialButton magisk = requireActivity().findViewById(R.id.magisk_btn);
    magisk.setOnClickListener(v -> startActivity(new Intent(requireActivity(), MagiskActivity.class)));
    MaterialButton fps = requireActivity().findViewById(R.id.fps);
    fps.setOnClickListener(v -> MainActivity.setfps(requireActivity()));
    MaterialCardView updatelog_card = requireActivity().findViewById(R.id.updatelog_card);
    updatelog_card.setOnClickListener(v -> new UpdateLog(requireActivity()).ShowUpdateLog());
    TextView systeminfo = requireActivity().findViewById(R.id.systeminfo);
    systeminfo.setText(getSystemInfo());
}
Also used : MaterialTextView(com.google.android.material.textview.MaterialTextView) MaterialCardView(com.google.android.material.card.MaterialCardView) UpdateLog(com.luckyzyx.tools.utils.UpdateLog) Intent(android.content.Intent) MaterialTextView(com.google.android.material.textview.MaterialTextView) TextView(android.widget.TextView) MaterialButton(com.google.android.material.button.MaterialButton) SuppressLint(android.annotation.SuppressLint)

Aggregations

SuppressLint (android.annotation.SuppressLint)1 Intent (android.content.Intent)1 TextView (android.widget.TextView)1 MaterialButton (com.google.android.material.button.MaterialButton)1 MaterialCardView (com.google.android.material.card.MaterialCardView)1 MaterialTextView (com.google.android.material.textview.MaterialTextView)1 UpdateLog (com.luckyzyx.tools.utils.UpdateLog)1