Some cleaning

This commit is contained in:
tom79 2020-03-07 16:55:56 +01:00
parent 57691321c0
commit 84e832e19c
1 changed files with 4 additions and 16 deletions

View File

@ -17,7 +17,6 @@ package app.fedilab.android.activities;
import android.animation.Animator; import android.animation.Animator;
import android.animation.AnimatorListenerAdapter; import android.animation.AnimatorListenerAdapter;
import android.content.Context; import android.content.Context;
import android.content.DialogInterface;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.ColorDrawable;
import android.os.Bundle; import android.os.Bundle;
@ -82,9 +81,6 @@ public class PeertubeRegisterActivity extends BaseActivity implements OnRetrieve
case Helper.THEME_LIGHT: case Helper.THEME_LIGHT:
setTheme(R.style.AppTheme_Fedilab); setTheme(R.style.AppTheme_Fedilab);
break; break;
case Helper.THEME_DARK:
setTheme(R.style.AppThemeDark);
break;
case Helper.THEME_BLACK: case Helper.THEME_BLACK:
setTheme(R.style.AppThemeBlack); setTheme(R.style.AppThemeBlack);
break; break;
@ -103,12 +99,7 @@ public class PeertubeRegisterActivity extends BaseActivity implements OnRetrieve
actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM); actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
ImageView toolbar_close = actionBar.getCustomView().findViewById(R.id.toolbar_close); ImageView toolbar_close = actionBar.getCustomView().findViewById(R.id.toolbar_close);
TextView toolbar_title = actionBar.getCustomView().findViewById(R.id.toolbar_title); TextView toolbar_title = actionBar.getCustomView().findViewById(R.id.toolbar_title);
toolbar_close.setOnClickListener(new View.OnClickListener() { toolbar_close.setOnClickListener(v -> finish());
@Override
public void onClick(View v) {
finish();
}
});
toolbar_title.setText(R.string.sign_up); toolbar_title.setText(R.string.sign_up);
} }
@ -271,12 +262,9 @@ public class PeertubeRegisterActivity extends BaseActivity implements OnRetrieve
} }
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(PeertubeRegisterActivity.this, style); AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(PeertubeRegisterActivity.this, style);
dialogBuilder.setCancelable(false); dialogBuilder.setCancelable(false);
dialogBuilder.setPositiveButton(R.string.validate, new DialogInterface.OnClickListener() { dialogBuilder.setPositiveButton(R.string.validate, (dialog, which) -> {
@Override dialog.dismiss();
public void onClick(DialogInterface dialog, int which) { finish();
dialog.dismiss();
finish();
}
}); });
AlertDialog alertDialog = dialogBuilder.create(); AlertDialog alertDialog = dialogBuilder.create();
alertDialog.setTitle(getString(R.string.account_created)); alertDialog.setTitle(getString(R.string.account_created));