Skip to content

Commit

Permalink
Item selection gui
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimin15 committed Apr 25, 2024
1 parent d0c424a commit 6abcac3
Show file tree
Hide file tree
Showing 5 changed files with 188 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
android:supportsRtl="true"
android:theme="@style/Theme.Proj2"
tools:targetApi="31">
<activity
android:name=".Item_selection"
android:exported="false"
android:theme="@style/Theme.Proj2" />
<activity
android:name=".RegisterActivity"
android:exported="false" />
Expand All @@ -22,14 +26,14 @@
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:exported="true"
android:theme="@style/Theme.Proj2">
</activity>
android:theme="@style/Theme.Proj2" />
</application>

</manifest>
24 changes: 24 additions & 0 deletions app/src/main/java/com/example/proj2/Item_selection.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.example.proj2;

import android.os.Bundle;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

public class Item_selection extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EdgeToEdge.enable(this);
setContentView(R.layout.activity_item_selection);
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
return insets;
});
}
}
93 changes: 93 additions & 0 deletions app/src/main/res/layout/activity_item_selection.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Item_selection">

<Button
android:id="@+id/button1"
android:layout_width="338dp"
android:layout_height="78dp"
android:layout_marginStart="10dp"
android:layout_marginTop="44dp"
android:layout_marginEnd="10dp"
android:background="#03A9F4"
android:backgroundTint="#2196F3"
android:drawableLeft="@drawable/doran_blade"
android:text="Doran's Blade\nPrice:450gold"
android:textColorLink="#03A9F4"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.509"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<Button
android:id="@+id/button2"
android:layout_width="338dp"
android:layout_height="78dp"
android:layout_marginStart="10dp"
android:layout_marginTop="25dp"
android:layout_marginEnd="10dp"
android:background="#2196F3"
android:drawableLeft="@drawable/doran_ring"
android:text="Doran's Ring\nPrice:400gold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button1" />

<Button
android:id="@+id/button4"
android:layout_width="338dp"
android:layout_height="78dp"
android:layout_marginStart="10dp"
android:layout_marginTop="25dp"
android:layout_marginEnd="10dp"
android:background="#2196F3"
android:drawableLeft="@drawable/black_cleaver"
android:text="Black Cleaver\nPrice:3300gold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button2" />

<Button
android:id="@+id/button5"
android:layout_width="338dp"
android:layout_height="78dp"
android:background="#2196F3"
android:drawableLeft="@drawable/trinity_force"
android:text="Trinity Force\nPrice:3333gold"
tools:layout_editor_absoluteX="33dp"
tools:layout_editor_absoluteY="358dp" />

<Button
android:id="@+id/button6"
android:layout_width="338dp"
android:layout_height="78dp"
android:layout_marginStart="10dp"
android:layout_marginTop="25dp"
android:layout_marginEnd="10dp"
android:background="#2196F3"
android:drawableLeft="@drawable/hearthbound_axe"
android:text="Hearthbound Axe\nPrice:1100gold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button5" />

<Button
android:id="@+id/button7"
android:layout_width="338dp"
android:layout_height="78dp"
android:layout_marginStart="10dp"
android:layout_marginTop="25dp"
android:layout_marginEnd="10dp"
android:background="#2196F3"
android:drawableLeft="@drawable/noonquiver"
android:text="Noonquiver\nPrice:1300gold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button6" />

</androidx.constraintlayout.widget.ConstraintLayout>
28 changes: 28 additions & 0 deletions app/src/main/res/navigation/nav_graph3.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/nav_graph3"
app:startDestination="@id/First2Fragment">

<fragment
android:id="@+id/First2Fragment"
android:name="com.example.proj2.First2Fragment"
android:label="@string/first_fragment_label"
tools:layout="@layout/fragment_first2">

<action
android:id="@+id/action_First2Fragment_to_Second2Fragment"
app:destination="@id/Second2Fragment" />
</fragment>
<fragment
android:id="@+id/Second2Fragment"
android:name="com.example.proj2.Second2Fragment"
android:label="@string/second_fragment_label"
tools:layout="@layout/fragment_second2">

<action
android:id="@+id/action_Second2Fragment_to_First2Fragment"
app:destination="@id/First2Fragment" />
</fragment>
</navigation>
37 changes: 37 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,41 @@
<string name="ChampionDamage">
PlaceHolder
</string>

<string name="lorem_ipsum">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam in scelerisque sem. Mauris
volutpat, dolor id interdum ullamcorper, risus dolor egestas lectus, sit amet mattis purus
dui nec risus. Maecenas non sodales nisi, vel dictum dolor. Class aptent taciti sociosqu ad
litora torquent per conubia nostra, per inceptos himenaeos. Suspendisse blandit eleifend
diam, vel rutrum tellus vulputate quis. Aliquam eget libero aliquet, imperdiet nisl a,
ornare ex. Sed rhoncus est ut libero porta lobortis. Fusce in dictum tellus.\n\n
Suspendisse interdum ornare ante. Aliquam nec cursus lorem. Morbi id magna felis. Vivamus
egestas, est a condimentum egestas, turpis nisl iaculis ipsum, in dictum tellus dolor sed
neque. Morbi tellus erat, dapibus ut sem a, iaculis tincidunt dui. Interdum et malesuada
fames ac ante ipsum primis in faucibus. Curabitur et eros porttitor, ultricies urna vitae,
molestie nibh. Phasellus at commodo eros, non aliquet metus. Sed maximus nisl nec dolor
bibendum, vel congue leo egestas.\n\n
Sed interdum tortor nibh, in sagittis risus mollis quis. Curabitur mi odio, condimentum sit
amet auctor at, mollis non turpis. Nullam pretium libero vestibulum, finibus orci vel,
molestie quam. Fusce blandit tincidunt nulla, quis sollicitudin libero facilisis et. Integer
interdum nunc ligula, et fermentum metus hendrerit id. Vestibulum lectus felis, dictum at
lacinia sit amet, tristique id quam. Cras eu consequat dui. Suspendisse sodales nunc ligula,
in lobortis sem porta sed. Integer id ultrices magna, in luctus elit. Sed a pellentesque
est.\n\n
Aenean nunc velit, lacinia sed dolor sed, ultrices viverra nulla. Etiam a venenatis nibh.
Morbi laoreet, tortor sed facilisis varius, nibh orci rhoncus nulla, id elementum leo dui
non lorem. Nam mollis ipsum quis auctor varius. Quisque elementum eu libero sed commodo. In
eros nisl, imperdiet vel imperdiet et, scelerisque a mauris. Pellentesque varius ex nunc,
quis imperdiet eros placerat ac. Duis finibus orci et est auctor tincidunt. Sed non viverra
ipsum. Nunc quis augue egestas, cursus lorem at, molestie sem. Morbi a consectetur ipsum, a
placerat diam. Etiam vulputate dignissim convallis. Integer faucibus mauris sit amet finibus
convallis.\n\n
Phasellus in aliquet mi. Pellentesque habitant morbi tristique senectus et netus et
malesuada fames ac turpis egestas. In volutpat arcu ut felis sagittis, in finibus massa
gravida. Pellentesque id tellus orci. Integer dictum, lorem sed efficitur ullamcorper,
libero justo consectetur ipsum, in mollis nisl ex sed nisl. Donec maximus ullamcorper
sodales. Praesent bibendum rhoncus tellus nec feugiat. In a ornare nulla. Donec rhoncus
libero vel nunc consequat, quis tincidunt nisl eleifend. Cras bibendum enim a justo luctus
vestibulum. Fusce dictum libero quis erat maximus, vitae volutpat diam dignissim.
</string>
</resources>

0 comments on commit 6abcac3

Please sign in to comment.