Commit cc225522 authored by 9731301's avatar 9731301

add button navigation for pics and change action bar and toolbars

parent 3180d840
......@@ -20,7 +20,8 @@
<activity android:name=".MenuFeatures.AllNotes.AllNotesActivity" />
<activity android:name=".MenuFeatures.AllArchivedNotes.ArchivedNotesActivity" />
<activity android:name=".MenuFeatures.Setting.SettingActivity" />
<activity android:name=".MainActivity">
<activity android:name=".MainActivity"
android:theme="@style/AppThemeNoActionBAr">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
......
package com.example.mynotepad;
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.navigation.ui.AppBarConfiguration;
import androidx.room.Room;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.view.Gravity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ImageView;
import com.example.mynotepad.MenuFeatures.AllArchivedNotes.ArchivedNotesActivity;
import com.example.mynotepad.MenuFeatures.AllNotes.AllNotesActivity;
import com.example.mynotepad.MenuFeatures.AllNotes.DataBase.NoteDataBase;
......@@ -22,6 +28,7 @@ import com.google.android.material.navigation.NavigationView;
public class MainActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener {
public static NoteDataBase noteDataBase;
private DrawerLayout drawerLayout;
@Override
protected void onCreate(Bundle savedInstanceState) {
......@@ -34,39 +41,41 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
private void init() {
noteDataBase = Room.databaseBuilder(this, NoteDataBase.class, "RoomDb").fallbackToDestructiveMigration().allowMainThreadQueries().build();
final DrawerLayout drawerLayout = findViewById(R.id.drawerLayout);
drawerLayout = findViewById(R.id.drawerLayout);
Toolbar toolbar = findViewById(R.id.toolbar_main);
NavigationView navigationView = findViewById(R.id.main_menu);//menu drawer in ui
navigationView.setNavigationItemSelectedListener(this);
ImageView toolbarListImg = findViewById(R.id.toolbarList);
toolbarListImg.setOnClickListener(new View.OnClickListener() {
@SuppressLint("WrongConstant")
@Override
public void onClick(View v) {
if(!drawerLayout.isDrawerOpen(Gravity.START))
drawerLayout.openDrawer(Gravity.START);
else drawerLayout.closeDrawer(Gravity.END);
}
});
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this, drawerLayout, toolbar,
R.string.navigation_drawer_open, R.string.navigation_drawer_close);
toggle.setDrawerIndicatorEnabled(true);
toggle.syncState();
drawerLayout.addDrawerListener(toggle);
}
public void allNoteClicked(View view){
public void allNoteClicked(View view) {
startActivity(new Intent(getApplicationContext(), AllNotesActivity.class));
}
public void onCalendarClicked(View view){
public void onCalendarClicked(View view) {
startActivity(new Intent(getApplicationContext(), MyCalenderActivity.class));
}
public void onVoiceMassagesClicked(View view){
public void onVoiceMassagesClicked(View view) {
startActivity(new Intent(getApplicationContext(), VoiceMassagesActivity.class));
}
public void noNotedPicsClicked(View view){
public void noNotedPicsClicked(View view) {
startActivity(new Intent(getApplicationContext(), PicsActivity.class));
}
public void onProgramsClicked(View view){
public void onProgramsClicked(View view) {
}
......@@ -77,19 +86,21 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
int id = item.getItemId();
switch (id) {
case R.id.favorites:{
case R.id.favorites: {
startActivity(new Intent(getApplicationContext(), ArchivedNotesActivity.class));
break;
}
case R.id.folders:{
case R.id.folders: {
break;
}
case R.id.setting:{
case R.id.settings: {
startActivity(new Intent(getApplicationContext(), SettingActivity.class));
}
case R.id.information:{
case R.id.information: {
}
}
return true;
}
}
\ No newline at end of file
......@@ -12,5 +12,6 @@ public class AllNotesActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_all_notes);
setTitle("all notes");
}
}
\ No newline at end of file
......@@ -148,6 +148,7 @@ public class AllNotesListFragment extends Fragment {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
noteDataBase.noteDao().deleteNote(note);
myNotes.remove(myChosenNote);
myAdaptor.notifyDataSetChanged();
}
});
......@@ -159,6 +160,8 @@ public class AllNotesListFragment extends Fragment {
});
alert.show();
allNoteToolBar.setVisibility(View.VISIBLE);
customToolbarOption.setVisibility(View.GONE);
allNoteToolBar.setVisibility(View.VISIBLE);
}
protected void starClicked() {
......
......@@ -157,6 +157,7 @@ public class CalenderNotesListFragment extends Fragment {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
noteDataBase.dateNoreDAO().deleteDateNote(entityDates.get(myDates.indexOf(myChosenDateNote)));
myDates.remove(myChosenDateNote);
myAdaptor.notifyDataSetChanged();
}
});
......@@ -168,6 +169,7 @@ public class CalenderNotesListFragment extends Fragment {
});
alert.show();
calenderToolbar.setVisibility(View.VISIBLE);
customToolbarOption.setVisibility(View.GONE);
}
private void starClicked() {
......
......@@ -15,5 +15,6 @@ public class MyCalenderActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_my_calender);
setTitle("calendar");
}
}
\ No newline at end of file
package com.example.mynotepad.MenuFeatures.Pics;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.example.mynotepad.R;
/**
* A simple {@link Fragment} subclass.
* Use the {@link CameraFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public class CameraFragment extends Fragment {
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_PARAM1 = "param1";
private static final String ARG_PARAM2 = "param2";
// TODO: Rename and change types of parameters
private String mParam1;
private String mParam2;
public CameraFragment() {
// Required empty public constructor
}
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment CameraFragment.
*/
// TODO: Rename and change types and number of parameters
public static CameraFragment newInstance(String param1, String param2) {
CameraFragment fragment = new CameraFragment();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
mParam1 = getArguments().getString(ARG_PARAM1);
mParam2 = getArguments().getString(ARG_PARAM2);
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_camera, container, false);
}
}
\ No newline at end of file
package com.example.mynotepad.MenuFeatures.Pics;
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.mynotepad.R;
public class ChoosingPicsFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
((PicsActivity) getActivity()).getSupportActionBar().setTitle("Choose Pic");
return inflater.inflate(R.layout.fragment_choosing_pics, container, false);
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
}
}
\ No newline at end of file
package com.example.mynotepad.MenuFeatures.Pics;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.example.mynotepad.R;
/**
* A simple {@link Fragment} subclass.
* Use the {@link GalleryFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public class GalleryFragment extends Fragment {
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_PARAM1 = "param1";
private static final String ARG_PARAM2 = "param2";
// TODO: Rename and change types of parameters
private String mParam1;
private String mParam2;
public GalleryFragment() {
// Required empty public constructor
}
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment GalleryFragment.
*/
// TODO: Rename and change types and number of parameters
public static GalleryFragment newInstance(String param1, String param2) {
GalleryFragment fragment = new GalleryFragment();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
mParam1 = getArguments().getString(ARG_PARAM1);
mParam2 = getArguments().getString(ARG_PARAM2);
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_gallery, container, false);
}
}
\ No newline at end of file
package com.example.mynotepad.MenuFeatures.Pics;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.example.mynotepad.R;
/**
* A simple {@link Fragment} subclass.
* Use the {@link NotedPicsFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public class NotedPicsFragment extends Fragment {
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_PARAM1 = "param1";
private static final String ARG_PARAM2 = "param2";
// TODO: Rename and change types of parameters
private String mParam1;
private String mParam2;
public NotedPicsFragment() {
// Required empty public constructor
}
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment NotedPicsFragment.
*/
// TODO: Rename and change types and number of parameters
public static NotedPicsFragment newInstance(String param1, String param2) {
NotedPicsFragment fragment = new NotedPicsFragment();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
mParam1 = getArguments().getString(ARG_PARAM1);
mParam2 = getArguments().getString(ARG_PARAM2);
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_noted_pics, container, false);
}
}
\ No newline at end of file
package com.example.mynotepad.MenuFeatures.Pics;
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.mynotepad.MainActivity;
import com.example.mynotepad.R;
public class NotedPicsListFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
((PicsActivity) getActivity()).getSupportActionBar().setTitle("Pics List");
return inflater.inflate(R.layout.fragment_noted_pics, container, false);
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
}
}
\ No newline at end of file
......@@ -18,9 +18,10 @@ public class PicsActivity extends AppCompatActivity {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_pics);
BottomNavigationView navView = findViewById(R.id.nav_view);//set bottom navigation view
AppBarConfiguration appBarConfiguration = new AppBarConfiguration.Builder(R.id.notedPicsFragment ,R.id.cameraFragment, R.id.galleryFragment).build();//set fragments
NavController navController = Navigation.findNavController(this , R.id.nav_host_fragment);//set place of fragment
AppBarConfiguration appBarConfiguration = new AppBarConfiguration.Builder(R.id.navigation_picturedNoteList , R.id.navigation_choosePic).build();//set fragments
NavController navController = Navigation.findNavController(this , R.id.nav_pic_fragment_place);//set place of fragment
NavigationUI.setupActionBarWithNavController(this, navController, appBarConfiguration);
NavigationUI.setupWithNavController(navView, navController);
getSupportActionBar().setTitle("Pics");
}
}
\ No newline at end of file
......@@ -11,6 +11,7 @@ public class VoiceMassagesActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_voice_massages);
setTitle("voice massages");
}
}
......@@ -7,7 +7,7 @@
android:angle="45"
android:centerX="35%"
android:startColor="#2980b9"
android:endColor="#D0E4F1"
android:endColor="#2980b9"
android:type="linear"
/>
<size
......
......@@ -3,8 +3,8 @@
android:shape="rectangle">
<gradient
android:startColor="@color/white"
android:endColor="#e3f2fb"
android:startColor="#D0E4F1"
android:endColor="#2980b9"
android:type="radial"
android:gradientRadius="500dp"/>
<stroke
......
......@@ -8,93 +8,113 @@
android:background="@drawable/main_bg_bright"
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
tools:context=".MainActivity">
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="120dp"
android:background="@drawable/bg_button"
android:onClick="allNoteClicked"
android:padding="4dp"
android:text="@string/all_notes"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.502"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/toolBarId"
app:rippleColor="#F6F6F6" />
<Button
android:id="@+id/button4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:background="@drawable/bg_button"
android:onClick="onCalendarClicked"
android:text="@string/calendar"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.502"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button2" />
<Button
android:id="@+id/button6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:background="@drawable/bg_button"
android:onClick="onVoiceMassagesClicked"
android:text="@string/voice_massages"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button4" />
<Button
android:id="@+id/button8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:background="@drawable/bg_button"
android:onClick="noNotedPicsClicked"
android:text="@string/noted_pics"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.502"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button6" />
<Button
android:layout_width="wrap_content"
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:background="@drawable/bg_button"
android:onClick="onProgramsClicked"
android:text="@string/programs"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button8" />
<Toolbar
android:id="@+id/toolBarId"
android:fitsSystemWindows="true">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar_main"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:layout_scrollFlags="scroll|enterAlways"/>
</com.google.android.material.appbar.AppBarLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@drawable/bg_toolbar"
app:layout_constraintTop_toTopOf="parent"
tools:layout_editor_absoluteX="-68dp"
tools:targetApi="lollipop">
<ImageView
android:id="@+id/toolbarList"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:src="@drawable/list" />
</Toolbar>
</androidx.constraintlayout.widget.ConstraintLayout>
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_button"
android:onClick="allNoteClicked"
android:padding="4dp"
android:text="@string/all_notes"
android:textColor="@color/design_default_color_surface"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.502"
app:layout_constraintStart_toStartOf="parent"
app:rippleColor="#F6F6F6" />
<Button
android:id="@+id/button4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:background="@drawable/bg_button"
android:onClick="onCalendarClicked"
android:text="@string/calendar"
android:textColor="@color/design_default_color_surface"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.502"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button2" />
<Button
android:id="@+id/button6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:background="@drawable/bg_button"
android:onClick="onVoiceMassagesClicked"
android:text="@string/voice_massages"
android:textColor="@color/design_default_color_surface"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button4" />
<Button
android:id="@+id/button8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:background="@drawable/bg_button"
android:onClick="noNotedPicsClicked"
android:text="@string/noted_pics"
android:textColor="@color/design_default_color_surface"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.502"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button6" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:background="@drawable/bg_button"
android:onClick="onProgramsClicked"
android:text="@string/programs"
android:textColor="@color/design_default_color_surface"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button8" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<com.google.android.material.navigation.NavigationView
android:id="@+id/main_menu"
android:layout_width="wrap_content"
......
......@@ -20,7 +20,7 @@
app:menu="@menu/bottom_nav_pic" />
<fragment
android:id="@+id/nav_host_fragment"
android:id="@+id/nav_pic_fragment_place"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
......
......@@ -12,7 +12,7 @@
android:layout_weight="1"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="5dp"
android:layout_marginTop="12dp"
android:text="title"
android:padding="5dp"
android:textColor="#000A43"
......@@ -27,6 +27,8 @@
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:lines="3"
android:padding="5dp"
android:text="body text"
android:textSize="12dp" />
......
......@@ -18,21 +18,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/imageView7"
android:layout_width="match_parent"
android:layout_height="50dp"
android:scaleType="fitXY"
app:srcCompat="@drawable/index" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:enabled="false"
android:text="@string/all_notes"
android:textColor="#02091E"
android:textSize="26dp" />
</FrameLayout>
<com.example.mynotepad.MenuFeatures.CustomToolbarOption
......
......@@ -15,22 +15,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/imageView7"
android:layout_width="match_parent"
android:layout_height="50dp"
android:scaleType="fitXY"
android:src="@drawable/index" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:enabled="false"
android:text="all voice massages"
android:textColor="#02091E"
android:textSize="26dp" />
<com.example.mynotepad.MenuFeatures.CustomToolbarOption
android:id="@+id/customToolbarOption"
android:layout_width="match_parent"
......
......@@ -3,12 +3,6 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MenuFeatures.Pics.CameraFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
tools:context=".MenuFeatures.Pics.ChoosingPicsFragment">
</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=".MenuFeatures.Pics.GalleryFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
</FrameLayout>
\ No newline at end of file
......@@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MenuFeatures.Pics.NotedPicsFragment">
tools:context=".MenuFeatures.Pics.NotedPicsListFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
......
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/navigation_gallery"
android:icon="@drawable/gallery"
android:title="@string/gallery" />
<item
android:id="@+id/navigation_camera"
android:icon="@drawable/camera"
android:title="@string/camera" />
<item
android:id="@+id/navigation_picturedNoteList"
android:icon="@drawable/list"
android:title="noted pics" />
android:title="@string/noted_pics" />
<item
android:id="@+id/navigation_choosePic"
android:icon="@drawable/gallery"
android:title="@string/choosing_pics" />
</menu>
\ No newline at end of file
......@@ -14,7 +14,7 @@
android:icon="@drawable/folder"
android:title="@string/folders" />
<item
android:id="@+id/setting"
android:id="@+id/settings"
android:icon="@drawable/setting"
android:title="@string/setting" />
<item
......
......@@ -3,21 +3,16 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/bottom_nav_pic"
app:startDestination="@id/notedPicsFragment">
app:startDestination="@id/navigation_picturedNoteList">
<fragment
android:id="@+id/cameraFragment"
android:name="com.example.mynotepad.MenuFeatures.Pics.CameraFragment"
android:label="fragment_camera"
tools:layout="@layout/fragment_camera" />
<fragment
android:id="@+id/galleryFragment"
android:name="com.example.mynotepad.MenuFeatures.Pics.GalleryFragment"
android:id="@+id/navigation_choosePic"
android:name="com.example.mynotepad.MenuFeatures.Pics.ChoosingPicsFragment"
android:label="fragment_gallery"
tools:layout="@layout/fragment_gallery" />
tools:layout="@layout/fragment_choosing_pics" />
<fragment
android:id="@+id/notedPicsFragment"
android:name="com.example.mynotepad.MenuFeatures.Pics.NotedPicsFragment"
android:id="@+id/navigation_picturedNoteList"
android:name="com.example.mynotepad.MenuFeatures.Pics.NotedPicsListFragment"
android:label="fragment_noted_pics"
tools:layout="@layout/fragment_noted_pics" />
</navigation>
\ No newline at end of file
<resources>
<string name="app_name">MyNotepad</string>
<string name="setting">setting</string>
<string name="setting">settings</string>
<string name="all_notes">all notes</string>
<string name="hello_blank_fragment">Hello blank fragment</string>
<string name="title">title</string>
......@@ -18,8 +18,11 @@
<string name="camera">camera</string>
<string name="gallery">gallery</string>
<string name="favourites">favourites</string>
<string name="noted_pics">noted pics</string>
<string name="programs">programs</string>
<string name="folders">folders</string>
<string name="calendar">calendar</string>
<string name="noted_pics">noted pics</string>
<string name="choosing_pics">choosing pics</string>
<string name="navigation_drawer_open">open</string>
<string name="navigation_drawer_close">close</string>
</resources>
\ No newline at end of file
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>
\ No newline at end of file
<style name="AppThemeNoActionBAr" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment