diff --git a/app/.idea/codeStyles/Project.xml b/app/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..681f41a --- /dev/null +++ b/app/.idea/codeStyles/Project.xml @@ -0,0 +1,116 @@ + + + + + + + +
+ + + + xmlns:android + + ^$ + + + +
+
+ + + + xmlns:.* + + ^$ + + + BY_NAME + +
+
+ + + + .*:id + + http://schemas.android.com/apk/res/android + + + +
+
+ + + + .*:name + + http://schemas.android.com/apk/res/android + + + +
+
+ + + + name + + ^$ + + + +
+
+ + + + style + + ^$ + + + +
+
+ + + + .* + + ^$ + + + BY_NAME + +
+
+ + + + .* + + http://schemas.android.com/apk/res/android + + + ANDROID_ATTRIBUTE_ORDER + +
+
+ + + + .* + + .* + + + BY_NAME + +
+
+
+
+
+
\ No newline at end of file diff --git a/app/.idea/gradle.xml b/app/.idea/gradle.xml index bbad9a7..68fc285 100644 --- a/app/.idea/gradle.xml +++ b/app/.idea/gradle.xml @@ -1,8 +1,13 @@ + diff --git a/app/.idea/jarRepositories.xml b/app/.idea/jarRepositories.xml new file mode 100644 index 0000000..a5f05cd --- /dev/null +++ b/app/.idea/jarRepositories.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/.idea/misc.xml b/app/.idea/misc.xml index 1b6dac9..37a7509 100644 --- a/app/.idea/misc.xml +++ b/app/.idea/misc.xml @@ -1,6 +1,6 @@ - + diff --git a/app/.idea/runConfigurations.xml b/app/.idea/runConfigurations.xml new file mode 100644 index 0000000..7f68460 --- /dev/null +++ b/app/.idea/runConfigurations.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/app/.idea/vcs.xml b/app/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/app/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/app/src/main/java/com/abstractlion/appreciator/ui/dashboard/DashboardFragment.java b/app/app/src/main/java/com/abstractlion/appreciator/ui/dashboard/DashboardFragment.java index 0250336..dafe531 100644 --- a/app/app/src/main/java/com/abstractlion/appreciator/ui/dashboard/DashboardFragment.java +++ b/app/app/src/main/java/com/abstractlion/appreciator/ui/dashboard/DashboardFragment.java @@ -4,6 +4,9 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.widget.ImageButton; +import android.widget.LinearLayout; +import android.widget.ScrollView; import android.widget.TextView; import androidx.annotation.Nullable; import androidx.annotation.NonNull; @@ -20,14 +23,27 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { dashboardViewModel = ViewModelProviders.of(this).get(DashboardViewModel.class); - View root = inflater.inflate(R.layout.fragment_dashboard, container, false); - final TextView textView = root.findViewById(R.id.text_dashboard); - dashboardViewModel.getText().observe(this, new Observer() { - @Override - public void onChanged(@Nullable String s) { - textView.setText(s); + View root = inflater.inflate(R.layout.fragment_appreciate, container, false); + final View rootView = root; + ScrollView myScrollView = root.findViewById(R.id.employees); + LinearLayout employees = (LinearLayout)myScrollView.getChildAt(0); + for(int i=0; i < employees.getChildCount(); i++) { + LinearLayout cur_row = (LinearLayout) employees.getChildAt(i); + for (int j=0; j < cur_row.getChildCount(); ++j) { + ImageButton button = (ImageButton) cur_row.getChildAt(j); + button.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + + View C = rootView.findViewById(R.id.appreciation_form); + ViewGroup parent = (ViewGroup) C.getParent(); + int index = parent.indexOfChild(C); + parent.removeView(C); + C = getLayoutInflater().inflate(optionId, parent, false); + } + }); + } - }); + } return root; } } \ No newline at end of file diff --git a/app/app/src/main/java/com/abstractlion/appreciator/ui/home/HomeFragment.java b/app/app/src/main/java/com/abstractlion/appreciator/ui/home/HomeFragment.java index af30ae2..4ddc683 100644 --- a/app/app/src/main/java/com/abstractlion/appreciator/ui/home/HomeFragment.java +++ b/app/app/src/main/java/com/abstractlion/appreciator/ui/home/HomeFragment.java @@ -20,14 +20,8 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { homeViewModel = ViewModelProviders.of(this).get(HomeViewModel.class); - View root = inflater.inflate(R.layout.fragment_home, container, false); - final TextView textView = root.findViewById(R.id.text_home); - homeViewModel.getText().observe(this, new Observer() { - @Override - public void onChanged(@Nullable String s) { - textView.setText(s); - } - }); + View root = inflater.inflate(R.layout.fragment_profile, container, false); + return root; } } \ No newline at end of file diff --git a/app/app/src/main/java/com/abstractlion/appreciator/ui/home/ProfileSendAppreciatorListActivity.java b/app/app/src/main/java/com/abstractlion/appreciator/ui/home/ProfileSendAppreciatorListActivity.java new file mode 100644 index 0000000..d36c8e9 --- /dev/null +++ b/app/app/src/main/java/com/abstractlion/appreciator/ui/home/ProfileSendAppreciatorListActivity.java @@ -0,0 +1,33 @@ +package com.abstractlion.appreciator.ui.home; + +import android.app.Activity; +import android.os.Bundle; +import android.view.View; +import android.widget.AdapterView; +import android.widget.ArrayAdapter; +import android.widget.ListView; +import android.widget.TextView; +import android.widget.Toast; + +import androidx.appcompat.app.AppCompatActivity; +import androidx.fragment.app.ListFragment; + +import com.abstractlion.appreciator.R; + +public class ProfileSendAppreciatorListActivity extends Activity { + ListView listView; + TextView textView; + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + String[] values = new String[] { "Android", "iPhone", "WindowsMobile", + "Blackberry", "WebOS", "Ubuntu", "Windows7", "Max OS X", + "Linux", "OS/2" }; + ArrayAdapter adapter = new ArrayAdapter(this, + android.R.layout.simple_list_item_1, values); + + ListView listView = (ListView) findViewById(R.id.listView); + listView.setAdapter(adapter); + } +} diff --git a/app/app/src/main/java/com/abstractlion/appreciator/ui/notifications/NotificationsFragment.java b/app/app/src/main/java/com/abstractlion/appreciator/ui/notifications/NotificationsFragment.java index 2e479a5..6fdbf76 100644 --- a/app/app/src/main/java/com/abstractlion/appreciator/ui/notifications/NotificationsFragment.java +++ b/app/app/src/main/java/com/abstractlion/appreciator/ui/notifications/NotificationsFragment.java @@ -20,7 +20,7 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { notificationsViewModel = ViewModelProviders.of(this).get(NotificationsViewModel.class); - View root = inflater.inflate(R.layout.fragment_notifications, container, false); + View root = inflater.inflate(R.layout.fragment_summary, container, false); final TextView textView = root.findViewById(R.id.text_notifications); notificationsViewModel.getText().observe(this, new Observer() { @Override diff --git a/app/app/src/main/res/drawable/avatar_photo.jpeg b/app/app/src/main/res/drawable/avatar_photo.jpeg new file mode 100644 index 0000000..e2fb1c2 Binary files /dev/null and b/app/app/src/main/res/drawable/avatar_photo.jpeg differ diff --git a/app/app/src/main/res/drawable/ic_developer_board_black_24dp.xml b/app/app/src/main/res/drawable/ic_developer_board_black_24dp.xml new file mode 100644 index 0000000..27d3805 --- /dev/null +++ b/app/app/src/main/res/drawable/ic_developer_board_black_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/app/src/main/res/drawable/ic_person_pin_black_24dp.xml b/app/app/src/main/res/drawable/ic_person_pin_black_24dp.xml new file mode 100644 index 0000000..90ed54d --- /dev/null +++ b/app/app/src/main/res/drawable/ic_person_pin_black_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/app/src/main/res/drawable/ic_spellcheck_black_24dp.xml b/app/app/src/main/res/drawable/ic_spellcheck_black_24dp.xml new file mode 100644 index 0000000..f4a1b50 --- /dev/null +++ b/app/app/src/main/res/drawable/ic_spellcheck_black_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/app/src/main/res/drawable/th_1.jpeg b/app/app/src/main/res/drawable/th_1.jpeg new file mode 100644 index 0000000..c58d700 Binary files /dev/null and b/app/app/src/main/res/drawable/th_1.jpeg differ diff --git a/app/app/src/main/res/drawable/th_10.jpeg b/app/app/src/main/res/drawable/th_10.jpeg new file mode 100644 index 0000000..4484a3e Binary files /dev/null and b/app/app/src/main/res/drawable/th_10.jpeg differ diff --git a/app/app/src/main/res/drawable/th_11.jpeg b/app/app/src/main/res/drawable/th_11.jpeg new file mode 100644 index 0000000..dced634 Binary files /dev/null and b/app/app/src/main/res/drawable/th_11.jpeg differ diff --git a/app/app/src/main/res/drawable/th_12.jpeg b/app/app/src/main/res/drawable/th_12.jpeg new file mode 100644 index 0000000..9cd0dce Binary files /dev/null and b/app/app/src/main/res/drawable/th_12.jpeg differ diff --git a/app/app/src/main/res/drawable/th_2.jpeg b/app/app/src/main/res/drawable/th_2.jpeg new file mode 100644 index 0000000..ab943a2 Binary files /dev/null and b/app/app/src/main/res/drawable/th_2.jpeg differ diff --git a/app/app/src/main/res/drawable/th_3.jpeg b/app/app/src/main/res/drawable/th_3.jpeg new file mode 100644 index 0000000..be36737 Binary files /dev/null and b/app/app/src/main/res/drawable/th_3.jpeg differ diff --git a/app/app/src/main/res/drawable/th_4.jpeg b/app/app/src/main/res/drawable/th_4.jpeg new file mode 100644 index 0000000..6d257eb Binary files /dev/null and b/app/app/src/main/res/drawable/th_4.jpeg differ diff --git a/app/app/src/main/res/drawable/th_5.jpeg b/app/app/src/main/res/drawable/th_5.jpeg new file mode 100644 index 0000000..8abfeda Binary files /dev/null and b/app/app/src/main/res/drawable/th_5.jpeg differ diff --git a/app/app/src/main/res/drawable/th_6.jpeg b/app/app/src/main/res/drawable/th_6.jpeg new file mode 100644 index 0000000..0c009ad Binary files /dev/null and b/app/app/src/main/res/drawable/th_6.jpeg differ diff --git a/app/app/src/main/res/drawable/th_7.jpeg b/app/app/src/main/res/drawable/th_7.jpeg new file mode 100644 index 0000000..084e249 Binary files /dev/null and b/app/app/src/main/res/drawable/th_7.jpeg differ diff --git a/app/app/src/main/res/drawable/th_8.jpeg b/app/app/src/main/res/drawable/th_8.jpeg new file mode 100644 index 0000000..fba073c Binary files /dev/null and b/app/app/src/main/res/drawable/th_8.jpeg differ diff --git a/app/app/src/main/res/drawable/th_9.jpeg b/app/app/src/main/res/drawable/th_9.jpeg new file mode 100644 index 0000000..5a2837b Binary files /dev/null and b/app/app/src/main/res/drawable/th_9.jpeg differ diff --git a/app/app/src/main/res/layout/activity_main.xml b/app/app/src/main/res/layout/activity_main.xml index fc5eaf6..85b7106 100644 --- a/app/app/src/main/res/layout/activity_main.xml +++ b/app/app/src/main/res/layout/activity_main.xml @@ -2,11 +2,35 @@ + + + + + app:menu="@menu/bottom_nav_menu"> - + \ No newline at end of file diff --git a/app/app/src/main/res/layout/appreciation_form.xml b/app/app/src/main/res/layout/appreciation_form.xml new file mode 100644 index 0000000..e69de29 diff --git a/app/app/src/main/res/layout/fragment_appreciate.xml b/app/app/src/main/res/layout/fragment_appreciate.xml new file mode 100644 index 0000000..c217509 --- /dev/null +++ b/app/app/src/main/res/layout/fragment_appreciate.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/app/src/main/res/layout/fragment_dashboard.xml b/app/app/src/main/res/layout/fragment_dashboard.xml deleted file mode 100644 index b9cdf22..0000000 --- a/app/app/src/main/res/layout/fragment_dashboard.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/app/app/src/main/res/layout/fragment_home.xml b/app/app/src/main/res/layout/fragment_home.xml deleted file mode 100644 index 1291dc9..0000000 --- a/app/app/src/main/res/layout/fragment_home.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/app/app/src/main/res/layout/fragment_profile.xml b/app/app/src/main/res/layout/fragment_profile.xml new file mode 100644 index 0000000..ffce7d3 --- /dev/null +++ b/app/app/src/main/res/layout/fragment_profile.xml @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/app/src/main/res/layout/fragment_notifications.xml b/app/app/src/main/res/layout/fragment_summary.xml similarity index 100% rename from app/app/src/main/res/layout/fragment_notifications.xml rename to app/app/src/main/res/layout/fragment_summary.xml diff --git a/app/app/src/main/res/menu/bottom_nav_menu.xml b/app/app/src/main/res/menu/bottom_nav_menu.xml index e339254..3debd56 100644 --- a/app/app/src/main/res/menu/bottom_nav_menu.xml +++ b/app/app/src/main/res/menu/bottom_nav_menu.xml @@ -3,17 +3,17 @@ + android:icon="@drawable/ic_person_pin_black_24dp" + android:title="@string/title_profile"/> + android:icon="@drawable/ic_spellcheck_black_24dp" + android:title="@string/title_appreciate"/> + android:icon="@drawable/ic_developer_board_black_24dp" + android:title="@string/title_summary"/> diff --git a/app/app/src/main/res/navigation/mobile_navigation.xml b/app/app/src/main/res/navigation/mobile_navigation.xml index 085ced0..4bb2bbd 100644 --- a/app/app/src/main/res/navigation/mobile_navigation.xml +++ b/app/app/src/main/res/navigation/mobile_navigation.xml @@ -8,18 +8,18 @@ + android:label="@string/title_profile" + tools:layout="@layout/fragment_profile"/> + android:label="@string/title_appreciate" + tools:layout="@layout/fragment_appreciate"/> + android:label="@string/title_summary" + tools:layout="@layout/fragment_summary"/> \ No newline at end of file diff --git a/app/app/src/main/res/values/strings.xml b/app/app/src/main/res/values/strings.xml index 015bb0a..940b673 100644 --- a/app/app/src/main/res/values/strings.xml +++ b/app/app/src/main/res/values/strings.xml @@ -1,6 +1,6 @@ Appreciator - Home - Dashboard - Notifications + Profile + Appreciate + Summary