commit 43e41df6280ba61f9ed2106058d12d92f0ad20af Author: Sewmina (server) Date: Sat Nov 30 12:12:49 2024 +0800 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..aa724b7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx +local.properties diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..eaf91e2 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..8fabff5 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/deploymentTargetSelector.xml b/.idea/deploymentTargetSelector.xml new file mode 100644 index 0000000..0d46093 --- /dev/null +++ b/.idea/deploymentTargetSelector.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml new file mode 100644 index 0000000..0b0534c --- /dev/null +++ b/.idea/gradle.xml @@ -0,0 +1,19 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/migrations.xml b/.idea/migrations.xml new file mode 100644 index 0000000..48052b2 --- /dev/null +++ b/.idea/migrations.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..8978d23 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/other.xml b/.idea/other.xml new file mode 100644 index 0000000..aa26ad1 --- /dev/null +++ b/.idea/other.xml @@ -0,0 +1,329 @@ + + + + + + \ No newline at end of file diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts new file mode 100644 index 0000000..1b7cd64 --- /dev/null +++ b/app/build.gradle.kts @@ -0,0 +1,44 @@ +plugins { + alias(libs.plugins.android.application) +} + +android { + namespace = "com.example.habittracker" + compileSdk = 34 + + defaultConfig { + applicationId = "com.example.habittracker" + minSdk = 34 + targetSdk = 34 + versionCode = 1 + versionName = "1.0" + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } +} + +dependencies { + + implementation(libs.appcompat) + implementation(libs.material) + implementation(libs.activity) + implementation(libs.constraintlayout) + implementation("androidx.work:work-runtime:2.9.1") + testImplementation(libs.junit) + androidTestImplementation(libs.ext.junit) + androidTestImplementation(libs.espresso.core) +} \ No newline at end of file diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..9436299 --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/java/Database/DatabaseHelper.java b/app/src/main/java/Database/DatabaseHelper.java new file mode 100644 index 0000000..943359a --- /dev/null +++ b/app/src/main/java/Database/DatabaseHelper.java @@ -0,0 +1,135 @@ +package Database; + +import static android.util.Log.println; + +import android.content.ContentValues; +import android.content.Context; +import android.database.Cursor; +import android.database.sqlite.SQLiteDatabase; +import android.database.sqlite.SQLiteOpenHelper; +import android.util.Log; +import androidx.annotation.Nullable; + +import java.util.ArrayList; +import java.util.List; + +import Model.Habit; +import Model.User; + +public class DatabaseHelper extends SQLiteOpenHelper { + + + public static final String USER_TABLE = "USER_TABLE"; + public static final String HABIT_TABLE = "HABIT_TABLE"; + public static final String COLUMN_USER_ID = "USER_ID"; + public static final String COLUMN_USERNAME = "USERNAME"; + public static final String COLUMN_PASSWORD = "PASSWORD"; + public static final String COLUMN_HABIT_ID = "HABIT_ID"; + public static final String COLUMN_HABIT_NAME = "HABIT_NAME"; + public static final String COLUMN_HABIT_TIME = "TIME"; + + public DatabaseHelper(@Nullable Context context) { + super(context, "HabitTracker.db", null, 2); + } + + @Override + public void onCreate(SQLiteDatabase sqLiteDatabase) { + String createUserTable = "CREATE TABLE " + USER_TABLE + " " + + "(" + COLUMN_USER_ID + " TEXT PRIMARY KEY, " + COLUMN_USERNAME + " TEXT, " + COLUMN_PASSWORD + " TEXT)"; + + String createHabitTable = "CREATE TABLE " + HABIT_TABLE + " " + + "(" + COLUMN_HABIT_ID + " TEXT PRIMARY KEY, " + + COLUMN_USER_ID + " TEXT, " + + COLUMN_HABIT_NAME + " TEXT, " + + COLUMN_HABIT_TIME + " TEXT, " + + "FOREIGN KEY(" + COLUMN_USER_ID + ") REFERENCES " + USER_TABLE + "(" + COLUMN_USER_ID + "))"; + + + sqLiteDatabase.execSQL(createUserTable); + sqLiteDatabase.execSQL(createHabitTable); + } + + @Override + public void onUpgrade(SQLiteDatabase sqLiteDatabase, int oldVersion, int newVersion) { + if(oldVersion < 2) { + String addHabitColumn = "ALTER TABLE " + HABIT_TABLE + " ADD COLUMN " + COLUMN_HABIT_TIME + " TEXT"; + sqLiteDatabase.execSQL(addHabitColumn); + } + } + + public boolean createAccount(User user) { + SQLiteDatabase db = this.getWritableDatabase(); + ContentValues cv = new ContentValues(); + + cv.put(COLUMN_USER_ID, user.getUserId()); + cv.put(COLUMN_USERNAME, user.getUsername()); + cv.put(COLUMN_PASSWORD, user.getPassword()); + + long insert = db.insert(USER_TABLE, null, cv); + return insert != -1; + } + + public User login(String username, String password) { + SQLiteDatabase db = this.getReadableDatabase(); + User user = new User(); + String query = "SELECT * FROM " + USER_TABLE + " WHERE " + COLUMN_USERNAME + " = ? AND " + COLUMN_PASSWORD + " = ?"; + String[] selectionArgs = {username, password}; + try (Cursor cursor = db.rawQuery(query, selectionArgs)) { + + println(Log.DEBUG, "username provided: ", username); + + if (cursor.moveToFirst()) { + String userId = cursor.getString(0); + user.setUserId(userId); + user.setUsername(username); + user.setPassword(password); + + return user; + } else { + return null; + } + } + } + + public boolean createHabit(Habit habit) { + SQLiteDatabase db = this.getWritableDatabase(); + ContentValues cv = new ContentValues(); + + cv.put(COLUMN_HABIT_ID, habit.getHabitId()); + cv.put(COLUMN_USER_ID, habit.getUserId()); + cv.put(COLUMN_HABIT_NAME, habit.getHabitName()); + cv.put(COLUMN_HABIT_TIME, habit.getTime()); + + long insert = db.insert(HABIT_TABLE, null, cv); + return insert != -1; + } + + public ArrayList getAllHabits(String userId) { + ArrayList habitList = new ArrayList<>(); + SQLiteDatabase db = this.getReadableDatabase(); + + // Define the query + String query = "SELECT * FROM " + HABIT_TABLE + " WHERE " + COLUMN_USER_ID + " = ?"; + String[] selectionArgs = {userId}; + Cursor cursor = db.rawQuery(query, selectionArgs); + + // Loop through the cursor and populate the list + if (cursor.moveToFirst()) { + do { + String habitName = cursor.getString(cursor.getColumnIndexOrThrow(COLUMN_HABIT_NAME)); + String time = cursor.getString(cursor.getColumnIndexOrThrow(COLUMN_HABIT_TIME)); + + // Create a new Habit object and add it to the list + Habit habit = new Habit(habitName, time); + habitList.add(habit); + } while (cursor.moveToNext()); + } + + // Close the cursor and database + cursor.close(); + db.close(); + + return habitList; + } + +} diff --git a/app/src/main/java/Model/Habit.java b/app/src/main/java/Model/Habit.java new file mode 100644 index 0000000..68171b4 --- /dev/null +++ b/app/src/main/java/Model/Habit.java @@ -0,0 +1,49 @@ +package Model; + +import java.util.UUID; + +public class Habit { + private String habitId; + private String userId; + private String habitName; + private String time; + + public Habit(String userId, String habitName, String time) { + this.habitId = UUID.randomUUID().toString(); + this.userId = userId; + this.habitName = habitName; + this.time = time; + } + + //second constructor for fetching habits + public Habit(String name, String time) { + this.habitName = name; + this.time = time; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public void setHabitName(String habitName) { + this.habitName = habitName; + } + + public void setTime(String time) { + this.time = time; + } + + public String getHabitId() { + return habitId; + } + + public String getUserId() { + return userId; + } + + public String getHabitName() { + return habitName; + } + + public String getTime() { return time; } +} diff --git a/app/src/main/java/Model/User.java b/app/src/main/java/Model/User.java new file mode 100644 index 0000000..e75ef8f --- /dev/null +++ b/app/src/main/java/Model/User.java @@ -0,0 +1,41 @@ +package Model; + +import java.util.UUID; + +public class User { + private String userId; + private String username; + private String password; + + public User(String username, String password) { + this.userId = UUID.randomUUID().toString(); + this.username = username; + this.password = password; + } + + //No parameter constructor + public User() { }; + + public void setUsername(String username) { + this.username = username; + } + + public void setPassword(String password) { + this.password = password; + } + + public void setUserId(String userId) {this.userId = userId; } + + public String getUserId() { + return userId; + } + + public String getUsername() { + return username; + } + + public String getPassword() { + return password; + } + +} diff --git a/app/src/main/java/View/AddHabit.java b/app/src/main/java/View/AddHabit.java new file mode 100644 index 0000000..945e3aa --- /dev/null +++ b/app/src/main/java/View/AddHabit.java @@ -0,0 +1,89 @@ +package View; + +import static android.app.PendingIntent.getActivity; + +import android.annotation.SuppressLint; +import android.app.TimePickerDialog; +import android.os.Bundle; +import android.widget.Button; +import android.widget.EditText; +import android.widget.TextView; +import android.widget.Toast; + +import androidx.activity.EdgeToEdge; +import androidx.appcompat.app.AppCompatActivity; +import androidx.core.graphics.Insets; +import androidx.core.view.ViewCompat; +import androidx.core.view.WindowInsetsCompat; + +import com.example.habittracker.R; + +import java.util.Calendar; + +import Database.DatabaseHelper; +import Model.Habit; + +public class AddHabit extends AppCompatActivity { + Button timePicker; + TextView selectedTimeTv; + EditText newHabitEt; + String selectedTime; + DatabaseHelper db; + Button addHabitBtn; + Button backBtn; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + EdgeToEdge.enable(this); + setContentView(R.layout.activity_add_habit); + 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; + }); + + timePicker = findViewById(R.id.time_picker); + addHabitBtn = findViewById(R.id.add_new_habit_btn); + backBtn = findViewById(R.id.back_btn); + selectedTimeTv = findViewById(R.id.selected_time_tv); + newHabitEt = findViewById(R.id.new_habit_et); + db = new DatabaseHelper(AddHabit.this); + + timePicker.setOnClickListener(v -> { + Calendar calendar = Calendar.getInstance(); + int hour = calendar.get(Calendar.HOUR_OF_DAY); + int minute = calendar.get(Calendar.MINUTE); + + // Show TimePickerDialog + @SuppressLint("DefaultLocale") TimePickerDialog timePickerDialog = new TimePickerDialog( + AddHabit.this, + (view, hourOfDay, minuteOfHour) -> { + // Update the TextView with the selected time + selectedTime = String.format("%02d:%02d", hourOfDay, minuteOfHour); + selectedTimeTv.setText(selectedTime); + }, + hour, + minute, + true // Set to true for 24-hour format, false for AM/PM + ); + timePickerDialog.show(); + }); + + addHabitBtn.setOnClickListener(v -> { + boolean result = db.createHabit(new Habit(HomeActivity.userId, newHabitEt.getText().toString(), selectedTime)); + if(result) { + Toast.makeText(this, "Habit added successfully", Toast.LENGTH_SHORT).show(); + }else { + Toast.makeText(this, "Error adding habit", Toast.LENGTH_SHORT).show(); + } + }); + + backBtn.setOnClickListener(v -> { + finish(); + }); + } + + + +} diff --git a/app/src/main/java/View/CreateAccountActivity.java b/app/src/main/java/View/CreateAccountActivity.java new file mode 100644 index 0000000..b5341dd --- /dev/null +++ b/app/src/main/java/View/CreateAccountActivity.java @@ -0,0 +1,85 @@ +package View; + +import static android.util.Log.println; + +import android.os.Bundle; +import android.util.Log; +import android.widget.Button; +import android.widget.EditText; +import android.widget.Toast; + +import androidx.activity.EdgeToEdge; +import androidx.appcompat.app.AppCompatActivity; +import androidx.core.graphics.Insets; +import androidx.core.view.ViewCompat; +import androidx.core.view.WindowInsetsCompat; + +import com.example.habittracker.R; + +import Database.DatabaseHelper; +import Model.User; + +public class CreateAccountActivity extends AppCompatActivity { + + EditText usernameEt; + EditText passwordEt; + Button createAccountBtn; + Button backBtn; + DatabaseHelper db; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + EdgeToEdge.enable(this); + setContentView(R.layout.activity_create_account); + 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; + }); + + usernameEt = findViewById(R.id.username_et); + passwordEt = findViewById(R.id.password_et); + createAccountBtn = findViewById(R.id.create_account_btn); + backBtn = findViewById(R.id.back_btn); + db = new DatabaseHelper(CreateAccountActivity.this); + + createAccountBtn.setOnClickListener(v -> { + //Test + println(Log.DEBUG, "username: ", usernameEt.getText().toString()); + println(Log.DEBUG, "password: ", passwordEt.getText().toString()); + + //User creation + if(formValidate()) { + //Logic to create the user and store in the DB + User user = new User(usernameEt.getText().toString(), passwordEt.getText().toString()); + + try { + boolean result = db.createAccount(user); + Toast.makeText(this, "Account creation successful = " + result, Toast.LENGTH_SHORT).show(); + + }catch (Exception e) { + Toast.makeText(this, "Error creating account", Toast.LENGTH_SHORT).show(); + } + } + }); + + + backBtn.setOnClickListener(v -> { + //Go back to login + finish(); + }); + + + } + + //Method for form validation + private boolean formValidate() { + + if (usernameEt.getText().toString().isEmpty()|| passwordEt.getText().toString().isEmpty()) { + Toast.makeText(this, "Please fill in all fields", Toast.LENGTH_SHORT).show(); + return false; + } + return true; + } +} \ No newline at end of file diff --git a/app/src/main/java/View/HomeActivity.java b/app/src/main/java/View/HomeActivity.java new file mode 100644 index 0000000..db69172 --- /dev/null +++ b/app/src/main/java/View/HomeActivity.java @@ -0,0 +1,119 @@ +package View; + +import static android.util.Log.println; + +import android.content.Intent; +import android.graphics.Color; +import android.os.Bundle; +import android.util.Log; +import android.widget.Button; +import android.widget.CheckBox; +import android.widget.ImageButton; +import android.widget.LinearLayout; +import android.widget.TextView; + +import androidx.activity.EdgeToEdge; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AppCompatActivity; +import androidx.core.graphics.Insets; +import androidx.core.view.ViewCompat; +import androidx.core.view.WindowInsetsCompat; + +import com.example.habittracker.R; + +import java.util.List; + +import Database.DatabaseHelper; +import Model.Habit; + +public class HomeActivity extends AppCompatActivity { + + String username; + String password; + public static String userId; + TextView user_greeting_tv; + Button addHabitButton; + DatabaseHelper db; + List habitList; + LinearLayout parentLayout; + ImageButton refreshBtn; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + EdgeToEdge.enable(this); + setContentView(R.layout.activity_home); + 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; + }); + + + user_greeting_tv = findViewById(R.id.user_greating_tv); + addHabitButton = findViewById(R.id.add_habit); + refreshBtn = findViewById(R.id.refresh_btn); + userId = getIntent().getStringExtra("UserId"); + username = getIntent().getStringExtra("Username"); + password = getIntent().getStringExtra("Password"); + db = new DatabaseHelper(HomeActivity.this); + habitList = db.getAllHabits(userId); + parentLayout = findViewById(R.id.habits_list); + + user_greeting_tv.setText(String.format("Hello, %s", username)); + + addHabitButton.setOnClickListener(v -> { + startActivity(new Intent(this, AddHabit.class)); + + }); + + refreshBtn.setOnClickListener(v -> { + habitList = db.getAllHabits(userId); + parentLayout.removeAllViews(); + displayHabits(); + }); + + displayHabits(); + + } + + private void displayHabits() { + for (Habit habit : habitList) { + println(Log.DEBUG, "Habit: ", habit.getHabitName()); + LinearLayout linearLayout = getLinearLayout(habit); + parentLayout.addView(linearLayout); + } + } + + private @NonNull LinearLayout getLinearLayout(Habit habit) { + LinearLayout linearLayout = new LinearLayout(this); + // Create LayoutParams with MATCH_PARENT for width and WRAP_CONTENT for height + LinearLayout.LayoutParams params = new LinearLayout.LayoutParams( + LinearLayout.LayoutParams.MATCH_PARENT, + LinearLayout.LayoutParams.WRAP_CONTENT + ); + linearLayout.setLayoutParams(params); + linearLayout.setOrientation(LinearLayout.HORIZONTAL); + linearLayout.setPadding(25, 25, 25, 25); + + CheckBox checkBox = new CheckBox(this); + checkBox.setPadding(40, 40, 40, 40); + + TextView habitTime = new TextView(this); + habitTime.setPadding(40, 40, 40, 40); + habitTime.setTextSize(20); + habitTime.setText(habit.getTime()); + habitTime.setTextColor(Color.parseColor("#e2e2e2")); + + TextView habitName = new TextView(this); + habitName.setPadding(40, 40, 40, 40); + habitName.setTextSize(20); + habitName.setText(habit.getHabitName()); + habitName.setTextColor(Color.parseColor("#e2e2e2")); + + linearLayout.addView(checkBox); + linearLayout.addView(habitTime); + linearLayout.addView(habitName); + return linearLayout; + } +} \ No newline at end of file diff --git a/app/src/main/java/View/MainActivity.java b/app/src/main/java/View/MainActivity.java new file mode 100644 index 0000000..b58ea5b --- /dev/null +++ b/app/src/main/java/View/MainActivity.java @@ -0,0 +1,76 @@ +package View; + +import android.content.Intent; +import android.os.Bundle; +import android.widget.Button; +import android.widget.EditText; +import android.widget.TextView; +import android.widget.Toast; + +import androidx.activity.EdgeToEdge; +import androidx.appcompat.app.AppCompatActivity; +import androidx.core.graphics.Insets; +import androidx.core.view.ViewCompat; +import androidx.core.view.WindowInsetsCompat; + +import com.example.habittracker.R; + +import Database.DatabaseHelper; +import Model.User; + +public class MainActivity extends AppCompatActivity { + + Button loginBtn; + EditText usernameEt; + EditText passwordEt; + TextView createAccountTv; + DatabaseHelper db; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + EdgeToEdge.enable(this); + setContentView(R.layout.activity_main); + 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; + }); + + loginBtn = findViewById(R.id.login_btn); + usernameEt = findViewById(R.id.username_et); + passwordEt = findViewById(R.id.password_et); + createAccountTv = findViewById(R.id.create_account_tv); + db = new DatabaseHelper(MainActivity.this); + + //Opens create Account activity + createAccountTv.setOnClickListener(v -> { + Intent intent = new Intent(this, CreateAccountActivity.class); + startActivity(intent); + }); + + + loginBtn.setOnClickListener(v -> { + if (usernameEt.getText().toString().isEmpty() || passwordEt.getText().toString().isEmpty()) { + Toast.makeText(this, "Please enter the credentials", Toast.LENGTH_SHORT).show(); + } else { + User user = login(); + if(user != null) { + Toast.makeText(this, "Authentication Success!", Toast.LENGTH_SHORT).show(); + Intent intent = new Intent(this, HomeActivity.class); + intent.putExtra("UserId", user.getUserId()); + intent.putExtra("Username", user.getUsername()); + intent.putExtra("Password", user.getPassword()); + startActivity(intent); + }else { + Toast.makeText(this, "Authentication Failed!", Toast.LENGTH_SHORT).show(); + } + } + }); + + } + + private User login() { + return db.login(usernameEt.getText().toString(), passwordEt.getText().toString()); + } +} \ No newline at end of file diff --git a/app/src/main/res/drawable/add_icon.png b/app/src/main/res/drawable/add_icon.png new file mode 100644 index 0000000..2c750a3 Binary files /dev/null and b/app/src/main/res/drawable/add_icon.png differ diff --git a/app/src/main/res/drawable/checkbox_checked.png b/app/src/main/res/drawable/checkbox_checked.png new file mode 100644 index 0000000..b6c7f40 Binary files /dev/null and b/app/src/main/res/drawable/checkbox_checked.png differ diff --git a/app/src/main/res/drawable/checkbox_color.xml b/app/src/main/res/drawable/checkbox_color.xml new file mode 100644 index 0000000..f317008 --- /dev/null +++ b/app/src/main/res/drawable/checkbox_color.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/cornered_box.xml b/app/src/main/res/drawable/cornered_box.xml new file mode 100644 index 0000000..b5bf4b0 --- /dev/null +++ b/app/src/main/res/drawable/cornered_box.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/cornered_sublayer.xml b/app/src/main/res/drawable/cornered_sublayer.xml new file mode 100644 index 0000000..77065ec --- /dev/null +++ b/app/src/main/res/drawable/cornered_sublayer.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/habits_icon.png b/app/src/main/res/drawable/habits_icon.png new file mode 100644 index 0000000..1c6ff7b Binary files /dev/null and b/app/src/main/res/drawable/habits_icon.png differ diff --git a/app/src/main/res/drawable/home_icon.png b/app/src/main/res/drawable/home_icon.png new file mode 100644 index 0000000..830d15a Binary files /dev/null and b/app/src/main/res/drawable/home_icon.png differ diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..07d5da9 --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/ic_launcher_foreground.xml b/app/src/main/res/drawable/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b068d1 --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/menu_bar.xml b/app/src/main/res/drawable/menu_bar.xml new file mode 100644 index 0000000..ac1dde5 --- /dev/null +++ b/app/src/main/res/drawable/menu_bar.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/profile_icon.png b/app/src/main/res/drawable/profile_icon.png new file mode 100644 index 0000000..d7fb26b Binary files /dev/null and b/app/src/main/res/drawable/profile_icon.png differ diff --git a/app/src/main/res/drawable/refresh_icon.png b/app/src/main/res/drawable/refresh_icon.png new file mode 100644 index 0000000..5a5b716 Binary files /dev/null and b/app/src/main/res/drawable/refresh_icon.png differ diff --git a/app/src/main/res/drawable/user.png b/app/src/main/res/drawable/user.png new file mode 100644 index 0000000..baf45ff Binary files /dev/null and b/app/src/main/res/drawable/user.png differ diff --git a/app/src/main/res/drawable/user2.png b/app/src/main/res/drawable/user2.png new file mode 100644 index 0000000..bbdaeb4 Binary files /dev/null and b/app/src/main/res/drawable/user2.png differ diff --git a/app/src/main/res/font/inter_black.ttf b/app/src/main/res/font/inter_black.ttf new file mode 100644 index 0000000..89673de Binary files /dev/null and b/app/src/main/res/font/inter_black.ttf differ diff --git a/app/src/main/res/font/inter_bold.ttf b/app/src/main/res/font/inter_bold.ttf new file mode 100644 index 0000000..cd13f60 Binary files /dev/null and b/app/src/main/res/font/inter_bold.ttf differ diff --git a/app/src/main/res/font/inter_regular.ttf b/app/src/main/res/font/inter_regular.ttf new file mode 100644 index 0000000..6b088a7 Binary files /dev/null and b/app/src/main/res/font/inter_regular.ttf differ diff --git a/app/src/main/res/font/roboto.ttf b/app/src/main/res/font/roboto.ttf new file mode 100644 index 0000000..2d116d9 Binary files /dev/null and b/app/src/main/res/font/roboto.ttf differ diff --git a/app/src/main/res/layout/activity_add_habit.xml b/app/src/main/res/layout/activity_add_habit.xml new file mode 100644 index 0000000..1253175 --- /dev/null +++ b/app/src/main/res/layout/activity_add_habit.xml @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + +