Skip to content
Open
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
3 changes: 3 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
implementation 'androidx.navigation:navigation-fragment:2.3.5'
implementation 'androidx.navigation:navigation-ui:2.3.5'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
Expand Down
47 changes: 47 additions & 0 deletions app/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"project_info": {
"project_number": "469718637752",
"project_id": "karu-android-app",
"storage_bucket": "karu-android-app.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:469718637752:android:f3223a0399182f0e22e84d",
"android_client_info": {
"package_name": "com.example.karu_android_app"
}
},
"oauth_client": [
{
"client_id": "469718637752-luimkmi6fa864a4gfg9v6j31ca4tfddt.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.example.karu_android_app",
"certificate_hash": "dc158deb483a8a5d5ff2344690f9d094e28ac3c8"
}
},
{
"client_id": "469718637752-arkn4cvddu4aa7u3hsqv44fhphioe45k.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyA4zg0Xli7HLZuoxSjUIlYWPiLqYso8jog"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "469718637752-arkn4cvddu4aa7u3hsqv44fhphioe45k.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}
3 changes: 3 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Karu_Android_app">
<activity
android:name=".dashboard"
android:exported="true" />
<activity
android:name=".signIN"
android:exported="true" />
Expand Down
49 changes: 49 additions & 0 deletions app/src/main/java/com/example/karu_android_app/dashboard.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package com.example.karu_android_app;

import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;

import android.bluetooth.le.ScanRecord;
import android.os.Bundle;
import android.view.MenuItem;

import com.google.android.material.bottomnavigation.BottomNavigationView;

public class dashboard extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_dashboard);

BottomNavigationView bottomNavigationView = findViewById(R.id.bottom_nav);
bottomNavigationView.setOnNavigationItemSelectedListener(navigationItemSelectedListener);
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new homeFragment()).commit();


}

private BottomNavigationView.OnNavigationItemSelectedListener navigationItemSelectedListener = new BottomNavigationView.OnNavigationItemSelectedListener() {
@Override
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
Fragment selectedFragment = null;
switch (item.getItemId()) {
case R.id.home:
selectedFragment = new homeFragment();
break;
case R.id.search:
selectedFragment = new searchFragment();
break;
case R.id.setting:
selectedFragment = new settingFragment();
break;

}


getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, selectedFragment).commit();
return true;
}
};
}
20 changes: 20 additions & 0 deletions app/src/main/java/com/example/karu_android_app/homeFragment.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.example.karu_android_app;

import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;


public class homeFragment extends Fragment {

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_home, container, false);
}
}
20 changes: 20 additions & 0 deletions app/src/main/java/com/example/karu_android_app/searchFragment.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.example.karu_android_app;

import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;


public class searchFragment extends Fragment {

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_search, container, false);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.example.karu_android_app;

import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;


public class settingFragment extends Fragment {


@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_setting, container, false);
}
}
13 changes: 13 additions & 0 deletions app/src/main/res/drawable/home.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M9.1572,20.7714V17.7047C9.1572,16.9246 9.7931,16.2908 10.581,16.2856H13.4671C14.2587,16.2856 14.9005,16.9209 14.9005,17.7047V17.7047V20.7809C14.9003,21.4432 15.4343,21.9845 16.103,22H18.0271C19.9451,22 21.5,20.4607 21.5,18.5618V18.5618V9.8378C21.4898,9.0908 21.1355,8.3893 20.538,7.933L13.9577,2.6853C12.8049,1.7716 11.1662,1.7716 10.0134,2.6853L3.462,7.9426C2.8623,8.397 2.5074,9.0997 2.5,9.8474V18.5618C2.5,20.4607 4.0549,22 5.9729,22H7.897C8.5823,22 9.138,21.4499 9.138,20.7714V20.7714"
android:strokeLineJoin="round"
android:strokeWidth="1.5"
android:fillColor="#00000000"
android:strokeColor="#130F26"
android:strokeLineCap="round"/>
</vector>
24 changes: 24 additions & 0 deletions app/src/main/res/drawable/search.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<group>
<clip-path
android:pathData="M2,2H21.4768V21.477H2V2Z"
android:fillType="evenOdd"/>
<path
android:pathData="M11.7388,3.5C7.1958,3.5 3.4998,7.195 3.4998,11.738C3.4998,16.281 7.1958,19.977 11.7388,19.977C16.2808,19.977 19.9768,16.281 19.9768,11.738C19.9768,7.195 16.2808,3.5 11.7388,3.5ZM11.7388,21.477C6.3688,21.477 1.9998,17.108 1.9998,11.738C1.9998,6.368 6.3688,2 11.7388,2C17.1088,2 21.4768,6.368 21.4768,11.738C21.4768,17.108 17.1088,21.477 11.7388,21.477Z"
android:fillColor="#000000"
android:fillType="evenOdd"/>
</group>
<group>
<clip-path
android:pathData="M17.24,17.7069H22.264V22.7217H17.24V17.7069Z"
android:fillType="evenOdd"/>
<path
android:pathData="M21.5142,22.7217C21.3232,22.7217 21.1312,22.6487 20.9842,22.5027L17.4602,18.9887C17.1672,18.6957 17.1662,18.2207 17.4592,17.9277C17.7512,17.6327 18.2262,17.6347 18.5202,17.9257L22.0442,21.4407C22.3372,21.7337 22.3382,22.2077 22.0452,22.5007C21.8992,22.6487 21.7062,22.7217 21.5142,22.7217Z"
android:fillColor="#000000"
android:fillType="evenOdd"/>
</group>
</vector>
19 changes: 19 additions & 0 deletions app/src/main/res/drawable/setting.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<group>
<clip-path
android:pathData="M2,2.0005H21.2849V22.7215H2V2.0005Z"
android:fillType="evenOdd"/>
<path
android:pathData="M7.2023,17.4405C7.4313,17.4405 7.6603,17.4695 7.8843,17.5295C8.5603,17.7115 9.1473,18.1635 9.4953,18.7705C9.7213,19.1515 9.8463,19.5965 9.8503,20.0505C9.8503,20.7005 10.3723,21.2215 11.0143,21.2215H12.2673C12.9063,21.2215 13.4283,20.7035 13.4313,20.0645C13.4273,19.3585 13.7033,18.6875 14.2083,18.1825C14.7063,17.6845 15.4023,17.3855 16.0983,17.4055C16.5543,17.4165 16.9933,17.5395 17.3803,17.7595C17.9373,18.0785 18.6483,17.8885 18.9703,17.3385L19.6343,16.2315C19.7823,15.9765 19.8253,15.6565 19.7463,15.3615C19.6683,15.0665 19.4723,14.8105 19.2083,14.6595C18.5903,14.3035 18.1493,13.7295 17.9663,13.0415C17.7853,12.3665 17.8843,11.6295 18.2373,11.0225C18.4673,10.6225 18.8043,10.2855 19.2083,10.0535C19.7503,9.7365 19.9403,9.0275 19.6253,8.4755C19.6123,8.4535 19.6003,8.4305 19.5903,8.4065L19.0043,7.3905C18.6853,6.8355 17.9753,6.6445 17.4183,6.9615C16.8163,7.3175 16.1003,7.4195 15.4123,7.2385C14.7253,7.0605 14.1493,6.6255 13.7903,6.0115C13.5603,5.6275 13.4353,5.1805 13.4313,4.7255C13.4403,4.3835 13.3203,4.0765 13.1023,3.8515C12.8853,3.6275 12.5803,3.5005 12.2673,3.5005H11.0143C10.7043,3.5005 10.4143,3.6215 10.1953,3.8395C9.9773,4.0585 9.8583,4.3495 9.8603,4.6595C9.8393,6.1215 8.6443,7.2985 7.1973,7.2985C6.7333,7.2935 6.2863,7.1685 5.8983,6.9365C5.3533,6.6265 4.6413,6.8175 4.3223,7.3725L3.6453,8.4855C3.3353,9.0235 3.5253,9.7345 4.0773,10.0555C4.8963,10.5295 5.4073,11.4135 5.4073,12.3615C5.4073,13.3095 4.8963,14.1925 4.0753,14.6675C3.5263,14.9855 3.3363,15.6925 3.6543,16.2425L4.2853,17.3305C4.4413,17.6115 4.6963,17.8145 4.9913,17.8975C5.2853,17.9795 5.6093,17.9445 5.8793,17.7945C6.2763,17.5615 6.7383,17.4405 7.2023,17.4405ZM12.2673,22.7215H11.0143C9.5453,22.7215 8.3503,21.5275 8.3503,20.0585C8.3483,19.8775 8.2963,19.6895 8.1993,19.5265C8.0423,19.2525 7.7883,19.0565 7.4953,18.9785C7.2043,18.9005 6.8853,18.9435 6.6233,19.0955C5.9953,19.4455 5.2563,19.5305 4.5803,19.3405C3.9053,19.1495 3.3223,18.6855 2.9803,18.0705L2.3553,16.9935C1.6243,15.7255 2.0593,14.1005 3.3253,13.3685C3.6843,13.1615 3.9073,12.7755 3.9073,12.3615C3.9073,11.9475 3.6843,11.5605 3.3253,11.3535C2.0583,10.6175 1.6243,8.9885 2.3543,7.7205L3.0323,6.6075C3.7533,5.3535 5.3833,4.9115 6.6543,5.6415C6.8273,5.7445 7.0153,5.7965 7.2063,5.7985C7.8293,5.7985 8.3503,5.2845 8.3603,4.6525C8.3563,3.9555 8.6313,3.2865 9.1323,2.7815C9.6353,2.2775 10.3033,2.0005 11.0143,2.0005H12.2673C12.9833,2.0005 13.6793,2.2945 14.1783,2.8055C14.6763,3.3195 14.9513,4.0245 14.9303,4.7395C14.9323,4.9005 14.9853,5.0865 15.0813,5.2495C15.2403,5.5195 15.4913,5.7095 15.7893,5.7875C16.0873,5.8615 16.3993,5.8215 16.6643,5.6645C17.9443,4.9335 19.5733,5.3715 20.3043,6.6415L20.9273,7.7205C20.9433,7.7495 20.9573,7.7775 20.9693,7.8065C21.6313,9.0575 21.1893,10.6325 19.9593,11.3515C19.7803,11.4545 19.6353,11.5985 19.5353,11.7725C19.3803,12.0415 19.3373,12.3615 19.4153,12.6555C19.4953,12.9555 19.6863,13.2045 19.9553,13.3585C20.5623,13.7075 21.0153,14.2955 21.1963,14.9745C21.3773,15.6525 21.2783,16.3885 20.9253,16.9955L20.2613,18.1015C19.5303,19.3575 17.9013,19.7925 16.6343,19.0605C16.4653,18.9635 16.2703,18.9105 16.0763,18.9055H16.0703C15.7813,18.9055 15.4843,19.0285 15.2683,19.2435C15.0493,19.4625 14.9293,19.7545 14.9313,20.0645C14.9243,21.5335 13.7293,22.7215 12.2673,22.7215Z"
android:fillColor="#000000"
android:fillType="evenOdd"/>
</group>
<path
android:pathData="M11.645,10.4746C10.605,10.4746 9.759,11.3216 9.759,12.3616C9.759,13.4016 10.605,14.2466 11.645,14.2466C12.685,14.2466 13.531,13.4016 13.531,12.3616C13.531,11.3216 12.685,10.4746 11.645,10.4746ZM11.645,15.7466C9.778,15.7466 8.259,14.2286 8.259,12.3616C8.259,10.4946 9.778,8.9746 11.645,8.9746C13.512,8.9746 15.031,10.4946 15.031,12.3616C15.031,14.2286 13.512,15.7466 11.645,15.7466Z"
android:fillColor="#000000"
android:fillType="evenOdd"/>
</vector>
29 changes: 29 additions & 0 deletions app/src/main/res/layout/activity_dashboard.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<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=".dashboard">


<FrameLayout
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/bottom_nav"></FrameLayout>


<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_nav"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginStart="1dp"
android:layout_marginEnd="1dp"
android:layout_marginBottom="1dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:menu="@menu/nav_menu" />
</RelativeLayout>
14 changes: 14 additions & 0 deletions app/src/main/res/layout/fragment_home.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".homeFragment">

<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="home" />

</FrameLayout>
14 changes: 14 additions & 0 deletions app/src/main/res/layout/fragment_search.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".searchFragment">

<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="search" />

</FrameLayout>
14 changes: 14 additions & 0 deletions app/src/main/res/layout/fragment_setting.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".settingFragment">

<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="setting" />

</FrameLayout>
14 changes: 14 additions & 0 deletions app/src/main/res/menu/nav_menu.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">


<item android:title="Home"
android:id="@+id/home"
android:icon="@drawable/home" />
<item android:title="Search"
android:icon="@drawable/search"
android:id="@+id/search"/>
<item android:title="Setting"
android:icon="@drawable/setting"
android:id="@+id/setting"/>
</menu>
24 changes: 24 additions & 0 deletions app/src/main/res/navigation/dashboard_navigation.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?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/dashboard_navigation"
app:startDestination="@id/homeFragment">

<fragment
android:id="@+id/homeFragment"
android:name="com.example.karu_android_app.homeFragment"
android:label="fragment_home"
tools:layout="@layout/fragment_home" />
<fragment
android:id="@+id/searchFragment"
android:name="com.example.karu_android_app.searchFragment"
android:label="fragment_search2"
tools:layout="@layout/fragment_search" />
<fragment
android:id="@+id/settingFragment"
android:name="com.example.karu_android_app.settingFragment"
android:label="fragment_setting"
tools:layout="@layout/fragment_setting" />

</navigation>
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@
<string name="password">Password</string>
<string name="email_id">Email ID</string>
<string name="sign_up">Sign Up</string>
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>

</resources>