forked from wheremyfoodat/Panda3DS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pandroid: Screen layout editor (wheremyfoodat#425)
* Add Dynamic colors option for Android 12 or above (#8) * Dynamic color for android 12 or above @Ishan09811 * Revert "Add Dynamic colors option for Android 12 or above (#8)" (#9) This reverts commit 6ee1a39. * Material Switch (#10) | ISHAN | REVIEW * Review Material Switch * basic implement, ds editor, and remake theme selector * add swap screen in drawer * basic file provider for access private folder from file explorer * Pandroid: Game about dialog (#7) * Alert dialog idea * Reimplement ishan game dialog. * Add Picture In Picture support with a option (#11) - Ishan picture in picture pr * some fixes * Add game to launcher and some clear code. --------- Co-authored-by: Ishan09811 <[email protected]> Co-authored-by: gabriel <gabriel>
- Loading branch information
1 parent
90f8fbf
commit 02496b5
Showing
84 changed files
with
2,674 additions
and
371 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
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
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
46 changes: 46 additions & 0 deletions
46
src/pandroid/app/src/main/java/com/panda3ds/pandroid/app/base/BaseSheetDialog.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,46 @@ | ||
package com.panda3ds.pandroid.app.base; | ||
|
||
import android.content.Context; | ||
import android.util.TypedValue; | ||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.widget.LinearLayout; | ||
|
||
import androidx.annotation.NonNull; | ||
|
||
import com.google.android.material.bottomsheet.BottomSheetDialog; | ||
import com.panda3ds.pandroid.R; | ||
import com.panda3ds.pandroid.utils.CompatUtils; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
public class BaseSheetDialog extends BottomSheetDialog { | ||
private final LinearLayout contentView; | ||
public BaseSheetDialog(@NonNull Context context) { | ||
super(CompatUtils.findActivity(context)); | ||
int width = CompatUtils.findActivity(context).getWindow().getDecorView().getMeasuredWidth(); | ||
int height = CompatUtils.findActivity(context).getWindow().getDecorView().getMeasuredHeight(); | ||
getBehavior().setPeekHeight((int) (height*0.87)); | ||
getBehavior().setMaxWidth(width); | ||
getBehavior().setMaxHeight((int) (height*0.87)); | ||
super.setContentView(R.layout.dialog_bottom_sheet); | ||
contentView = super.findViewById(R.id.content); | ||
} | ||
|
||
@Override | ||
public void setContentView(View view) { | ||
contentView.removeAllViews(); | ||
contentView.addView(view); | ||
} | ||
|
||
@Override | ||
public void setContentView(int layoutResId) { | ||
setContentView(LayoutInflater.from(getContext()).inflate(layoutResId, null, false)); | ||
} | ||
|
||
@NotNull | ||
@Override | ||
public <T extends View> T findViewById(int id) { | ||
return contentView.findViewById(id); | ||
} | ||
} |
Oops, something went wrong.