Skip to content

Commit

Permalink
Merge pull request #3 from SebastienBenazet/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
0xEBO authored Nov 24, 2016
2 parents a304177 + bac7b91 commit 04a1d88
Show file tree
Hide file tree
Showing 11 changed files with 59 additions and 31 deletions.
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@
<br>

<img src="https://github.com/SebastienBenazet/MasterSynthetizer/blob/master/app/src/main/res/mipmap-xhdpi/ic_launcher.png"
alt="Snowplow logo" title="Heenok" align="left" /> Han ! Pour tous les p'tits fanatiques.
alt="MasterSynthetizer logo" title="Heenok" align="left" /> Han ! Pour tous les p'tits fanatiques.
<br>
<br>
<br>
<br>

# Instructions
- Download the APK
- Allow installations from Unknown sources
- Install the APK
- [Télécharger](https://github.com/SebastienBenazet/MasterSynthetizer/releases) l'APK
- Autoriser les installations via des Sources inconnues dans les paramètres de sécurité
- Installer l'APK
- Enjoy !


###[Download Section](https://github.com/SebastienBenazet/MasterSynthetizer/releases)
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
package com.kitbass.mastersynthetizer;

import android.content.Intent;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.Environment;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

import java.io.File;

public class HeenokActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_heenok);

//Orientation de l'écran
//Display display = ((WindowManager) getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
//System.out.println(display.getRotation());
}


Expand Down
33 changes: 22 additions & 11 deletions app/src/main/java/com/kitbass/mastersynthetizer/MainActivity.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
package com.kitbass.mastersynthetizer;

import android.content.Context;
import android.content.Intent;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.view.View;
import android.support.design.widget.NavigationView;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Display;
import android.view.Menu;
import android.view.MenuItem;
import android.view.WindowManager;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity
Expand All @@ -27,14 +28,21 @@ protected void onCreate(Bundle savedInstanceState) {

DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
drawer.setDrawerListener(toggle);
this,
drawer,
toolbar,
R.string.navigation_drawer_open,
R.string.navigation_drawer_close
);
drawer.addDrawerListener(toggle);
toggle.syncState();

NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this);

//Permet de garder la couleur d'origine des icones du Navigation Drawer
navigationView.setItemIconTintList(null);

}

@Override
Expand Down Expand Up @@ -70,25 +78,28 @@ public boolean onOptionsItemSelected(MenuItem item) {
return super.onOptionsItemSelected(item);
}

@SuppressWarnings("StatementWithEmptyBody")
@Override
public boolean onNavigationItemSelected(MenuItem item) {
// Handle navigation view item clicks here.
int id = item.getItemId();

if (id == R.id.nav_heenok) {
//Play Heenok song
final MediaPlayer dollars = MediaPlayer.create(this, R.raw.moins_que_100_dollars);
dollars.start();
//Start HeenokActivity
Intent intent = new Intent(MainActivity.this, HeenokActivity.class);
startActivity(intent);
} else if (id == R.id.nav_gallery) {

Toast.makeText(getApplicationContext(), "Coming soon !", Toast.LENGTH_SHORT).show();
} else if (id == R.id.nav_slideshow) {

Toast.makeText(getApplicationContext(), "Coming soon !", Toast.LENGTH_SHORT).show();
} else if (id == R.id.nav_manage) {

Toast.makeText(getApplicationContext(), "Coming soon !", Toast.LENGTH_SHORT).show();
} else if (id == R.id.nav_share) {

Toast.makeText(getApplicationContext(), "Coming soon !", Toast.LENGTH_SHORT).show();
} else if (id == R.id.nav_send) {

Toast.makeText(getApplicationContext(), "Coming soon !", Toast.LENGTH_SHORT).show();
}

DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
Expand Down
Binary file removed app/src/main/res/drawable/heenok_wallpaper.jpg
Binary file not shown.
Binary file added app/src/main/res/drawable/heenok_wallpaper.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions app/src/main/res/layout/activity_heenok.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<!-- 1ère rangée -->
<Button
android:id="@+id/heenok_brla_button"
style="@style/Base.Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="@dimen/heenok_button_witdh"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
Expand All @@ -24,6 +25,7 @@

<Button
android:id="@+id/heenok_chevilles_button"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="@dimen/heenok_button_witdh"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/heenok_brla_button"
Expand All @@ -32,6 +34,7 @@

<Button
android:id="@+id/heenok_medaillon_button"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="@dimen/heenok_button_witdh"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/heenok_brla_button"
Expand All @@ -41,6 +44,7 @@
<!-- 2ème rangée -->
<Button
android:id="@+id/heenok_montres_button"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="@dimen/heenok_button_witdh"
android:layout_height="wrap_content"
android:layout_below="@+id/heenok_brla_button"
Expand All @@ -50,6 +54,7 @@

<Button
android:id="@+id/heenok_negros_button"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="@dimen/heenok_button_witdh"
android:layout_height="wrap_content"
android:layout_below="@+id/heenok_brla_button"
Expand All @@ -59,6 +64,7 @@

<Button
android:id="@+id/heenok_houhou_button"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="@dimen/heenok_button_witdh"
android:layout_height="wrap_content"
android:layout_below="@+id/heenok_brla_button"
Expand All @@ -69,6 +75,7 @@
<!-- 3ème rangée -->
<Button
android:id="@+id/heenok_revenu_button"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="@dimen/heenok_button_witdh"
android:layout_height="wrap_content"
android:layout_below="@+id/heenok_montres_button"
Expand All @@ -78,6 +85,7 @@

<Button
android:id="@+id/heenok_han_button"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="@dimen/heenok_button_witdh"
android:layout_height="wrap_content"
android:layout_below="@+id/heenok_montres_button"
Expand All @@ -87,6 +95,7 @@

<Button
android:id="@+id/heenok_croivent_button"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="@dimen/heenok_button_witdh"
android:layout_height="wrap_content"
android:layout_below="@+id/heenok_montres_button"
Expand All @@ -97,6 +106,7 @@
<!-- 4ème rangée -->
<Button
android:id="@+id/heenok_pesent_button"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="@dimen/heenok_button_witdh"
android:layout_height="wrap_content"
android:layout_below="@+id/heenok_revenu_button"
Expand All @@ -106,6 +116,7 @@

<Button
android:id="@+id/heenok_dimension_button"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="@dimen/heenok_button_witdh"
android:layout_height="wrap_content"
android:layout_below="@+id/heenok_revenu_button"
Expand All @@ -115,6 +126,7 @@

<Button
android:id="@+id/heenok_100dollars_button"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="@dimen/heenok_button_witdh"
android:layout_height="wrap_content"
android:layout_below="@+id/heenok_revenu_button"
Expand All @@ -125,6 +137,7 @@
<!-- 5ème rangée -->
<Button
android:id="@+id/heenok_montrealparis_button"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="@dimen/heenok_button_witdh"
android:layout_height="wrap_content"
android:layout_below="@+id/heenok_pesent_button"
Expand All @@ -134,6 +147,7 @@

<Button
android:id="@+id/heenok_hydroponique_button"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="@dimen/heenok_button_witdh"
android:layout_height="wrap_content"
android:layout_below="@+id/heenok_pesent_button"
Expand All @@ -143,6 +157,7 @@

<Button
android:id="@+id/heenok_pomme_button"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="@dimen/heenok_button_witdh"
android:layout_height="wrap_content"
android:layout_below="@+id/heenok_pesent_button"
Expand All @@ -153,6 +168,7 @@
<!-- 6ème rangée -->
<Button
android:id="@+id/heenok_revent_button"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="@dimen/heenok_button_witdh"
android:layout_height="wrap_content"
android:layout_below="@+id/heenok_montrealparis_button"
Expand All @@ -162,6 +178,7 @@

<Button
android:id="@+id/heenok_convention_button"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="@dimen/heenok_button_witdh"
android:layout_height="wrap_content"
android:layout_below="@+id/heenok_montrealparis_button"
Expand All @@ -171,6 +188,7 @@

<Button
android:id="@+id/heenok_equipe_button"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="@dimen/heenok_button_witdh"
android:layout_height="wrap_content"
android:layout_below="@+id/heenok_montrealparis_button"
Expand All @@ -181,6 +199,7 @@
<!-- 7ème rangée -->
<Button
android:id="@+id/heenok_famille_button"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="@dimen/heenok_button_witdh"
android:layout_height="wrap_content"
android:layout_below="@+id/heenok_revent_button"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/nav_header_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
android:id="@+id/navigation_drawer_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/accessibility_ic_launcher"
android:paddingTop="@dimen/nav_header_vertical_spacing"
android:src="@mipmap/ic_launcher"
android:contentDescription="@string/accessibility_ic_launcher"/>
android:src="@mipmap/ic_launcher" />

<TextView
android:layout_width="match_parent"
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<resources>
<color name="colorPrimary">#34495E</color>
<color name="colorPrimaryDark">#22313F</color>
<color name="colorAccent">#D64541</color>
<!--<color name="colorAccent">#D64541</color>-->
<color name="colorAccent">#2196F3</color>
<color name="colorHeenok">#BDC3C7</color>
<color name="text_shadow">#7F000000</color>
</resources>
2 changes: 1 addition & 1 deletion app/src/main/res/values/drawables.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<resources>
<item name="ic_menu_camera" type="drawable">@android:drawable/ic_menu_camera</item>
<item name="ic_menu_gallery" type="drawable">@android:drawable/ic_menu_gallery</item>
<item name="ic_menu_slideshow" type="drawable">@android:drawable/ic_menu_slideshow</item>
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@
<string name="heenok_montrealparis">Montreal Paris</string>
<string name="heenok_hydroponique">Hydroponique</string>
<string name="heenok_pomme">Pomme</string>
<string name="heenok_revent">Revent a cela</string>
<string name="heenok_revent">Rêvent a cela</string>
<string name="heenok_convention">Convention</string>
<string name="heenok_equipe">Mon equipe</string>
<string name="heenok_famille">pas d\'la famille</string>
<string name="text_home">On va s\'allumer</string>

<!-- Textes d'accessibilité -->
<string name="accessibility_home_image">Image du Roi Heenok fumant</string>
<string name="accessibility_ic_launcher">Tête du Roi Heenok</string>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import org.junit.Test;

import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;

/**
* To work on unit tests, switch the Test Artifact in the Build Variants view.
Expand Down

0 comments on commit 04a1d88

Please sign in to comment.