-
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.
Added Single Player mode and Few other changes
- Loading branch information
1 parent
3963714
commit 83b9189
Showing
75 changed files
with
1,090 additions
and
203 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
31 changes: 30 additions & 1 deletion
31
app/src/main/java/com/engima/mapps/enigma/MainActivity.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 |
---|---|---|
@@ -1,23 +1,52 @@ | ||
package com.engima.mapps.enigma; | ||
|
||
import android.support.v4.widget.DrawerLayout; | ||
import android.support.v7.app.ActionBar; | ||
import android.support.v7.app.ActionBarDrawerToggle; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.os.Bundle; | ||
import android.content.Intent; | ||
import android.support.v7.widget.Toolbar; | ||
import android.view.MenuItem; | ||
import android.view.View; | ||
|
||
public class MainActivity extends AppCompatActivity { | ||
|
||
private DrawerLayout mDrawerlayout; | ||
private ActionBarDrawerToggle mtoggle; | ||
private Toolbar mtoolbar; | ||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_main); | ||
mtoolbar =(Toolbar) findViewById(R.id.nav_action); | ||
setSupportActionBar(mtoolbar); | ||
|
||
mDrawerlayout= (DrawerLayout) findViewById(R.id.drawerlayout); | ||
mtoggle= new ActionBarDrawerToggle(this,mDrawerlayout,R.string.open,R.string.close); | ||
mDrawerlayout.addDrawerListener(mtoggle); | ||
mtoggle.syncState(); | ||
getSupportActionBar().setDisplayHomeAsUpEnabled(true); | ||
|
||
|
||
} | ||
|
||
@Override | ||
public boolean onOptionsItemSelected(MenuItem item) { | ||
if(mtoggle.onOptionsItemSelected(item)) | ||
{ | ||
return true; | ||
} | ||
return super.onOptionsItemSelected(item); | ||
} | ||
|
||
public void gotogamepage(View view) | ||
{ | ||
Intent m =new Intent (this,GamePage.class); | ||
startActivity(m); | ||
} | ||
public void gotosingleplayer(View view) | ||
{ | ||
Intent m =new Intent (this,Singleplayer.class); | ||
startActivity(m); | ||
} | ||
} |
Oops, something went wrong.