Début main window

pull/4/head
Baptiste BONNEAU 2 years ago
parent 6a03acb649
commit 27f9156887

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

@ -5,12 +5,12 @@ plugins {
android { android {
namespace 'uca.baptistearthur.geocaching' namespace 'uca.baptistearthur.geocaching'
compileSdk 32 compileSdk 33
defaultConfig { defaultConfig {
applicationId "uca.baptistearthur.geocaching" applicationId "uca.baptistearthur.geocaching"
minSdk 16 minSdk 16
targetSdk 32 targetSdk 33
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
@ -34,7 +34,7 @@ android {
dependencies { dependencies {
implementation 'androidx.core:core-ktx:1.7.0' implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.8.0' implementation 'com.google.android.material:material:1.8.0'
testImplementation 'junit:junit:4.13.2' testImplementation 'junit:junit:4.13.2'

@ -11,6 +11,15 @@
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/Theme.Geocaching" android:theme="@style/Theme.Geocaching"
tools:targetApi="31" /> tools:targetApi="31">
<activity android:name=".MainWindow" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest> </manifest>

@ -0,0 +1,13 @@
package uca.baptistearthur.geocaching
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
class MainWindow: AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.main_window)
}
}

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="55dp"
android:background="@color/green">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="@string/app_name"
android:textColor="@color/white"
android:layout_marginStart="25dp"
android:gravity="center"
android:textSize="20sp"
android:layout_marginLeft="25dp" />
</FrameLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="55dp"
android:gravity="center"
>
<Button
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="@string/profil"
android:textSize="11sp"
android:layout_marginRight="20dp"
style="?android:attr/buttonBarButtonStyle"/>
<Button
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="@string/carte"
android:textSize="11sp"
android:layout_marginRight="20dp"
android:layout_marginLeft="20dp"
style="?android:attr/buttonBarButtonStyle" />
<Button
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="@string/liste"
android:textSize="11sp"
android:layout_marginLeft="20dp"
style="?android:attr/buttonBarButtonStyle"/>
</LinearLayout>
</LinearLayout>

@ -7,4 +7,6 @@
<color name="teal_700">#FF018786</color> <color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color> <color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color> <color name="white">#FFFFFFFF</color>
<color name="green">#FF3D7D3C</color>
<color name="green_variant">#FF659964</color>
</resources> </resources>

@ -1,3 +1,6 @@
<resources> <resources>
<string name="app_name">Geocaching</string> <string name="app_name">Geocaching</string>
<string name="profil">Profil</string>
<string name="carte">Carte</string>
<string name="liste">Liste</string>
</resources> </resources>

@ -2,8 +2,8 @@
<!-- Base application theme. --> <!-- Base application theme. -->
<style name="Theme.Geocaching" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> <style name="Theme.Geocaching" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. --> <!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_500</item> <item name="colorPrimary">@color/green</item>
<item name="colorPrimaryVariant">@color/purple_700</item> <item name="colorPrimaryVariant">@color/green_variant</item>
<item name="colorOnPrimary">@color/white</item> <item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. --> <!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item> <item name="colorSecondary">@color/teal_200</item>

Loading…
Cancel
Save