-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Seaflowery
committed
May 17, 2022
1 parent
a0655ec
commit a8a7003
Showing
4 changed files
with
131 additions
and
0 deletions.
There are no files selected for viewing
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
39 changes: 39 additions & 0 deletions
39
app/src/main/java/io/github/subhamtyagi/lastlauncher/dialogs/HiddenAppsModeDialog.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package io.github.subhamtyagi.lastlauncher.dialogs; | ||
|
||
import android.app.Activity; | ||
import android.app.Dialog; | ||
import android.content.Context; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
import android.widget.LinearLayout; | ||
|
||
import io.github.subhamtyagi.lastlauncher.R; | ||
import io.github.subhamtyagi.lastlauncher.LauncherActivity; | ||
import io.github.subhamtyagi.lastlauncher.model.Apps; | ||
|
||
public class HiddenAppsModeDialog extends Dialog implements View.OnClickListener { | ||
LauncherActivity launcherActivity; | ||
|
||
public HiddenAppsModeDialog(Context context, LauncherActivity launcherActivity) { | ||
super(context); | ||
this.launcherActivity = launcherActivity; | ||
} | ||
|
||
@Override | ||
public void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
LinearLayout ll = findViewById(R.id.hidden_linear_layout); | ||
for (int i = 0; i < ll.getChildCount(); i++) { | ||
ll.getChildAt(i).setOnClickListener(this); | ||
} | ||
} | ||
|
||
@Override | ||
public void onClick(View view) { | ||
if (view.getId() == R.id.in_list) { | ||
launcherActivity.showHiddenApps(); | ||
} else if (view.getId() == R.id.in_main) { | ||
launcherActivity.changeAppsList(); | ||
} | ||
} | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?xml version="1.0" encoding="utf-8"?><!-- | ||
~ Last Launcher | ||
~ Copyright (C) 2019 Shubham Tyagi | ||
~ | ||
~ This program is free software: you can redistribute it and/or modify | ||
~ it under the terms of the GNU General Public License as published by | ||
~ the Free Software Foundation, either version 3 of the License, or | ||
~ (at your option) any later version. | ||
~ | ||
~ 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 General Public License for more details. | ||
~ | ||
~ You should have received a copy of the GNU General Public License | ||
~ along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
--> | ||
|
||
|
||
<LinearLayout android:id="@+id/hidden_linear_layout" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:orientation="vertical" | ||
xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
<TextView | ||
android:id="@+id/in_main" | ||
style="@style/AppTheme" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:gravity="center" | ||
android:padding="5dp" | ||
android:tag="AppTheme" | ||
android:text="show in main screen" | ||
android:textSize="22sp" /> | ||
|
||
<TextView | ||
android:id="@+id/in_list" | ||
style="@style/AppTheme" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:gravity="center" | ||
android:padding="5dp" | ||
android:tag="@style/Wallpaper" | ||
android:text="show in list" | ||
android:textSize="22sp" /> | ||
|
||
|
||
</LinearLayout> |