| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- /* _____ _
- * |_ _| |_ _ _ ___ ___ _ __ __ _
- * | | | ' \| '_/ -_) -_) ' \/ _` |_
- * |_| |_||_|_| \___\___|_|_|_\__,_(_)
- *
- * Threema for Android
- * Copyright (c) 2017-2023 Threema GmbH
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
- package ch.threema.app.activities;
- import android.content.Intent;
- import android.os.Bundle;
- import android.view.View;
- import android.widget.LinearLayout;
- import ch.threema.app.R;
- import ch.threema.app.utils.AnimationUtil;
- import ch.threema.app.utils.ConfigUtils;
- import static ch.threema.app.activities.WhatsNewActivity.EXTRA_NO_ANIMATION;
- public class WhatsNew2Activity extends ThreemaAppCompatActivity {
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- ConfigUtils.configureSystemBars(this);
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_whatsnew2);
- /*
- ((TextView) findViewById(R.id.whatsnew_body)).setText(Html.fromHtml(getString(R.string.whatsnew2_body, getString(R.string.app_name))));
- */
- findViewById(R.id.ok_button).setOnClickListener(v -> {
- finish();
- overridePendingTransition(R.anim.slide_in_right_short, R.anim.slide_out_left_short);
- });
- if (!getIntent().getBooleanExtra(EXTRA_NO_ANIMATION, false)) {
- LinearLayout buttonLayout = findViewById(R.id.button_layout);
- if (savedInstanceState == null) {
- buttonLayout.setVisibility(View.GONE);
- buttonLayout.postDelayed(() -> AnimationUtil.slideInFromBottomOvershoot(buttonLayout), 200);
- }
- }
- }
- @Override
- protected boolean enableOnBackPressedCallback() {
- return true;
- }
- @Override
- protected void handleOnBackPressed() {
- Intent intent = new Intent(WhatsNew2Activity.this, WhatsNewActivity.class);
- intent.putExtra(EXTRA_NO_ANIMATION, true);
- startActivity(intent);
- overridePendingTransition(R.anim.slide_in_left_short, R.anim.slide_out_right_short);
- finish();
- }
- }
|