Activity Mail
This commit is contained in:
4
.idea/deploymentTargetDropDown.xml
generated
4
.idea/deploymentTargetDropDown.xml
generated
@@ -7,11 +7,11 @@
|
|||||||
<deviceKey>
|
<deviceKey>
|
||||||
<Key>
|
<Key>
|
||||||
<type value="VIRTUAL_DEVICE_PATH" />
|
<type value="VIRTUAL_DEVICE_PATH" />
|
||||||
<value value="C:\Users\samue\.android\avd\Nexus_6_API_29.avd" />
|
<value value="C:\Users\samue\.android\avd\Pixel_6_Pro_API_32.avd" />
|
||||||
</Key>
|
</Key>
|
||||||
</deviceKey>
|
</deviceKey>
|
||||||
</Target>
|
</Target>
|
||||||
</targetSelectedWithDropDown>
|
</targetSelectedWithDropDown>
|
||||||
<timeTargetWasSelectedWithDropDown value="2022-10-06T21:07:17.900132800Z" />
|
<timeTargetWasSelectedWithDropDown value="2022-10-06T22:26:30.777281200Z" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
@@ -2,20 +2,19 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||||
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||||
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
|
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||||
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
|
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
||||||
|
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:icon="@drawable/logo512x512"
|
android:icon="@drawable/logo512x512"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
|
android:requestLegacyExternalStorage="true"
|
||||||
android:roundIcon="@drawable/logo512x512"
|
android:roundIcon="@drawable/logo512x512"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:requestLegacyExternalStorage="true"
|
|
||||||
android:theme="@style/Theme.RadioMercure">
|
android:theme="@style/Theme.RadioMercure">
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
@@ -27,7 +26,12 @@
|
|||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<service android:name=".MediaPlayerService"/>
|
|
||||||
|
<activity
|
||||||
|
android:name=".MailActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
|
||||||
|
<service android:name=".MediaPlayerService" />
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
23
app/src/main/java/fr/svpro/radiomercure/MailActivity.java
Normal file
23
app/src/main/java/fr/svpro/radiomercure/MailActivity.java
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
package fr.svpro.radiomercure;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.EditText;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
public class MailActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
private EditText edSujet, edMessage;
|
||||||
|
private Button btnEnvoyer;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.form_mail);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -34,8 +34,6 @@ import androidx.appcompat.widget.Toolbar;
|
|||||||
import androidx.core.app.ActivityCompat;
|
import androidx.core.app.ActivityCompat;
|
||||||
import androidx.core.view.GravityCompat;
|
import androidx.core.view.GravityCompat;
|
||||||
import androidx.drawerlayout.widget.DrawerLayout;
|
import androidx.drawerlayout.widget.DrawerLayout;
|
||||||
|
|
||||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
|
||||||
import com.google.android.material.navigation.NavigationView;
|
import com.google.android.material.navigation.NavigationView;
|
||||||
|
|
||||||
public class MainActivity extends AppCompatActivity {
|
public class MainActivity extends AppCompatActivity {
|
||||||
@@ -51,7 +49,6 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
private static final String URL_PLATEFORM = "https://podcast.radiomercure.fr"; //"https://www.radiomercure.fr/?playerbar-pageinicial";
|
private static final String URL_PLATEFORM = "https://podcast.radiomercure.fr"; //"https://www.radiomercure.fr/?playerbar-pageinicial";
|
||||||
private MediaPlayerService player;
|
private MediaPlayerService player;
|
||||||
boolean serviceBound = false;
|
boolean serviceBound = false;
|
||||||
private FloatingActionButton fbtn_live;
|
|
||||||
|
|
||||||
static {
|
static {
|
||||||
versionName = BuildConfig.VERSION_NAME;
|
versionName = BuildConfig.VERSION_NAME;
|
||||||
@@ -92,6 +89,11 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case R.id.mail:
|
||||||
|
Intent form_mail = new Intent(MainActivity.this,MailActivity.class);
|
||||||
|
startActivity(form_mail);
|
||||||
|
break;
|
||||||
|
|
||||||
case R.id.home:
|
case R.id.home:
|
||||||
web.loadUrl("https://podcast.radiomercure.fr/");
|
web.loadUrl("https://podcast.radiomercure.fr/");
|
||||||
break;
|
break;
|
||||||
|
|||||||
61
app/src/main/res/layout/form_mail.xml
Normal file
61
app/src/main/res/layout/form_mail.xml
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/colorPrimaryVariant"
|
||||||
|
android:text="Contactez-nous"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textAppearance="@style/TextAppearance.Material3.BodyLarge"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="30dp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/etSujet"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="textPersonName"
|
||||||
|
android:minHeight="48dp"
|
||||||
|
android:hint="Sujet de votre message" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/etMessage"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="top|left"
|
||||||
|
android:inputType="textMultiLine"
|
||||||
|
android:lines="10"
|
||||||
|
android:minHeight="48dp"
|
||||||
|
android:hint="Votre message"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btnEnvoyer"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:drawableLeft="@android:drawable/ic_menu_send"
|
||||||
|
android:text="Envoyer" />
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
@@ -12,6 +12,11 @@
|
|||||||
android:id="@+id/tel"
|
android:id="@+id/tel"
|
||||||
android:icon="@android:drawable/stat_sys_phone_call"
|
android:icon="@android:drawable/stat_sys_phone_call"
|
||||||
android:title="@string/menu_phone" />
|
android:title="@string/menu_phone" />
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/mail"
|
||||||
|
android:icon="@android:drawable/sym_action_email"
|
||||||
|
android:title="@string/menu_mail" />
|
||||||
</menu>
|
</menu>
|
||||||
|
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
<string name="app_name">Radio Mercure</string>
|
<string name="app_name">Radio Mercure</string>
|
||||||
<string name="menu_exit">Quitter</string>
|
<string name="menu_exit">Quitter</string>
|
||||||
<string name="menu_phone">Appeler la Radio</string>
|
<string name="menu_phone">Appeler la Radio</string>
|
||||||
|
<string name="menu_mail">Contactez-nous</string>
|
||||||
<string name="menu_live">Ecouter en direct</string>
|
<string name="menu_live">Ecouter en direct</string>
|
||||||
<string name="menu_reload">Relancer...</string>
|
<string name="menu_reload">Relancer...</string>
|
||||||
<string name="menu_about">A Propos...</string>
|
<string name="menu_about">A Propos...</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user