| | |
| | | import android.view.LayoutInflater; |
| | | import android.view.View; |
| | | import android.view.ViewGroup; |
| | | import android.widget.TextView; |
| | | |
| | | |
| | | import androidx.annotation.NonNull; |
| | |
| | | |
| | | import me.yokeyword.fragmentation.ISupportFragment; |
| | | import me.yokeyword.fragmentation.SupportFragment; |
| | | import safeluck.drive.evaluation.BuildConfig; |
| | | import safeluck.drive.evaluation.R; |
| | | import safeluck.drive.evaluation.util.DimenUtil; |
| | | |
| | |
| | | * All Rights Saved! Chongqing AnYun Tech co. LTD |
| | | */ |
| | | public class HomeFragment extends SupportFragment implements View.OnClickListener { |
| | | |
| | | private TextView tv_app_version; |
| | | public static ISupportFragment newInstance() { |
| | | return new HomeFragment(); |
| | | } |
| | |
| | | view.findViewById(R.id.car_train).setOnClickListener(this); |
| | | view.findViewById(R.id.system_setting).setOnClickListener(this); |
| | | view.findViewById(R.id.exit_sys).setOnClickListener(this); |
| | | tv_app_version = view.findViewById(R.id.tv_app_version); |
| | | |
| | | tv_app_version.setText(getResources().getString(R.string.version_name,BuildConfig.VERSION_NAME)); |
| | | } |
| | | |
| | | |
| | |
| | | break; |
| | | case R.id.system_setting: |
| | | //打开输入密码界面 |
| | | PasswordFragment passwordFragment = findFragment(PasswordFragment.class); |
| | | if (passwordFragment == null) { |
| | | passwordFragment = (PasswordFragment) PasswordFragment.newInstance(); |
| | | start(passwordFragment); |
| | | } else { |
| | | start(passwordFragment); |
| | | // PasswordFragment passwordFragment = findFragment(PasswordFragment.class); |
| | | // if (passwordFragment == null) { |
| | | // passwordFragment = (PasswordFragment) PasswordFragment.newInstance(); |
| | | // start(passwordFragment); |
| | | // } else { |
| | | // start(passwordFragment); |
| | | // } |
| | | BaseSettingFragment sysSetingFragment = findFragment(BaseSettingFragment.class); |
| | | if (sysSetingFragment == null) { |
| | | sysSetingFragment = (BaseSettingFragment) BaseSettingFragment.newInstance(); |
| | | } |
| | | start(sysSetingFragment); |
| | | |
| | | break; |
| | | } |