Browse Source

Ajout menu item + Divers fix

master
Samuel Vermeulen 2 months ago
parent
commit
1696cfbf86
  1. 17
      .idea/deploymentTargetDropDown.xml
  2. 4
      app/build.gradle
  3. 23
      app/src/main/java/fr/svpro/radiomercure/MainActivity.java
  4. BIN
      app/src/main/res/drawable/icons8_facebook_24.png
  5. 19
      app/src/main/res/menu/menu_drawer.xml
  6. 9
      app/src/main/res/values/strings.xml

17
.idea/deploymentTargetDropDown.xml

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetDropDown">
<targetSelectedWithDropDown>
<Target>
<type value="QUICK_BOOT_TARGET" />
<deviceKey>
<Key>
<type value="VIRTUAL_DEVICE_PATH" />
<value value="C:\Users\samue\.android\avd\Nexus_6_API_30.avd" />
</Key>
</deviceKey>
</Target>
</targetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2022-10-11T23:10:24.489318500Z" />
</component>
</project>

4
app/build.gradle

@ -22,8 +22,8 @@ android {
applicationId "fr.svpro.radiomercure"
minSdk 26
targetSdk 32
versionCode 200
versionName '2.0.0'
versionCode 201
versionName '2.0.1'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

23
app/src/main/java/fr/svpro/radiomercure/MainActivity.java

@ -73,8 +73,12 @@ public class MainActivity extends AppCompatActivity {
@Override
public boolean onNavigationItemSelected(MenuItem item) {
// Navigation drawer item click listener
// Navigation drawer item
switch (item.getItemId()) {
case R.id.historique:
web.loadUrl(URL_PLATEFORM + "/pages/historique-de-la-radio");
break;
case R.id.live:
Toast.makeText(MainActivity.this, "Vous écoutez Radio Mercure en direct", Toast.LENGTH_SHORT).show();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
@ -95,21 +99,30 @@ public class MainActivity extends AppCompatActivity {
startActivity(form_mail);
break;
case R.id.home:
web.loadUrl(URL_PLATEFORM);
case R.id.promouvoir:
web.loadUrl(URL_PLATEFORM + "/pages/vos-evenements-a-la-radio");
break;
case R.id.exit:
System.exit(0);
case R.id.home:
web.loadUrl(URL_PLATEFORM);
break;
case R.id.podmap:
web.loadUrl(URL_PLATEFORM + "/map");
break;
case R.id.privacy:
web.loadUrl(URL_PLATEFORM + "/pages/politique-de-confidentialite");
break;
case R.id.about:
dialog.show();
break;
case R.id.exit:
System.exit(0);
break;
}
drawerLayout.closeDrawer(GravityCompat.START);

BIN
app/src/main/res/drawable/icons8_facebook_24.png

After

Width: 24  |  Height: 24  |  Size: 411 B

19
app/src/main/res/menu/menu_drawer.xml

@ -1,8 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:title="Radio Mercure">
<item android:title="@string/menu_radio_mercure">
<menu>
<item
android:id="@+id/historique"
android:icon="@android:drawable/ic_menu_recent_history"
android:title="@string/menu_historique" />
<item
android:id="@+id/live"
android:icon="@android:drawable/ic_media_play"
@ -17,11 +21,17 @@
android:id="@+id/mail"
android:icon="@android:drawable/sym_action_email"
android:title="@string/menu_mail" />
<item
android:id="@+id/promouvoir"
android:icon="@android:drawable/star_big_off"
android:title="@string/menu_promouvoir" />
</menu>
</item>
<item android:title="Application">
<item android:title="@string/menu_application">
<menu>
<item
android:id="@+id/home"
@ -33,6 +43,11 @@
android:icon="@android:drawable/ic_menu_mapmode"
android:title="@string/menu_podmap" />
<item
android:id="@+id/privacy"
android:icon="@android:drawable/stat_sys_warning"
android:title="@string/menu_politique_de_confidentialit" />
<item
android:id="@+id/about"
android:icon="@android:drawable/ic_menu_info_details"

9
app/src/main/res/values/strings.xml

@ -27,10 +27,15 @@
<string name="mailclient_err">Aucun client mail trouvé !!</string>
<string name="battery_annul">Annulation par l\'utilisateur</string>
<string name="dialog_about_titre">A Propos de l\'Application</string>
<string name="app_version">RADIO MERCURE - Version </string>
<string name="app_version">RADIO MERCURE - Version\ </string>
<string name="adresse_radio"><![CDATA[Radio Mercure\n
2 Bd Aristide Briand\n
60000 BEAUVAIS
]]></string>
]]></string>
<string name="menu_historique">Historique</string>
<string name="menu_promouvoir">Promouvoir</string>
<string name="menu_radio_mercure">Radio Mercure</string>
<string name="menu_application">Application</string>
<string name="menu_politique_de_confidentialit">Politique de Confidentialité</string>
</resources>
Loading…
Cancel
Save