Commit 80470b36 authored by djamel's avatar djamel

ajout d'un logo gala de prestige + correction de quelques bug mineurs

parent 337d8a47
......@@ -27,22 +27,6 @@
</value>
</option>
</component>
<component name="ProjectInspectionProfilesVisibleTreeState">
<entry key="Project Default">
<profile-state>
<expanded-state>
<State>
<id />
</State>
</expanded-state>
<selected-state>
<State>
<id>Android</id>
</State>
</selected-state>
</profile-state>
</entry>
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
......@@ -53,7 +37,7 @@
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.7" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.7" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
......
......@@ -4,7 +4,7 @@
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:icon="@mipmap/gala_logo"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme" >
......
......@@ -10,7 +10,6 @@ import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
......@@ -101,14 +100,14 @@ public class Read_QR_Code extends ActionBarActivity {
String hmac = hmacDigest(str[0] + " " + str[1] + " " + str[2], key.getKey(),
"HmacSHA1");
if(str[3].equals(hmac.substring(0, 8).toUpperCase())) {
display("youpi", true);
display(getString(R.string.ebillet_true), true);
found = true;
}
return;
}
}
if (!found) {
display("Baddd", false);
display(getString(R.string.ebillet_false), false);
}
}
......@@ -135,8 +134,9 @@ public class Read_QR_Code extends ActionBarActivity {
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.menu_read__qr__code, menu);
super.onCreateOptionsMenu(menu);
getMenuInflater().inflate(R.menu.menu_read__qr__code, menu);
return true;
}
......
package djamelfel.gala;
import android.app.ActionBar;
import android.content.Intent;
import android.database.MatrixCursor;
import android.os.Bundle;
......@@ -62,22 +63,24 @@ public class Settings extends ActionBarActivity implements View.OnClickListener
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_settings, menu);
ActionBar actionBar = getActionBar();
if (actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(true);
}
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.retour) {
Intent intent = new Intent(Settings.this, Read_QR_Code.class);
intent.putParcelableArrayListExtra("key_list", key_list);
startActivity(intent);
return true;
switch (item.getItemId()) {
case android.R.id.home:
Intent intent = new Intent(Settings.this, Read_QR_Code.class);
intent.putParcelableArrayListExtra("key_list", key_list);
startActivity(intent);
return true;
default:
return super.onOptionsItemSelected(item);
}
return super.onOptionsItemSelected(item);
}
public void updateView() {
......
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:id="@+id/action_settings"
android:title="@string/settings"/>
<item android:id="@+id/action_settings"
android:title="@string/settings"/>
</menu>
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".Settings">
<item android:id="@+id/retour"
android:title="@string/retour" />
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:id="@+id/stepBack"
android:title="@string/stepBack" />
</menu>
\ No newline at end of file
<resources>
<string name="app_name">Gala</string>
<string name="settings">Settings</string>
<string name="action_settings">Settings</string>
<string name="settings">Réglages</string>
<string name="new_key">Nouvel clé</string>
<string name="empty_text_area">veuillez saisir les champs</string>
<string name="retour">retour</string>
<string name="empty_text_area">Veuillez saisir les champs</string>
<string name="stepBack">Retour</string>
<string name="scan">Scan</string>
<string name="scanner">Scanner Code</string>
<string name="error_lib_empty">Veuillez entrer au moins une clé valide</string>
<string name="ebillet_true">Le billet est valide</string>
<string name="ebillet_false">Le billet n\'est pas valide</string>
</resources>
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar" />
</resources>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment