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 @@ ...@@ -20,7 +20,8 @@
<activity android:name=".MenuFeatures.AllNotes.AllNotesActivity" /> <activity android:name=".MenuFeatures.AllNotes.AllNotesActivity" />
<activity android:name=".MenuFeatures.AllArchivedNotes.ArchivedNotesActivity" /> <activity android:name=".MenuFeatures.AllArchivedNotes.ArchivedNotesActivity" />
<activity android:name=".MenuFeatures.Setting.SettingActivity" /> <activity android:name=".MenuFeatures.Setting.SettingActivity" />
<activity android:name=".MainActivity"> <activity android:name=".MainActivity"
android:theme="@style/AppThemeNoActionBAr">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
......
package com.example.mynotepad; package com.example.mynotepad;
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.drawerlayout.widget.DrawerLayout; import androidx.drawerlayout.widget.DrawerLayout;
import androidx.navigation.ui.AppBarConfiguration;
import androidx.room.Room; import androidx.room.Room;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.view.Gravity; import android.view.Gravity;
import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.widget.ImageView; import android.widget.ImageView;
import com.example.mynotepad.MenuFeatures.AllArchivedNotes.ArchivedNotesActivity; import com.example.mynotepad.MenuFeatures.AllArchivedNotes.ArchivedNotesActivity;
import com.example.mynotepad.MenuFeatures.AllNotes.AllNotesActivity; import com.example.mynotepad.MenuFeatures.AllNotes.AllNotesActivity;
import com.example.mynotepad.MenuFeatures.AllNotes.DataBase.NoteDataBase; import com.example.mynotepad.MenuFeatures.AllNotes.DataBase.NoteDataBase;
...@@ -22,6 +28,7 @@ import com.google.android.material.navigation.NavigationView; ...@@ -22,6 +28,7 @@ import com.google.android.material.navigation.NavigationView;
public class MainActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener { public class MainActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener {
public static NoteDataBase noteDataBase; public static NoteDataBase noteDataBase;
private DrawerLayout drawerLayout;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
...@@ -34,39 +41,41 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On ...@@ -34,39 +41,41 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
private void init() { private void init() {
noteDataBase = Room.databaseBuilder(this, NoteDataBase.class, "RoomDb").fallbackToDestructiveMigration().allowMainThreadQueries().build(); 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 navigationView = findViewById(R.id.main_menu);//menu drawer in ui
navigationView.setNavigationItemSelectedListener(this); navigationView.setNavigationItemSelectedListener(this);
ImageView toolbarListImg = findViewById(R.id.toolbarList); setSupportActionBar(toolbar);
toolbarListImg.setOnClickListener(new View.OnClickListener() { getSupportActionBar().setDisplayHomeAsUpEnabled(true);
@SuppressLint("WrongConstant")
@Override ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this, drawerLayout, toolbar,
public void onClick(View v) { R.string.navigation_drawer_open, R.string.navigation_drawer_close);
if(!drawerLayout.isDrawerOpen(Gravity.START)) toggle.setDrawerIndicatorEnabled(true);
drawerLayout.openDrawer(Gravity.START); toggle.syncState();
else drawerLayout.closeDrawer(Gravity.END);
} drawerLayout.addDrawerListener(toggle);
});
} }
public void allNoteClicked(View view){ public void allNoteClicked(View view) {
startActivity(new Intent(getApplicationContext(), AllNotesActivity.class)); startActivity(new Intent(getApplicationContext(), AllNotesActivity.class));
} }
public void onCalendarClicked(View view){ public void onCalendarClicked(View view) {
startActivity(new Intent(getApplicationContext(), MyCalenderActivity.class)); startActivity(new Intent(getApplicationContext(), MyCalenderActivity.class));
} }
public void onVoiceMassagesClicked(View view){ public void onVoiceMassagesClicked(View view) {
startActivity(new Intent(getApplicationContext(), VoiceMassagesActivity.class)); startActivity(new Intent(getApplicationContext(), VoiceMassagesActivity.class));
} }
public void noNotedPicsClicked(View view){ public void noNotedPicsClicked(View view) {
startActivity(new Intent(getApplicationContext(), PicsActivity.class)); 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 ...@@ -77,19 +86,21 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
int id = item.getItemId(); int id = item.getItemId();
switch (id) { switch (id) {
case R.id.favorites:{ case R.id.favorites: {
startActivity(new Intent(getApplicationContext(), ArchivedNotesActivity.class)); startActivity(new Intent(getApplicationContext(), ArchivedNotesActivity.class));
break; break;
} }
case R.id.folders:{ case R.id.folders: {
break; break;
} }
case R.id.setting:{ case R.id.settings: {
startActivity(new Intent(getApplicationContext(), SettingActivity.class)); startActivity(new Intent(getApplicationContext(), SettingActivity.class));
} }
case R.id.information:{ case R.id.information: {
} }
} }
return true; return true;
} }
} }
\ No newline at end of file
...@@ -12,5 +12,6 @@ public class AllNotesActivity extends AppCompatActivity { ...@@ -12,5 +12,6 @@ public class AllNotesActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_all_notes); setContentView(R.layout.activity_all_notes);
setTitle("all notes");
} }
} }
\ No newline at end of file
...@@ -148,6 +148,7 @@ public class AllNotesListFragment extends Fragment { ...@@ -148,6 +148,7 @@ public class AllNotesListFragment extends Fragment {
@Override @Override
public void onClick(DialogInterface dialogInterface, int i) { public void onClick(DialogInterface dialogInterface, int i) {
noteDataBase.noteDao().deleteNote(note); noteDataBase.noteDao().deleteNote(note);
myNotes.remove(myChosenNote);
myAdaptor.notifyDataSetChanged(); myAdaptor.notifyDataSetChanged();
} }
}); });
...@@ -159,6 +160,8 @@ public class AllNotesListFragment extends Fragment { ...@@ -159,6 +160,8 @@ public class AllNotesListFragment extends Fragment {
}); });
alert.show(); alert.show();
allNoteToolBar.setVisibility(View.VISIBLE); allNoteToolBar.setVisibility(View.VISIBLE);
customToolbarOption.setVisibility(View.GONE);
allNoteToolBar.setVisibility(View.VISIBLE);
} }
protected void starClicked() { protected void starClicked() {
......
...@@ -157,6 +157,7 @@ public class CalenderNotesListFragment extends Fragment { ...@@ -157,6 +157,7 @@ public class CalenderNotesListFragment extends Fragment {
@Override @Override
public void onClick(DialogInterface dialogInterface, int i) { public void onClick(DialogInterface dialogInterface, int i) {
noteDataBase.dateNoreDAO().deleteDateNote(entityDates.get(myDates.indexOf(myChosenDateNote))); noteDataBase.dateNoreDAO().deleteDateNote(entityDates.get(myDates.indexOf(myChosenDateNote)));
myDates.remove(myChosenDateNote);
myAdaptor.notifyDataSetChanged(); myAdaptor.notifyDataSetChanged();
} }
}); });
...@@ -168,6 +169,7 @@ public class CalenderNotesListFragment extends Fragment { ...@@ -168,6 +169,7 @@ public class CalenderNotesListFragment extends Fragment {
}); });
alert.show(); alert.show();
calenderToolbar.setVisibility(View.VISIBLE); calenderToolbar.setVisibility(View.VISIBLE);
customToolbarOption.setVisibility(View.GONE);
} }
private void starClicked() { private void starClicked() {
......
...@@ -15,5 +15,6 @@ public class MyCalenderActivity extends AppCompatActivity { ...@@ -15,5 +15,6 @@ public class MyCalenderActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_my_calender); 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 { ...@@ -18,9 +18,10 @@ public class PicsActivity extends AppCompatActivity {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_pics); setContentView(R.layout.activity_pics);
BottomNavigationView navView = findViewById(R.id.nav_view);//set bottom navigation view 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 AppBarConfiguration appBarConfiguration = new AppBarConfiguration.Builder(R.id.navigation_picturedNoteList , R.id.navigation_choosePic).build();//set fragments
NavController navController = Navigation.findNavController(this , R.id.nav_host_fragment);//set place of fragment NavController navController = Navigation.findNavController(this , R.id.nav_pic_fragment_place);//set place of fragment
NavigationUI.setupActionBarWithNavController(this, navController, appBarConfiguration); NavigationUI.setupActionBarWithNavController(this, navController, appBarConfiguration);
NavigationUI.setupWithNavController(navView, navController); NavigationUI.setupWithNavController(navView, navController);
getSupportActionBar().setTitle("Pics");
} }
} }
\ No newline at end of file
...@@ -11,6 +11,7 @@ public class VoiceMassagesActivity extends AppCompatActivity { ...@@ -11,6 +11,7 @@ public class VoiceMassagesActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_voice_massages); setContentView(R.layout.activity_voice_massages);
setTitle("voice massages");
} }
} }
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
android:angle="45" android:angle="45"
android:centerX="35%" android:centerX="35%"
android:startColor="#2980b9" android:startColor="#2980b9"
android:endColor="#D0E4F1" android:endColor="#2980b9"
android:type="linear" android:type="linear"
/> />
<size <size
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
android:shape="rectangle"> android:shape="rectangle">
<gradient <gradient
android:startColor="@color/white" android:startColor="#D0E4F1"
android:endColor="#e3f2fb" android:endColor="#2980b9"
android:type="radial" android:type="radial"
android:gradientRadius="500dp"/> android:gradientRadius="500dp"/>
<stroke <stroke
......
...@@ -8,93 +8,113 @@ ...@@ -8,93 +8,113 @@
android:background="@drawable/main_bg_bright" android:background="@drawable/main_bg_bright"
android:orientation="vertical"> android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
tools:context=".MainActivity">
<Button <com.google.android.material.appbar.AppBarLayout
android:id="@+id/button2" android:layout_width="match_parent"
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"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp" android:fitsSystemWindows="true">
android:background="@drawable/bg_button"
android:onClick="onProgramsClicked" <androidx.appcompat.widget.Toolbar
android:text="@string/programs" android:id="@+id/toolbar_main"
app:layout_constraintEnd_toEndOf="parent" android:layout_width="match_parent"
app:layout_constraintStart_toStartOf="parent" android:layout_height="?attr/actionBarSize"
app:layout_constraintTop_toBottomOf="@+id/button8" /> android:background="?attr/colorPrimary"
app:layout_scrollFlags="scroll|enterAlways"/>
<Toolbar
android:id="@+id/toolBarId" </com.google.android.material.appbar.AppBarLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" android:layout_height="match_parent">
android:background="@drawable/bg_toolbar"
app:layout_constraintTop_toTopOf="parent"
tools:layout_editor_absoluteX="-68dp" <LinearLayout
tools:targetApi="lollipop">
<ImageView
android:id="@+id/toolbarList"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:adjustViewBounds="true" android:orientation="vertical"
android:src="@drawable/list" /> app:layout_constraintBottom_toBottomOf="parent"
</Toolbar> app:layout_constraintEnd_toEndOf="parent"
</androidx.constraintlayout.widget.ConstraintLayout> 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 <com.google.android.material.navigation.NavigationView
android:id="@+id/main_menu" android:id="@+id/main_menu"
android:layout_width="wrap_content" android:layout_width="wrap_content"
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
app:menu="@menu/bottom_nav_pic" /> app:menu="@menu/bottom_nav_pic" />
<fragment <fragment
android:id="@+id/nav_host_fragment" android:id="@+id/nav_pic_fragment_place"
android:name="androidx.navigation.fragment.NavHostFragment" android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
android:layout_weight="1" android:layout_weight="1"
android:layout_marginLeft="15dp" android:layout_marginLeft="15dp"
android:layout_marginRight="15dp" android:layout_marginRight="15dp"
android:layout_marginTop="5dp" android:layout_marginTop="12dp"
android:text="title" android:text="title"
android:padding="5dp" android:padding="5dp"
android:textColor="#000A43" android:textColor="#000A43"
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
android:layout_marginLeft="15dp" android:layout_marginLeft="15dp"
android:layout_marginRight="15dp" android:layout_marginRight="15dp"
android:lines="3" android:lines="3"
android:padding="5dp"
android:text="body text" android:text="body text"
android:textSize="12dp" /> android:textSize="12dp" />
......
...@@ -18,21 +18,6 @@ ...@@ -18,21 +18,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> 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> </FrameLayout>
<com.example.mynotepad.MenuFeatures.CustomToolbarOption <com.example.mynotepad.MenuFeatures.CustomToolbarOption
......
...@@ -15,22 +15,6 @@ ...@@ -15,22 +15,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> 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 <com.example.mynotepad.MenuFeatures.CustomToolbarOption
android:id="@+id/customToolbarOption" android:id="@+id/customToolbarOption"
android:layout_width="match_parent" android:layout_width="match_parent"
......
...@@ -3,12 +3,6 @@ ...@@ -3,12 +3,6 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".MenuFeatures.Pics.CameraFragment"> tools:context=".MenuFeatures.Pics.ChoosingPicsFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
</FrameLayout> </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 @@ ...@@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".MenuFeatures.Pics.NotedPicsFragment"> tools:context=".MenuFeatures.Pics.NotedPicsListFragment">
<!-- TODO: Update blank fragment layout --> <!-- TODO: Update blank fragment layout -->
<TextView <TextView
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <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 <item
android:id="@+id/navigation_picturedNoteList" android:id="@+id/navigation_picturedNoteList"
android:icon="@drawable/list" 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> </menu>
\ No newline at end of file
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
android:icon="@drawable/folder" android:icon="@drawable/folder"
android:title="@string/folders" /> android:title="@string/folders" />
<item <item
android:id="@+id/setting" android:id="@+id/settings"
android:icon="@drawable/setting" android:icon="@drawable/setting"
android:title="@string/setting" /> android:title="@string/setting" />
<item <item
......
...@@ -3,21 +3,16 @@ ...@@ -3,21 +3,16 @@
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/bottom_nav_pic" android:id="@+id/bottom_nav_pic"
app:startDestination="@id/notedPicsFragment"> app:startDestination="@id/navigation_picturedNoteList">
<fragment <fragment
android:id="@+id/cameraFragment" android:id="@+id/navigation_choosePic"
android:name="com.example.mynotepad.MenuFeatures.Pics.CameraFragment" android:name="com.example.mynotepad.MenuFeatures.Pics.ChoosingPicsFragment"
android:label="fragment_camera"
tools:layout="@layout/fragment_camera" />
<fragment
android:id="@+id/galleryFragment"
android:name="com.example.mynotepad.MenuFeatures.Pics.GalleryFragment"
android:label="fragment_gallery" android:label="fragment_gallery"
tools:layout="@layout/fragment_gallery" /> tools:layout="@layout/fragment_choosing_pics" />
<fragment <fragment
android:id="@+id/notedPicsFragment" android:id="@+id/navigation_picturedNoteList"
android:name="com.example.mynotepad.MenuFeatures.Pics.NotedPicsFragment" android:name="com.example.mynotepad.MenuFeatures.Pics.NotedPicsListFragment"
android:label="fragment_noted_pics" android:label="fragment_noted_pics"
tools:layout="@layout/fragment_noted_pics" /> tools:layout="@layout/fragment_noted_pics" />
</navigation> </navigation>
\ No newline at end of file
<resources> <resources>
<string name="app_name">MyNotepad</string> <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="all_notes">all notes</string>
<string name="hello_blank_fragment">Hello blank fragment</string> <string name="hello_blank_fragment">Hello blank fragment</string>
<string name="title">title</string> <string name="title">title</string>
...@@ -18,8 +18,11 @@ ...@@ -18,8 +18,11 @@
<string name="camera">camera</string> <string name="camera">camera</string>
<string name="gallery">gallery</string> <string name="gallery">gallery</string>
<string name="favourites">favourites</string> <string name="favourites">favourites</string>
<string name="noted_pics">noted pics</string>
<string name="programs">programs</string> <string name="programs">programs</string>
<string name="folders">folders</string> <string name="folders">folders</string>
<string name="calendar">calendar</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> </resources>
\ No newline at end of file
<resources> <resources>
<!-- Base application theme. --> <!-- Base application theme. -->
<style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar"> <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. --> <!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item> <item name="colorAccent">@color/colorAccent</item>
</style> </style>
</resources> <style name="AppThemeNoActionBAr" parent="Theme.AppCompat.Light.NoActionBar">
\ No newline at end of file <!-- 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