Comments (2)
Are you using fitSystemWindows=true
from your drawer?
I'm still investigating this problem. I guess something is messing up with the AppTheme.OverlapSystemBar
theme.
from konamicode.
I guess I was using fitSystemWindows=true
since it was in the template too.
I kinda worked around the behavior by injecting the code manually, without using
new KonamiCode.Installer(context)
.on(activity-or-fragment-or-view)
.install();
I think it has something to do with the way the alertDialog is bind to the view. But I'm not sure.
I don't know if this can be useful to you, since I'm not using the library installer, but my working code looks like this :
cheatCode = null;
try {
final ViewGroup viewGroup = (ViewGroup) ((ViewGroup) this.findViewById(android.R.id.content)).getChildAt(0);
View buttonsView = LayoutInflater.from(getApplicationContext()).inflate(R.layout.dialog_buttons, viewGroup, false);
View aButton = buttonsView.findViewById(R.id.konami_button_a);
View bButton = buttonsView.findViewById(R.id.konami_button_b);
View startButton = buttonsView.findViewById(R.id.konami_button_start);
aButton.setOnClickListener(buttonsClickListener);
bButton.setOnClickListener(buttonsClickListener);
startButton.setOnClickListener(buttonsClickListener);
buttonDialog = new AlertDialog.Builder(this)
.setView(buttonsView)
.create();
cheatCode = new KonamiCode(getApplicationContext());
cheatCode.setOnKonamiCodeListener(new KonamiCode.OnKonamiCodeListener()
{
public void onSuccessfulCode()
{
showDialog();
}
});
viewGroup.setOnTouchListener(cheatCode);
from konamicode.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from konamicode.