Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More pages #18

Merged
merged 5 commits into from
Apr 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,27 @@
android:supportsRtl="true"
android:theme="@style/Theme.Modarb"
tools:targetApi="31">
<activity
android:name=".ui.menu.activities.NotificationActivity"
android:exported="false" />
<activity
android:name=".ui.menu.activities.SettingActivity"
android:exported="false" />
<activity
android:name=".ui.menu.activities.AppAppearanceActivity"
android:exported="false" />
<activity
android:name=".ui.menu.activities.MenuActivity"
android:exported="false" />
<activity
android:name=".ui.menu.activities.EditProfileActivity"
android:exported="false" />
<activity
android:name=".ui.menu.activities.ProfileActivity"
android:exported="false" />
<activity
android:name=".ui.menu.activities.ReminderActivity"
android:exported="false" />
<!-- <activity-->
<!-- android:name=".ui.workout.activites.ExcersiceInfoActivity"-->
<!-- android:exported="false" />-->
Expand Down
9 changes: 9 additions & 0 deletions app/src/main/java/com/modarb/android/ui/home/HomeActivity.kt
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
package com.modarb.android.ui.home

import android.content.Intent
import android.os.Bundle
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import androidx.navigation.findNavController
import androidx.navigation.ui.setupWithNavController
import com.modarb.android.R
import com.modarb.android.databinding.ActivityHomeBinding
import com.modarb.android.ui.menu.activities.NotificationActivity


class HomeActivity : AppCompatActivity() {
Expand All @@ -31,5 +34,11 @@ class HomeActivity : AppCompatActivity() {


navView.setupWithNavController(navController)

val imageView = findViewById<View>(R.id.notificationBtn)
imageView.setOnClickListener {
val intent = Intent(this, NotificationActivity::class.java)
startActivity(intent)
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
package com.modarb.android.ui.menu.activities

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import android.widget.CheckBox
import com.modarb.android.R

class AppAppearanceActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_app_appearance)

val imageView = findViewById<View>(R.id.backButton)
imageView.setOnClickListener {
val intent = Intent(this, SettingActivity::class.java)
startActivity(intent)
}


val checkBoxSystemDefault = findViewById<CheckBox>(R.id.checkBoxSystemDefault)
val checkBoxLightTheme = findViewById<CheckBox>(R.id.checkBoxLightTheme)
val checkBoxDarkTheme = findViewById<CheckBox>(R.id.checkBoxDarkTheme)

checkBoxSystemDefault.setOnClickListener {
if (checkBoxSystemDefault.isChecked) {
checkBoxLightTheme.isChecked = false
checkBoxDarkTheme.isChecked = false
checkBoxSystemDefault.setButtonDrawable(R.drawable.theme_checkbox)
} else {
checkBoxSystemDefault.buttonDrawable = null
}
}

checkBoxLightTheme.setOnClickListener {
if (checkBoxLightTheme.isChecked) {
checkBoxSystemDefault.isChecked = false
checkBoxDarkTheme.isChecked = false
checkBoxLightTheme.setButtonDrawable(R.drawable.theme_checkbox)
} else {
checkBoxLightTheme.buttonDrawable = null
}
}

checkBoxDarkTheme.setOnClickListener {
if (checkBoxDarkTheme.isChecked) {
checkBoxSystemDefault.isChecked = false
checkBoxLightTheme.isChecked = false
checkBoxDarkTheme.setButtonDrawable(R.drawable.theme_checkbox)
} else {
checkBoxDarkTheme.buttonDrawable = null
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package com.modarb.android.ui.menu.activities

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.ArrayAdapter
import android.widget.Button
import android.widget.ListView
import androidx.appcompat.app.AlertDialog
import com.modarb.android.R

class EditProfileActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_edit_profile)

val genderButton: Button = findViewById(R.id.genderButton)
val genders = arrayOf("Male", "Female")

genderButton.setOnClickListener {
val builder = AlertDialog.Builder(this)
builder.setTitle("Select Gender")
val listView = ListView(this)
listView.adapter = ArrayAdapter(this, android.R.layout.simple_list_item_1, genders)
builder.setView(listView)

val dialog = builder.create()
dialog.show()

listView.setOnItemClickListener { _, _, position, _ ->
val selectedGender = genders[position]
genderButton.text = selectedGender
dialog.dismiss()
}
}


val startButton: Button = findViewById(R.id.startButton)

startButton.setOnClickListener {
startActivity(Intent(this, ProfileActivity::class.java))
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.modarb.android.ui.menu.activities

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import com.modarb.android.R

class MenuActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_menu)

val cardView = findViewById<View>(R.id.cardView)
cardView.setOnClickListener {
startActivity(Intent(this, ProfileActivity::class.java))
}
val cardView2 = findViewById<View>(R.id.cardView5)
cardView2.setOnClickListener {
startActivity(Intent(this, ReminderActivity::class.java))
}
val cardView3 = findViewById<View>(R.id.cardView6)
cardView3.setOnClickListener {
startActivity(Intent(this, SettingActivity::class.java))
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.modarb.android.ui.menu.activities

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import com.modarb.android.R
import com.modarb.android.ui.home.HomeActivity

class NotificationActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_notification)

val imageView = findViewById<View>(R.id.backButton)
imageView.setOnClickListener {
val intent = Intent(this, HomeActivity::class.java)
startActivity(intent)
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.modarb.android.ui.menu.activities

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import com.modarb.android.R

class ProfileActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_profile)

val editTextView = findViewById<View>(R.id.editTextView)
editTextView.setOnClickListener {
val intent = Intent(this, EditProfileActivity::class.java)
startActivity(intent)
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
package com.modarb.android.ui.menu.activities

import android.content.Intent
import android.content.res.ColorStateList
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import androidx.core.content.ContextCompat
import androidx.appcompat.widget.SwitchCompat
import com.modarb.android.R

class ReminderActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_reminder)

val imageView = findViewById<View>(R.id.backButton)
imageView.setOnClickListener {
val intent = Intent(this, MenuActivity::class.java)
startActivity(intent)
}

val mealsSwitch: SwitchCompat = findViewById(R.id.mealsSwitch)
val workoutSwitch: SwitchCompat = findViewById(R.id.workoutSwitch)
val challengesSwitch: SwitchCompat = findViewById(R.id.challengesSwitch)
val feedPostsSwitch: SwitchCompat = findViewById(R.id.feedPostsSwitch)


mealsSwitch.setOnCheckedChangeListener { _, isChecked ->
if (isChecked) {
mealsSwitch.trackTintList = ColorStateList.valueOf(ContextCompat.getColor(this, R.color.green))
} else {
mealsSwitch.trackTintList = ColorStateList.valueOf(ContextCompat.getColor(this, R.color.gray_75))
}
}

workoutSwitch.setOnCheckedChangeListener { _, isChecked ->
if (isChecked) {
workoutSwitch.trackTintList = ColorStateList.valueOf(ContextCompat.getColor(this, R.color.green))
} else {
workoutSwitch.trackTintList = ColorStateList.valueOf(ContextCompat.getColor(this, R.color.gray_75))
}
}

challengesSwitch.setOnCheckedChangeListener { _, isChecked ->
if (isChecked) {
challengesSwitch.trackTintList = ColorStateList.valueOf(ContextCompat.getColor(this, R.color.green))
} else {
challengesSwitch.trackTintList = ColorStateList.valueOf(ContextCompat.getColor(this, R.color.gray_75))
}
}

feedPostsSwitch.setOnCheckedChangeListener { _, isChecked ->
if (isChecked) {
feedPostsSwitch.trackTintList = ColorStateList.valueOf(ContextCompat.getColor(this, R.color.green))
} else {
feedPostsSwitch.trackTintList = ColorStateList.valueOf(ContextCompat.getColor(this, R.color.gray_75))
}
}

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.modarb.android.ui.menu.activities

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import com.modarb.android.R

class SettingActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_setting)

val imageView = findViewById<View>(R.id.backButton)
imageView.setOnClickListener {
val intent = Intent(this, MenuActivity::class.java)
startActivity(intent)
}
val cardView = findViewById<View>(R.id.appAppearanceCardView)
cardView.setOnClickListener {
startActivity(Intent(this, AppAppearanceActivity::class.java))
}
}
}
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/logout_ic.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="28dp"
android:height="28dp"
android:viewportWidth="28"
android:viewportHeight="28">
<path
android:pathData="M2.334,7.584C2.334,4.684 4.684,2.334 7.584,2.334H14.001C16.578,2.334 18.667,4.423 18.667,7.001V8.167C18.667,8.812 18.145,9.334 17.501,9.334C16.856,9.334 16.334,8.812 16.334,8.167V7.001C16.334,5.712 15.289,4.667 14.001,4.667H7.584C5.973,4.667 4.667,5.973 4.667,7.584V20.417C4.667,22.028 5.973,23.334 7.584,23.334H14.001C15.289,23.334 16.334,22.289 16.334,21.001V19.834C16.334,19.19 16.856,18.667 17.501,18.667C18.145,18.667 18.667,19.19 18.667,19.834V21.001C18.667,23.578 16.578,25.667 14.001,25.667H7.584C4.684,25.667 2.334,23.317 2.334,20.417V7.584ZM21.342,9.676C21.798,9.22 22.537,9.22 22.992,9.676L26.492,13.176C26.948,13.631 26.948,14.37 26.492,14.826L22.992,18.326C22.537,18.781 21.798,18.781 21.342,18.326C20.887,17.87 20.887,17.131 21.342,16.676L22.851,15.167H12.834C12.19,15.167 11.667,14.645 11.667,14.001C11.667,13.356 12.19,12.834 12.834,12.834H22.851L21.342,11.326C20.887,10.87 20.887,10.131 21.342,9.676Z"
android:fillColor="#F0EBFF"
android:fillType="evenOdd"/>
</vector>
Binary file added app/src/main/res/drawable/notifications_icon1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions app/src/main/res/drawable/notifications_icon2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="58dp"
android:height="50dp"
android:viewportWidth="58"
android:viewportHeight="50">
<path
android:pathData="M29,50C45.016,50 58,38.807 58,25C58,11.193 45.016,0 29,0C12.984,0 0,11.193 0,25C0,38.807 12.984,50 29,50Z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="29"
android:startY="50"
android:endX="29"
android:endY="0"
android:type="linear">
<item android:offset="0" android:color="#FF5E35E8"/>
<item android:offset="0.49" android:color="#FF7F8A8E"/>
<item android:offset="1" android:color="#FF7F8A8E"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M29.004,40.058C23.136,40.058 18.359,35.94 18.359,30.881C18.359,25.881 23.136,21.764 29.004,21.764C34.872,21.764 39.649,25.881 39.649,30.881C39.649,35.94 34.872,40.058 29.004,40.058ZM29.004,37.293C24.91,37.293 21.498,34.411 21.498,30.823C21.498,27.293 24.842,24.411 29.004,24.411C33.166,24.411 36.51,27.293 36.51,30.823C36.51,34.411 33.166,37.293 29.004,37.293ZM29.004,25.234C25.456,25.234 22.522,27.764 22.522,30.823C22.522,33.94 25.456,36.47 29.004,36.47C32.552,36.47 35.486,33.94 35.486,30.823C35.486,27.764 32.621,25.234 29.004,25.234ZM26.343,34.822C26.206,34.822 26.138,34.822 26.07,34.764C25.865,34.646 25.797,34.47 25.865,34.234L26.821,31.881L24.432,30.411C24.228,30.293 24.159,30.117 24.228,29.881C24.296,29.705 24.501,29.587 24.774,29.587H27.639L28.526,27.175C28.595,26.999 28.799,26.881 29.004,26.881C29.277,26.881 29.413,26.999 29.482,27.175L30.437,29.587H33.371C33.576,29.587 33.781,29.705 33.849,29.881C33.917,30.058 33.849,30.234 33.644,30.411L31.256,31.881L32.211,34.234C32.279,34.411 32.211,34.646 32.075,34.764C31.87,34.822 31.665,34.881 31.461,34.764L29.004,33.234L26.616,34.705C26.548,34.764 26.479,34.822 26.343,34.822ZM29.004,32.293C29.141,32.293 29.209,32.293 29.277,32.352L30.71,33.234L30.164,31.823C30.096,31.646 30.164,31.411 30.369,31.293L31.733,30.411H30.028C29.823,30.411 29.618,30.293 29.55,30.117L29.004,28.705L28.458,30.117C28.39,30.293 28.185,30.411 27.981,30.411H26.206L27.639,31.293C27.844,31.411 27.912,31.587 27.844,31.823L27.298,33.234L28.663,32.352C28.799,32.293 28.868,32.293 29.004,32.293Z"
android:fillColor="#ffffff"
android:fillType="evenOdd"/>
<path
android:pathData="M23.607,22.06L21.424,15.707H21.492H25.927L27.565,21.001C26.2,21.119 24.836,21.531 23.607,22.06Z"
android:fillColor="#ffffff"
android:fillType="evenOdd"/>
<path
android:pathData="M30.503,21.001L32.072,15.707H36.508H36.644L34.392,22.06C33.232,21.531 31.868,21.178 30.503,21.001Z"
android:fillColor="#ffffff"
android:fillType="evenOdd"/>
<path
android:pathData="M36.5,14.941H21.488C21.215,14.941 21.011,14.706 21.011,14.471V11.647C21.011,10.706 21.898,9.941 22.99,9.941H34.999C36.091,9.941 36.978,10.706 36.978,11.647V14.471C36.978,14.706 36.773,14.941 36.5,14.941Z"
android:fillColor="#ffffff"
android:fillType="evenOdd"/>
<path
android:pathData="M45.443,40.06H12.554C12.281,40.06 12.008,39.884 12.008,39.648C12.008,39.354 12.281,39.178 12.554,39.178H45.443C45.716,39.178 45.989,39.354 45.989,39.648C45.989,39.884 45.716,40.06 45.443,40.06Z"
android:fillColor="#ffffff"
android:fillType="evenOdd"/>
</vector>
Binary file added app/src/main/res/drawable/notifications_icon3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions app/src/main/res/drawable/theme_checkbox.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="50dp"
android:height="28dp"
android:viewportWidth="50"
android:viewportHeight="28">
<path
android:strokeWidth="1"
android:pathData="M9,3L23,3A4.5,4.5 0,0 1,27.5 7.5L27.5,21.5A4.5,4.5 0,0 1,23 26L9,26A4.5,4.5 0,0 1,4.5 21.5L4.5,7.5A4.5,4.5 0,0 1,9 3z"
android:fillColor="#00000000"
android:strokeColor="#FFFFFF" />
<path
android:pathData="M29.519,0.615C29.827,1.009 30,1.543 30,2.1C30,2.657 29.827,3.191 29.519,3.584L16.364,20.385C16.056,20.779 15.637,21 15.201,21C14.765,21 14.347,20.779 14.039,20.385L7.462,11.985C7.162,11.589 6.996,11.058 7,10.508C7.004,9.957 7.177,9.43 7.482,9.041C7.786,8.651 8.199,8.431 8.63,8.426C9.061,8.421 9.477,8.633 9.787,9.015L15.201,15.931L27.194,0.615C27.502,0.221 27.92,0 28.356,0C28.792,0 29.21,0.221 29.519,0.615Z"
android:fillColor="#6739FF"
android:fillType="evenOdd" />
</vector>
Loading
Loading