Feat(main activity): Wireframing 1/2
This commit is contained in:
		@@ -4,12 +4,12 @@ plugins {
 | 
			
		||||
 | 
			
		||||
android {
 | 
			
		||||
    namespace 'com.example.coen390_assignment2'
 | 
			
		||||
    compileSdk 33
 | 
			
		||||
    compileSdk 34
 | 
			
		||||
 | 
			
		||||
    defaultConfig {
 | 
			
		||||
        applicationId "com.example.coen390_assignment2"
 | 
			
		||||
        minSdk 26
 | 
			
		||||
        targetSdk 33
 | 
			
		||||
        targetSdk 34
 | 
			
		||||
        versionCode 1
 | 
			
		||||
        versionName "1.0"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -13,7 +13,15 @@
 | 
			
		||||
        android:theme="@style/Theme.Coen390_assignment2"
 | 
			
		||||
        tools:targetApi="31">
 | 
			
		||||
        <activity
 | 
			
		||||
            android:name=".MainActivity"
 | 
			
		||||
            android:name=".Views.ProfileActivity"
 | 
			
		||||
            android:exported="false"
 | 
			
		||||
            android:parentActivityName=".Views.MainActivity">
 | 
			
		||||
            <meta-data
 | 
			
		||||
                android:name="android.support.PARENT_ACTIVITY"
 | 
			
		||||
                android:value=".Views.MainActivity" />
 | 
			
		||||
        </activity>
 | 
			
		||||
        <activity
 | 
			
		||||
            android:name=".Views.MainActivity"
 | 
			
		||||
            android:exported="true">
 | 
			
		||||
            <intent-filter>
 | 
			
		||||
                <action android:name="android.intent.action.MAIN" />
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,29 @@
 | 
			
		||||
package com.example.coen390_assignment2.Views;
 | 
			
		||||
 | 
			
		||||
import androidx.appcompat.app.AppCompatActivity;
 | 
			
		||||
import androidx.appcompat.widget.Toolbar;
 | 
			
		||||
 | 
			
		||||
import android.os.Bundle;
 | 
			
		||||
import android.view.Menu;
 | 
			
		||||
 | 
			
		||||
import com.example.coen390_assignment2.R;
 | 
			
		||||
 | 
			
		||||
public class MainActivity extends AppCompatActivity {
 | 
			
		||||
    @Override
 | 
			
		||||
    protected void onCreate(Bundle savedInstanceState) {
 | 
			
		||||
        super.onCreate(savedInstanceState);
 | 
			
		||||
        setContentView(R.layout.activity_main);
 | 
			
		||||
 | 
			
		||||
        // Initialize the ActionBar (Toolbar)
 | 
			
		||||
        Toolbar toolbar = findViewById(R.id.toolbar);
 | 
			
		||||
        setSupportActionBar(toolbar);
 | 
			
		||||
 | 
			
		||||
        toolbar.setSubtitle("New Subtitle Text !!!!!!!!!!!!!!");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public boolean onCreateOptionsMenu(Menu menu) {
 | 
			
		||||
        getMenuInflater().inflate(R.menu.settings_main_activity, menu);
 | 
			
		||||
        return true;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,14 +1,16 @@
 | 
			
		||||
package com.example.coen390_assignment2;
 | 
			
		||||
package com.example.coen390_assignment2.Views;
 | 
			
		||||
 | 
			
		||||
import androidx.appcompat.app.AppCompatActivity;
 | 
			
		||||
 | 
			
		||||
import android.os.Bundle;
 | 
			
		||||
 | 
			
		||||
public class MainActivity extends AppCompatActivity {
 | 
			
		||||
import com.example.coen390_assignment2.R;
 | 
			
		||||
 | 
			
		||||
public class ProfileActivity extends AppCompatActivity {
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    protected void onCreate(Bundle savedInstanceState) {
 | 
			
		||||
        super.onCreate(savedInstanceState);
 | 
			
		||||
        setContentView(R.layout.activity_main);
 | 
			
		||||
        setContentView(R.layout.activity_profile);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,18 +1,43 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
 | 
			
		||||
<RelativeLayout 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:layout_width="match_parent"
 | 
			
		||||
    android:layout_height="match_parent"
 | 
			
		||||
    tools:context=".MainActivity">
 | 
			
		||||
    tools:context=".Views.MainActivity">
 | 
			
		||||
 | 
			
		||||
    <TextView
 | 
			
		||||
    <androidx.appcompat.widget.Toolbar
 | 
			
		||||
        android:id="@+id/toolbar"
 | 
			
		||||
        android:layout_width="match_parent"
 | 
			
		||||
        android:layout_height="?attr/actionBarSize"
 | 
			
		||||
        android:background="?attr/colorPrimary"
 | 
			
		||||
        app:subtitle="Subtitle Text"
 | 
			
		||||
        app:subtitleTextColor="#FFFFFF"
 | 
			
		||||
        app:theme="@style/ThemeOverlay.AppCompat.ActionBar"
 | 
			
		||||
        app:title="Main Activity"
 | 
			
		||||
        app:titleTextColor="#FFFFFF" />
 | 
			
		||||
 | 
			
		||||
    <!-- Content Layout -->
 | 
			
		||||
    <LinearLayout
 | 
			
		||||
        android:layout_width="match_parent"
 | 
			
		||||
        android:layout_height="wrap_content"
 | 
			
		||||
        android:layout_gravity="center"
 | 
			
		||||
        android:layout_marginTop="64dp"
 | 
			
		||||
        android:orientation="vertical">
 | 
			
		||||
 | 
			
		||||
        <ListView
 | 
			
		||||
            android:id="@+id/profilesListView"
 | 
			
		||||
            android:layout_width="match_parent"
 | 
			
		||||
            android:layout_height="match_parent" />
 | 
			
		||||
    </LinearLayout>
 | 
			
		||||
 | 
			
		||||
    <!-- Action Button at the bottom right -->
 | 
			
		||||
    <Button
 | 
			
		||||
        android:id="@+id/actionButton"
 | 
			
		||||
        android:layout_width="wrap_content"
 | 
			
		||||
        android:layout_height="wrap_content"
 | 
			
		||||
        android:text="Hello World!"
 | 
			
		||||
        app:layout_constraintBottom_toBottomOf="parent"
 | 
			
		||||
        app:layout_constraintEnd_toEndOf="parent"
 | 
			
		||||
        app:layout_constraintStart_toStartOf="parent"
 | 
			
		||||
        app:layout_constraintTop_toTopOf="parent" />
 | 
			
		||||
 | 
			
		||||
</androidx.constraintlayout.widget.ConstraintLayout>
 | 
			
		||||
        android:layout_alignParentEnd="true"
 | 
			
		||||
        android:layout_alignParentBottom="true"
 | 
			
		||||
        android:layout_margin="16dp"
 | 
			
		||||
        android:text="@string/add_profile_text_action_button" />
 | 
			
		||||
</RelativeLayout>
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										9
									
								
								app/src/main/res/layout/activity_profile.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								app/src/main/res/layout/activity_profile.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
<?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:layout_width="match_parent"
 | 
			
		||||
    android:layout_height="match_parent"
 | 
			
		||||
    tools:context=".Views.ProfileActivity">
 | 
			
		||||
 | 
			
		||||
</androidx.constraintlayout.widget.ConstraintLayout>
 | 
			
		||||
							
								
								
									
										6
									
								
								app/src/main/res/menu/settings_main_activity.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								app/src/main/res/menu/settings_main_activity.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
 | 
			
		||||
    <item
 | 
			
		||||
        android:id="@+id/toggle_profiles_display_mode"
 | 
			
		||||
        android:title="@string/toggle_profiles_display_mode_text" />
 | 
			
		||||
</menu>
 | 
			
		||||
@@ -1,3 +1,5 @@
 | 
			
		||||
<resources>
 | 
			
		||||
    <string name="app_name">coen390_assignment2</string>
 | 
			
		||||
    <string name="add_profile_text_action_button">Add Profile</string>
 | 
			
		||||
    <string name="toggle_profiles_display_mode_text">By ID</string>
 | 
			
		||||
</resources>
 | 
			
		||||
		Reference in New Issue
	
	Block a user