Skip to content
Snippets Groups Projects
Commit 8975508b authored by fheyming's avatar fheyming
Browse files

Added Supplier nav

parent c319758c
Branches main
No related tags found
1 merge request!1Mal aufn Master megren
Showing
with 191 additions and 17 deletions
package com.example.mampfmobil.ui.supplier;
import androidx.lifecycle.ViewModelProvider;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.example.mampfmobil.R;
public class SupplierAddItemFragment extends Fragment {
private SupplierAddItemViewModel mViewModel;
public static SupplierAddItemFragment newInstance() {
return new SupplierAddItemFragment();
}
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
@Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_supplier_add_item, container, false);
}
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
mViewModel = new ViewModelProvider(this).get(SupplierAddItemViewModel.class);
// TODO: Use the ViewModel
}
}
\ No newline at end of file
package com.example.mampfmobil.ui.supplier;
import androidx.lifecycle.ViewModel;
public class SupplierAddItemViewModel extends ViewModel {
// TODO: Implement the ViewModel
}
\ No newline at end of file
package com.example.mampfmobil.ui.supplier;
import androidx.lifecycle.ViewModelProvider;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.example.mampfmobil.R;
public class SupplierEditItemFragment extends Fragment {
private SupplierEditItemViewModel mViewModel;
public static SupplierEditItemFragment newInstance() {
return new SupplierEditItemFragment();
}
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
@Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_supplier_edit_item, container, false);
}
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
mViewModel = new ViewModelProvider(this).get(SupplierEditItemViewModel.class);
// TODO: Use the ViewModel
}
}
\ No newline at end of file
package com.example.mampfmobil.ui.supplier;
import androidx.lifecycle.ViewModel;
public class SupplierEditItemViewModel extends ViewModel {
// TODO: Implement the ViewModel
}
\ No newline at end of file
package com.example.mampfmobil.ui.supplier;
import androidx.lifecycle.ViewModelProvider;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.example.mampfmobil.R;
public class SupplierStatisticsFragment extends Fragment {
private SupplierStatisticsViewModel mViewModel;
public static SupplierStatisticsFragment newInstance() {
return new SupplierStatisticsFragment();
}
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
@Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_supplier_statistics, container, false);
}
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
mViewModel = new ViewModelProvider(this).get(SupplierStatisticsViewModel.class);
// TODO: Use the ViewModel
}
}
\ No newline at end of file
package com.example.mampfmobil.ui.supplier;
import androidx.lifecycle.ViewModel;
public class SupplierStatisticsViewModel extends ViewModel {
// TODO: Implement the ViewModel
}
\ No newline at end of file
<?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=".ui.supplier.SupplierAddItemFragment">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="THIS IS THE ADD ITEM FRAGMENT" />
</FrameLayout>
\ No newline at end of file
<?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=".ui.supplier.SupplierEditItemFragment">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="HelloS IS THE EDIT ITEM FRAGMANET" />
</FrameLayout>
\ No newline at end of file
<?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=".ui.supplier.SupplierStatisticsFragment">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="THIS IS THE STATISTICS FRAGMENT" />
</FrameLayout>
\ No newline at end of file
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <menu xmlns:android="http://schemas.android.com/apk/res/android">
<item <item
android:id="@+id/navigation_home" android:id="@+id/navigation_add_item"
android:title="@string/add_Item" /> android:title="@string/add_Item" />
<item <item
android:id="@+id/navigation_dashboard" android:id="@+id/navigation_edit_item"
android:title="@string/edit_Item" /> android:title="@string/edit_Item" />
<item <item
android:id="@+id/navigation_notifications" android:id="@+id/navigation_statistics"
android:title="@string/statistics" /> android:title="@string/statistics" />
</menu> </menu>
\ No newline at end of file
...@@ -3,23 +3,23 @@ ...@@ -3,23 +3,23 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/mobile_navigation_sup" android:id="@+id/mobile_navigation_sup"
app:startDestination="@+id/navigation_home"> app:startDestination="@+id/navigation_edit_item">
<fragment <fragment
android:id="@+id/navigation_home" android:id="@+id/navigation_add_item"
android:name="com.example.mampfmobil.ui.home.HomeFragment" android:name="com.example.mampfmobil.ui.supplier.SupplierAddItemFragment"
android:label="@string/title_home" android:label="@string/add_Item"
tools:layout="@layout/fragment_home" /> tools:layout="@layout/fragment_supplier_add_item" />
<fragment <fragment
android:id="@+id/navigation_dashboard" android:id="@+id/navigation_edit_item"
android:name="com.example.mampfmobil.ui.dashboard.DashboardFragment" android:name="com.example.mampfmobil.ui.supplier.SupplierEditItemFragment"
android:label="@string/title_dashboard" android:label="@string/edit_Item"
tools:layout="@layout/fragment_dashboard" /> tools:layout="@layout/fragment_supplier_edit_item" />
<fragment <fragment
android:id="@+id/navigation_notifications" android:id="@+id/navigation_statistics"
android:name="com.example.mampfmobil.ui.notifications.NotificationsFragment" android:name="com.example.mampfmobil.ui.supplier.SupplierStatisticsFragment"
android:label="@string/title_notifications" android:label="@string/statistics"
tools:layout="@layout/fragment_notifications" /> tools:layout="@layout/fragment_supplier_statistics" />
</navigation> </navigation>
\ No newline at end of file
...@@ -21,5 +21,5 @@ ...@@ -21,5 +21,5 @@
<string name="address">address</string> <string name="address">address</string>
<string name="register">register</string> <string name="register">register</string>
<string name="company_name">company name</string> <string name="company_name">company name</string>
<string name="logon">logon</string> <string name="logon">login</string>
</resources> </resources>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment