Created
November 6, 2021 18:01
-
-
Save fmedlin/2dcf19ce657900a6cf30ef6d45afa436 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Nullable | |
@Override | |
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { | |
View view = inflater.inflate(R.layout.fragment_about, container, false); | |
return setupViews(view); | |
} | |
private View setupViews(View view) { | |
setVersionAndCopyrightText(view); | |
handleViewClicks(view); | |
handleTextViewClicks(view); | |
((SpinningImageButton) view.findViewById(R.id.about_logo)).setSpeedListener(this); | |
return view; | |
} | |
private void setVersionAndCopyrightText(View view) { | |
TextView version = view.findViewById(R.id.about_version); | |
version.setText(PrefUtils.versionInfo()); | |
TextView copyright = view.findViewById(R.id.about_copyright); | |
int thisYear = Calendar.getInstance().get(Calendar.YEAR); | |
copyright.setText(String.format(Locale.getDefault(), getString(R.string.about_copyright), thisYear)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment