From 48b44a6e27b87ee8bf5340a8d7ff37afaf04b7f9 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 22 Oct 2026 12:04:10 +0200 Subject: Optional app PIN, settings header, pink selection ring - A PIN (4 to 8 digits, salted SHA-256 in prefs) set in Settings shows a logo splash with a PIN prompt at start and whenever the app returns after leaving the screen; Back there leaves the app. - Settings gets the back-arrow header shared with the folder grid (Ui.header) and scrolls, since the PIN fields overflow the screen. - Tile and list focus rings use the icon pink. Co-Authored-By: Claude Opus 5.5 --- app/src/main/java/mygram/droid/FolderActivity.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'app/src/main/java/mygram/droid/FolderActivity.java') diff --git a/app/src/main/java/mygram/droid/FolderActivity.java b/app/src/main/java/mygram/droid/FolderActivity.java index dd674c4..65ac596 100644 --- a/app/src/main/java/mygram/droid/FolderActivity.java +++ b/app/src/main/java/mygram/droid/FolderActivity.java @@ -19,11 +19,9 @@ import android.app.Activity; import android.content.Context; import android.content.Intent; import android.os.Bundle; -import android.view.Gravity; import android.view.ViewGroup; import android.widget.FrameLayout; import android.widget.LinearLayout; -import android.widget.TextView; import android.widget.Toast; import androidx.recyclerview.widget.GridLayoutManager; @@ -52,15 +50,7 @@ public final class FolderActivity extends Activity { super.onCreate(state); LinearLayout column = new LinearLayout(this); column.setOrientation(LinearLayout.VERTICAL); - LinearLayout header = new LinearLayout(this); - header.setGravity(Gravity.CENTER_VERTICAL); - int p = Ui.dp(this, 16); - header.setPadding(p * 2, p, p * 2, 0); - header.addView(Ui.iconButton(this, R.drawable.ic_arrow_back, "Back", v -> finish())); - TextView title = Ui.text(this, getIntent().getStringExtra("name"), 24); - title.setPadding(p, 0, 0, 0); - header.addView(title); - column.addView(header); + column.addView(Ui.header(this, getIntent().getStringExtra("name"))); content = new FrameLayout(this); column.addView(content, new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 0, 1)); setContentView(column); -- cgit v1.2.3