Commit 6abac0b9 authored by 9731301's avatar 9731301

add themes

parent b0482b44
......@@ -24,7 +24,7 @@
<activity android:name=".MenuFeatures.Setting.SettingActivity" />
<activity
android:name=".MainActivity"
android:theme="@style/AppThemeNoActionBAr">
android:theme="@style/AppThemeNoActionBArBright">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
......
......@@ -4,14 +4,12 @@ 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.animation.ObjectAnimator;
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;
......@@ -22,6 +20,7 @@ import com.example.mynotepad.MenuFeatures.AllNotes.DataBase.NoteDataBase;
import com.example.mynotepad.MenuFeatures.Calender.MyCalenderActivity;
import com.example.mynotepad.MenuFeatures.Pics.PicsActivity;
import com.example.mynotepad.MenuFeatures.Setting.SettingActivity;
import com.example.mynotepad.MenuFeatures.Utils;
import com.example.mynotepad.MenuFeatures.VoiceMassages.VoiceMassagesActivity;
import com.google.android.material.navigation.NavigationView;
......@@ -29,21 +28,43 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
public static NoteDataBase noteDataBase;
private DrawerLayout drawerLayout;
private ImageView theme;
private NavigationView navigationView;
private String themeState = "bright";
@Override
protected void onCreate(Bundle savedInstanceState) {
//todo check prefreces and set primitive theme and it is enough to set sTheme
super.onCreate(savedInstanceState);
Utils.onActivityCreateSetTheme(this);
setContentView(R.layout.activity_main);
init();
setBg(Utils.sTheme);
addListener();
}
private void setBg(String sTheme) {
switch (sTheme) {
case "dark":
drawerLayout.setBackgroundResource(R.drawable.main_bg_dark);
break;
case "bright":
drawerLayout.setBackgroundResource(R.drawable.main_bg_bright);
break;
case "colored":
drawerLayout.setBackgroundResource(R.drawable.main_bg_colored);
break;
}
}
private void init() {
noteDataBase = Room.databaseBuilder(this, NoteDataBase.class, "RoomDb").fallbackToDestructiveMigration().allowMainThreadQueries().build();
drawerLayout = findViewById(R.id.drawerLayout);
Toolbar toolbar = findViewById(R.id.toolbar_main);
NavigationView navigationView = findViewById(R.id.main_menu);//menu drawer in ui
navigationView = findViewById(R.id.main_menu);//menu drawer in ui
navigationView.setNavigationItemSelectedListener(this);
setSupportActionBar(toolbar);
......@@ -56,7 +77,24 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
drawerLayout.addDrawerListener(toggle);
View header = navigationView.getHeaderView(0);
theme = header.findViewById(R.id.theme);
// changeThemeToBright();//todo should be set by shared prefrence
}
private void addListener() {
theme.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (themeState.equals("bright")) {
changeThemeToDark();
} else if (themeState.equals("dark")) {
changeThemeToColored();
} else if (themeState.equals("colored")) {
changeThemeToBright();
}
}
});
}
public void allNoteClicked(View view) {
......@@ -102,5 +140,31 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
return true;
}
private void changeThemeToDark() {
animations(theme);
theme.setImageResource(R.drawable.ic_colored);
Utils.changeToTheme(this, "dark");
themeState = "dark";
}
private void changeThemeToBright() {
animations(theme);
theme.setImageResource(R.drawable.ic_night_mode);
Utils.changeToTheme(this, "bright");
themeState = "bright";
}
private void changeThemeToColored() {
Utils.changeToTheme(this, "colored");
animations(theme);
theme.setImageResource(R.drawable.ic_sun);
themeState = "colored";
}
private void animations(ImageView imageView) {
ObjectAnimator alpha = ObjectAnimator.ofFloat(imageView, "alpha", 0f, 1f);
ObjectAnimator rotation = ObjectAnimator.ofFloat(imageView, "rotation", 0f, 360f);
alpha.setDuration(1000).start();
rotation.setDuration(1000).start();
}
}
\ No newline at end of file
......@@ -14,6 +14,7 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.Toast;
import com.example.mynotepad.MenuFeatures.AllArchivedNotes.MyArchivedNotesRecyclerView.DateOrNote;
......@@ -25,6 +26,7 @@ import com.example.mynotepad.MenuFeatures.AllNotes.MyNoteRecyclerView.MyNote;
import com.example.mynotepad.MenuFeatures.Calender.MyCalenderRecyclerView.TimePicker.MyDate;
import com.example.mynotepad.MenuFeatures.CustomToolbarOption;
import com.example.mynotepad.MenuFeatures.CustomToolbarOptionListener;
import com.example.mynotepad.MenuFeatures.Utils;
import com.example.mynotepad.R;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
......@@ -46,6 +48,7 @@ public class ArchivedNoesListFragment extends Fragment {
private List<MyDate> myDates;
public static DateOrNote chosenDateOrNote;
private NavController navController;
private LinearLayout allNotesListLayout;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
......@@ -58,6 +61,21 @@ public class ArchivedNoesListFragment extends Fragment {
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
init(view);
setBg(Utils.sTheme);
}
private void setBg(String sTheme) {
switch (sTheme) {
case "dark":
allNotesListLayout.setBackgroundResource(R.drawable.main_bg_dark);
break;
case "bright":
allNotesListLayout.setBackgroundResource(R.drawable.main_bg_bright);
break;
case "colored":
allNotesListLayout.setBackgroundResource(R.drawable.main_bg_colored);
break;
}
}
private void init(View view) {
......@@ -69,6 +87,7 @@ public class ArchivedNoesListFragment extends Fragment {
allNoteToolBar = view.findViewById(R.id.toolbar);
allNoteToolBar.setEnabled(false);
navController = Navigation.findNavController(view);
allNotesListLayout = view.findViewById(R.id.allNoteListLayout);
//hide add button in favourite list
addNoteButton = view.findViewById(R.id.addButton);
......
......@@ -2,6 +2,8 @@ package com.example.mynotepad.MenuFeatures.AllArchivedNotes;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import com.example.mynotepad.MenuFeatures.Utils;
import com.example.mynotepad.R;
......@@ -11,5 +13,6 @@ public class ArchivedNotesActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_achived_notes);
Utils.onActivityCreateSetTheme(this);
}
}
\ No newline at end of file
......@@ -2,6 +2,9 @@ package com.example.mynotepad.MenuFeatures.AllNotes;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.LinearLayout;
import com.example.mynotepad.MenuFeatures.Utils;
import com.example.mynotepad.R;
......@@ -12,6 +15,9 @@ public class AllNotesActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_all_notes);
Utils.onActivityCreateSetTheme(this);
setTitle("all notes");
}
}
\ No newline at end of file
......@@ -14,6 +14,7 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.Toast;
import com.example.mynotepad.MenuFeatures.AllNotes.DataBase.Note;
import com.example.mynotepad.MenuFeatures.AllNotes.MyNoteRecyclerView.MyAllNotesAdaptor;
......@@ -21,6 +22,7 @@ import com.example.mynotepad.MenuFeatures.AllNotes.MyNoteRecyclerView.MyNote;
import com.example.mynotepad.MenuFeatures.AllNotes.MyNoteRecyclerView.OnAllNotesItemClickListener;
import com.example.mynotepad.MenuFeatures.CustomToolbarOption;
import com.example.mynotepad.MenuFeatures.CustomToolbarOptionListener;
import com.example.mynotepad.MenuFeatures.Utils;
import com.example.mynotepad.R;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import java.util.ArrayList;
......@@ -39,6 +41,7 @@ public class AllNotesListFragment extends Fragment {
private List<MyNote> myNotes;
public static MyNote myChosenNote;
private NavController navController;
private LinearLayout allNotesListLayout;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
......@@ -51,10 +54,26 @@ public class AllNotesListFragment extends Fragment {
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
init(view);
setBg(Utils.sTheme);
addListeners();
}
private void setBg(String sTheme) {
switch (sTheme) {
case "dark":
allNotesListLayout.setBackgroundResource(R.drawable.main_bg_dark);
break;
case "bright":
allNotesListLayout.setBackgroundResource(R.drawable.main_bg_bright);
break;
case "colored":
allNotesListLayout.setBackgroundResource(R.drawable.main_bg_colored);
break;
}
}
private void init(View view) {
// get data from database
......@@ -66,6 +85,7 @@ public class AllNotesListFragment extends Fragment {
allNoteToolBar.setEnabled(false);
addNoteButton = view.findViewById(R.id.addButton);
navController = Navigation.findNavController(view);
allNotesListLayout = view.findViewById(R.id.allNoteListLayout);
// show list with recycler view
recyclerView = view.findViewById(R.id.recyclerView);
......@@ -74,6 +94,7 @@ public class AllNotesListFragment extends Fragment {
recyclerView.setLayoutManager(linearLayoutManager);
recyclerView.setAdapter(myAdaptor);
}
private void addListeners() {
......
......@@ -16,6 +16,7 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.Toast;
import com.example.mynotepad.MenuFeatures.AllNotes.DataBase.DateEntity;
import com.example.mynotepad.MenuFeatures.Calender.MyCalenderRecyclerView.MyCalenderAdaptor;
......@@ -23,6 +24,7 @@ import com.example.mynotepad.MenuFeatures.Calender.MyCalenderRecyclerView.OnCale
import com.example.mynotepad.MenuFeatures.Calender.MyCalenderRecyclerView.TimePicker.MyDate;
import com.example.mynotepad.MenuFeatures.CustomToolbarOption;
import com.example.mynotepad.MenuFeatures.CustomToolbarOptionListener;
import com.example.mynotepad.MenuFeatures.Utils;
import com.example.mynotepad.R;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import java.util.ArrayList;
......@@ -42,6 +44,7 @@ public class CalenderNotesListFragment extends Fragment {
private List<DateEntity> entityDates;
public static MyDate myChosenDateNote;
private NavController navController;
private LinearLayout allNotesListLayout;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
......@@ -64,9 +67,24 @@ public class CalenderNotesListFragment extends Fragment {
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
init(view);
setBg(Utils.sTheme);
addListeners();
}
private void setBg(String sTheme) {
switch (sTheme) {
case "dark":
allNotesListLayout.setBackgroundResource(R.drawable.main_bg_dark);
break;
case "bright":
allNotesListLayout.setBackgroundResource(R.drawable.main_bg_bright);
break;
case "colored":
allNotesListLayout.setBackgroundResource(R.drawable.main_bg_colored);
break;
}
}
private void init(View view) {
......@@ -79,6 +97,7 @@ public class CalenderNotesListFragment extends Fragment {
calenderToolbar.setEnabled(false);
addDateBtn = view.findViewById(R.id.addButton);
navController = Navigation.findNavController(view);
allNotesListLayout = view.findViewById(R.id.allNoteListLayout);
// show list with recycler view
recyclerView = view.findViewById(R.id.recyclerView);
......
......@@ -4,6 +4,7 @@ import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import com.example.mynotepad.MenuFeatures.Utils;
import com.example.mynotepad.R;
......@@ -15,6 +16,7 @@ public class MyCalenderActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_my_calender);
Utils.onActivityCreateSetTheme(this);
setTitle("calendar");
}
}
\ No newline at end of file
......@@ -20,6 +20,7 @@ import android.widget.ImageView;
import android.widget.SeekBar;
import android.widget.Toast;
import com.example.mynotepad.MenuFeatures.Utils;
import com.example.mynotepad.R;
import java.io.File;
......@@ -43,6 +44,7 @@ public class CameraActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_camera_x);
Utils.onActivityCreateSetTheme(this);
checkRuntimePermission();
init();
addListeners();
......
package com.example.mynotepad.MenuFeatures;
import android.app.Activity;
import android.content.Intent;
import androidx.drawerlayout.widget.DrawerLayout;
import com.example.mynotepad.R;
public class Utils {
public static String sTheme ="dark";
/**
* Set the theme of the Activity, and restart it by creating a new Activity of the same type.
*/
public static void changeToTheme(Activity activity, String theme) {
System.out.println("noooooooooooooooooo");
sTheme = theme;
activity.finish();
activity.startActivity(new Intent(activity, activity.getClass()));
}
/**
* Set the theme of the activity, according to the configuration.
*/
public static void onActivityCreateSetTheme(Activity activity) {
switch (sTheme) {
case "dark":
activity.setTheme(R.style.AppThemeDark);
break;
case "bright":
activity.setTheme(R.style.AppThemeColored);
break;
case "colored":
activity.setTheme(R.style.AppTheme);
break;
}
}
}
......@@ -15,6 +15,7 @@ import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.SeekBar;
import android.widget.TextView;
......@@ -39,6 +40,8 @@ public class AudioListFragment extends Fragment {
private VoiceAdaptor recordingAdapter;
private ArrayList<MyVoice> myVoiceArrayList;
private CustomToolbarOption customToolbarOption;
private FrameLayout allNoteToolBar;
private MyVoice myChosenVoice;
private ImageButton playerPlayBtn;
private TextView fileNameTv , headerTitleTv;
......@@ -59,6 +62,7 @@ public class AudioListFragment extends Fragment {
fetchRecordings();
addListener();
}
private void init(View v) {
playerSheet = v.findViewById(R.id.player_sheet);
......@@ -71,6 +75,8 @@ public class AudioListFragment extends Fragment {
headerTitleTv = v.findViewById(R.id.player_header_title);
fileNameTv = v.findViewById(R.id.textView3);
seekBar = v.findViewById(R.id.seekBar);
allNoteToolBar = v.findViewById(R.id.toolbar);
allNoteToolBar.setEnabled(false);
recyclerViewRecordings = v.findViewById(R.id.recyclerView);
recyclerViewRecordings.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
......
......@@ -2,6 +2,8 @@ package com.example.mynotepad.MenuFeatures.VoiceMassages;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import com.example.mynotepad.MenuFeatures.Utils;
import com.example.mynotepad.R;
public class VoiceMassagesActivity extends AppCompatActivity {
......@@ -11,6 +13,7 @@ public class VoiceMassagesActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_voice_massages);
Utils.onActivityCreateSetTheme(this);
setTitle("voice massages");
}
}
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#4D94CF"/>
<stroke
android:width="7dp"
android:color="#F02F4557"/>
<corners android:radius="3dp"/>
</shape>
\ No newline at end of file
......@@ -3,7 +3,7 @@
<corners
android:radius="27dp"
/>
<solid android:color="#2980b9"/>
<solid android:color="?colorSecondary"/>
<size
android:width="190dp"
......
......@@ -3,7 +3,7 @@
<corners
android:radius="27dp"
/>
<solid android:color="#2980b9"/>
<solid android:color="?colorSecondary"/>
<size
android:width="120dp"
......
......@@ -3,7 +3,7 @@
<corners
android:radius="27dp"
/>
<solid android:color="#2980b9"/>
<solid android:color="?colorSecondary"/>
<size
android:width="54dp"
android:height="54dp"
......
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<selector xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<solid
android:color="#3A478C"/>
android:color="?android:textColorTertiary" tools:targetApi="lollipop" />
<corners android:topLeftRadius="12dp" android:topRightRadius="12dp"/>
</shape>
</item>
......
......@@ -3,8 +3,8 @@
android:shape="rectangle">
<gradient
android:startColor="#D0E4F1"
android:endColor="#2980b9"
android:startColor="?colorSecondaryVariant"
android:endColor="?colorSurface"
android:type="radial"
android:gradientRadius="500dp"/>
<stroke
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#70a1ff"/>
<stroke
android:width="13dp"
android:color="#4883B5DD"/>
<corners android:radius="0dp"/>
</shape>
\ No newline at end of file
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="427dp"
android:height="427dp"
android:width="24dp"
android:height="24dp"
android:viewportWidth="427"
android:viewportHeight="427.0013">
<path
......
......@@ -4,10 +4,10 @@
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="#FFFFFF">
<path
android:fillColor="#FFFFFF"
android:pathData="M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0"/>
<path
android:fillColor="#FFFCFC"
android:pathData="M9,2L7.17,4L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2L9,2zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z"/>
<path
android:fillColor="#FFFFFF"
android:pathData="M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0"/>
<path
android:fillColor="#FFFCFC"
android:pathData="M9,2L7.17,4L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2L9,2zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="74"
android:viewportHeight="74">
<path
android:fillColor="#FF000000"
android:pathData="m37.024,71.565a35.15,35.15 0,0 1,-10.359 -1.548,9.74 9.74,0 0,1 -6.443,-6.333 10.03,10.03 0,0 1,1.431 -9.07l3.483,-4.745a5.377,5.377 0,0 0,0.12 -6.355,5.607 5.607,0 0,0 -6.244,-2.236l-7.922,2.422a7.035,7.035 0,0 1,-9.09 -6.723c0,-19.047 15.712,-34.542 35.024,-34.542a34.8,34.8 0,0 1,34.976 34.541,34.823 34.823,0 0,1 -34.976,34.589zM20.6,39.069a7.561,7.561 0,0 1,6.3 3.316,7.413 7.413,0 0,1 -0.159,8.667l-3.476,4.748a7.923,7.923 0,0 0,-1.144 7.259,7.765 7.765,0 0,0 5.133,5.05 33.16,33.16 0,0 0,9.77 1.459,32.821 32.821,0 0,0 32.976,-32.592 32.8,32.8 0,0 0,-32.976 -32.541c-18.21,0 -33.024,14.598 -33.024,32.541a5.035,5.035 0,0 0,6.506 4.809l7.956,-2.429a8.284,8.284 0,0 1,2.138 -0.287z"/>
<path
android:fillColor="#FF000000"
android:pathData="m36.976,21.839a6.526,6.526 0,1 1,6.55 -6.5,6.51 6.51,0 0,1 -6.55,6.5zM36.976,10.787a4.526,4.526 0,1 0,4.55 4.55,4.531 4.531,0 0,0 -4.55,-4.55z"/>
<path
android:fillColor="#FF000000"
android:pathData="m55.492,32.5a6.526,6.526 0,1 1,6.55 -6.5,6.51 6.51,0 0,1 -6.55,6.5zM55.492,21.448a4.526,4.526 0,1 0,4.55 4.552,4.531 4.531,0 0,0 -4.55,-4.555z"/>
<path
android:fillColor="#FF000000"
android:pathData="m55.492,54.643a6.526,6.526 0,1 1,6.55 -6.5,6.51 6.51,0 0,1 -6.55,6.5zM55.492,43.591a4.526,4.526 0,1 0,4.55 4.55,4.531 4.531,0 0,0 -4.55,-4.55z"/>
<path
android:fillColor="#FF000000"
android:pathData="m35.857,63.873a6.526,6.526 0,1 1,6.55 -6.5,6.509 6.509,0 0,1 -6.55,6.5zM35.857,52.822a4.526,4.526 0,1 0,4.55 4.55,4.531 4.531,0 0,0 -4.55,-4.55z"/>
<path
android:fillColor="#FF000000"
android:pathData="m18.9,33.616a6.526,6.526 0,1 1,6.55 -6.5,6.509 6.509,0 0,1 -6.55,6.5zM18.9,22.564a4.526,4.526 0,1 0,4.55 4.55,4.531 4.531,0 0,0 -4.55,-4.55z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512.001"
android:viewportHeight="512.001">
<path
android:fillColor="#FF000000"
android:pathData="m406,151.001c8.284,0 15,-6.716 15,-15 0,-24.813 20.187,-45 45,-45 8.284,0 15,-6.716 15,-15s-6.716,-15 -15,-15c-24.393,0 -45,-21.065 -45,-46 0,-8.284 -6.716,-15 -15,-15s-15,6.716 -15,15c0,24.935 -20.607,46 -45,46 -8.284,0 -15,6.716 -15,15s6.716,15 15,15c24.813,0 45,20.187 45,45 0,8.284 6.716,15 15,15zM390.747,75.851c5.784,-4.41 10.865,-9.568 15.253,-15.479 4.387,5.91 9.468,11.069 15.253,15.479 -5.781,4.312 -10.922,9.437 -15.253,15.203 -4.331,-5.767 -9.472,-10.891 -15.253,-15.203z"/>
<path
android:fillColor="#FF000000"
android:pathData="m301,106.001c0,-8.284 -6.716,-15 -15,-15s-15,6.716 -15,15c0,41.355 -33.645,75 -75,75 -8.284,0 -15,6.716 -15,15s6.716,15 15,15c41.355,0 75,33.645 75,75 0,8.284 6.716,15 15,15s15,-6.716 15,-15c0,-41.355 33.645,-75 75,-75 8.284,0 15,-6.716 15,-15s-6.716,-15 -15,-15c-41.355,0 -75,-33.645 -75,-75zM286,231.973c-8.871,-14.722 -21.25,-27.101 -35.971,-35.972 14.722,-8.871 27.1,-21.25 35.971,-35.972 8.871,14.722 21.25,27.101 35.971,35.972 -14.721,8.871 -27.1,21.249 -35.971,35.972z"/>
<path
android:fillColor="#FF000000"
android:pathData="m256,512.001c128.638,0 238.83,-96.522 255.862,-221.298 0.946,-6.93 -3.022,-13.593 -9.566,-16.063 -6.542,-2.469 -13.924,-0.09 -17.793,5.737 -33.016,49.73 -91.835,80.624 -153.503,80.624 -99.252,0 -180,-80.748 -180,-180 0,-61.668 30.893,-120.487 80.624,-153.503 5.826,-3.868 8.207,-11.25 5.737,-17.793 -2.469,-6.543 -9.131,-10.511 -16.063,-9.566 -124.939,17.055 -221.298,127.397 -221.298,255.862 0,140.959 115.05,256 256,256zM168.226,45.654c-29.922,37.658 -47.226,85.737 -47.226,135.347 0,115.794 94.206,210 210,210 49.61,0 97.688,-17.304 135.347,-47.226 -34.932,81.747 -117.091,138.226 -210.347,138.226 -124.617,0 -226,-101.383 -226,-226 0,-93.256 56.479,-175.415 138.226,-210.347z"/>
</vector>
......@@ -3,7 +3,7 @@
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
android:tint="#FFFFFF">
<path
android:fillColor="@android:color/white"
android:pathData="M19,2h-4.18C14.4,0.84 13.3,0 12,0c-1.3,0 -2.4,0.84 -2.82,2L5,2c-1.1,0 -2,0.9 -2,2v16c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2L21,4c0,-1.1 -0.9,-2 -2,-2zM12,2c0.55,0 1,0.45 1,1s-0.45,1 -1,1 -1,-0.45 -1,-1 0.45,-1 1,-1zM19,20L5,20L5,4h2v3h10L17,4h2v16z"/>
......
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="45.16dp"
android:height="45.16dp"
android:viewportWidth="45.16"
android:viewportHeight="45.16">
<path
android:fillColor="#FF000000"
android:pathData="M22.58,11.269c-6.237,0 -11.311,5.075 -11.311,11.312s5.074,11.312 11.311,11.312c6.236,0 11.311,-5.074 11.311,-11.312S28.816,11.269 22.58,11.269z"/>
<path
android:fillColor="#FF000000"
android:pathData="M22.58,7.944c-1.219,0 -2.207,-0.988 -2.207,-2.206V2.207C20.373,0.988 21.361,0 22.58,0c1.219,0 2.207,0.988 2.207,2.207v3.531C24.787,6.956 23.798,7.944 22.58,7.944z"/>
<path
android:fillColor="#FF000000"
android:pathData="M22.58,37.215c-1.219,0 -2.207,0.988 -2.207,2.207v3.53c0,1.22 0.988,2.208 2.207,2.208c1.219,0 2.207,-0.988 2.207,-2.208v-3.53C24.787,38.203 23.798,37.215 22.58,37.215z"/>
<path
android:fillColor="#FF000000"
android:pathData="M32.928,12.231c-0.861,-0.862 -0.861,-2.259 0,-3.121l2.497,-2.497c0.861,-0.861 2.259,-0.861 3.121,0c0.862,0.862 0.862,2.26 0,3.121l-2.497,2.497C35.188,13.093 33.791,13.093 32.928,12.231z"/>
<path
android:fillColor="#FF000000"
android:pathData="M12.231,32.93c-0.862,-0.863 -2.259,-0.863 -3.121,0l-2.497,2.496c-0.861,0.861 -0.862,2.26 0,3.121c0.862,0.861 2.26,0.861 3.121,0l2.497,-2.498C13.093,35.188 13.093,33.79 12.231,32.93z"/>
<path
android:fillColor="#FF000000"
android:pathData="M37.215,22.58c0,-1.219 0.988,-2.207 2.207,-2.207h3.531c1.219,0 2.207,0.988 2.207,2.207c0,1.219 -0.988,2.206 -2.207,2.206h-3.531C38.203,24.786 37.215,23.799 37.215,22.58z"/>
<path
android:fillColor="#FF000000"
android:pathData="M7.944,22.58c0,-1.219 -0.988,-2.207 -2.207,-2.207h-3.53C0.988,20.373 0,21.361 0,22.58c0,1.219 0.988,2.206 2.207,2.206h3.531C6.956,24.786 7.944,23.799 7.944,22.58z"/>
<path
android:fillColor="#FF000000"
android:pathData="M32.928,32.93c0.862,-0.861 2.26,-0.861 3.121,0l2.497,2.497c0.862,0.86 0.862,2.259 0,3.12s-2.259,0.861 -3.121,0l-2.497,-2.497C32.066,35.188 32.066,33.791 32.928,32.93z"/>
<path
android:fillColor="#FF000000"
android:pathData="M12.231,12.231c0.862,-0.862 0.862,-2.259 0,-3.121L9.734,6.614c-0.862,-0.862 -2.259,-0.862 -3.121,0c-0.862,0.861 -0.862,2.259 0,3.12l2.497,2.497C9.972,13.094 11.369,13.094 12.231,12.231z"/>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
android:shape="rectangle">
<solid android:color="#45C0D7EA"/>
<stroke
android:width="5dp"
android:color="#CADCEC"/>
<corners android:radius="0dp"/>
</shape>
\ No newline at end of file
......@@ -4,7 +4,8 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MenuFeatures.AllNotes.AllNotesActivity">
tools:context=".MenuFeatures.AllNotes.AllNotesActivity"
android:id="@+id/allotesLayout">
<fragment
......
......@@ -54,17 +54,16 @@
android:background="@drawable/bg_button2"
android:gravity="center"
android:onClick="allNoteClicked"
android:text="@string/all_notes"
android:textColor="@color/design_default_color_surface" />
android:text="@string/all_notes" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_icon"
android:onClick="allNoteClicked"
android:padding="8dp"
android:src="@drawable/ic_notes" />
android:src="@drawable/ic_notes"
app:tint="?android:textColor" />
</LinearLayout>
<LinearLayout
......@@ -82,7 +81,6 @@
android:gravity="center"
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"
......@@ -92,7 +90,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="onCalendarClicked"
app:tint="?android:textColor"
android:background="@drawable/bg_icon"
android:padding="10dp"
android:src="@drawable/ic_calender" />
......@@ -112,14 +110,14 @@
android:background="@drawable/bg_button2"
android:gravity="center"
android:onClick="onVoiceMassagesClicked"
android:text="@string/voice_massages"
android:textColor="@color/design_default_color_surface" />
android:text="@string/voice_massages" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_icon"
android:onClick="onVoiceMassagesClicked"
app:tint="?android:textColor"
android:padding="8dp"
android:src="@drawable/ic_voice" />
</LinearLayout>
......@@ -140,7 +138,6 @@
android:gravity="center"
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"
......@@ -152,8 +149,40 @@
android:background="@drawable/bg_icon"
android:onClick="noNotedPicsClicked"
android:padding="10dp"
app:tint="?android:textColor"
android:src="@drawable/ic_noted_pictures" />
</LinearLayout>
<LinearLayout
android:id="@+id/programBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:background="@drawable/bg_button"
android:orientation="horizontal">
<TextView
android:id="@+id/program"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_button2"
android:gravity="center"
android:onClick="onProgramsClicked"
android:text="@string/programs"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.502"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button6" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_icon"
android:onClick="onProgramsClicked"
android:padding="10dp"
app:tint="?android:textColor"
android:src="@drawable/ic_program" />
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
......@@ -164,7 +193,7 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="#e3f2fb"
android:background="?colorSecondaryVariant"
android:fitsSystemWindows="true"
app:headerLayout="@layout/menu_header"
app:menu="@menu/drawer_menu" />
......
......@@ -15,7 +15,7 @@
android:layout_marginTop="12dp"
android:text="title"
android:padding="5dp"
android:textColor="#000A43"
android:textColor="?android:textColorPrimary"
android:textSize="20dp" />
<TextView
......@@ -28,7 +28,7 @@
android:layout_marginRight="15dp"
android:lines="3"
android:padding="5dp"
android:textColor="?android:textColorPrimary"
android:text="body text"
android:textSize="12dp" />
......
......@@ -2,7 +2,7 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/bg_toolbar"
android:background="@color/colorPrimary"
android:orientation="horizontal">
......
......@@ -42,7 +42,7 @@
android:background="@drawable/bg_button"
android:gravity="center"
android:text="@string/save"
android:textColor="#FFFFFF"
android:textColor="?android:textColor"
android:textSize="20dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="@+id/imageView"
......@@ -58,7 +58,7 @@
android:background="@drawable/bg_button"
android:gravity="center"
android:text="@string/back"
android:textColor="#FFFFFF"
android:textColor="?android:textColor"
android:textSize="20dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/imageView"
......
......@@ -6,7 +6,8 @@
android:layout_height="match_parent"
android:background="@drawable/main_bg_bright"
android:orientation="vertical"
tools:context=".MenuFeatures.AllNotes.AllNotesListFragment">
tools:context=".MenuFeatures.AllNotes.AllNotesListFragment"
android:id="@+id/allNoteListLayout">
<FrameLayout
......@@ -37,9 +38,8 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="409dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#4883B5DD"
tools:layout_editor_absoluteX="1dp"
tools:layout_editor_absoluteY="1dp" />
......
......@@ -6,28 +6,30 @@
android:orientation="vertical"
tools:context=".MenuFeatures.VoiceMassages.AudioListFragment">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<FrameLayout
android:id="@+id/voiceToolbar"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="50dp"
android:background="@drawable/index">
<com.example.mynotepad.MenuFeatures.CustomToolbarOption
android:id="@+id/customToolbarOption"
android:layout_width="match_parent"
android:layout_height="50dp" />
</FrameLayout>
</FrameLayout>
<com.example.mynotepad.MenuFeatures.CustomToolbarOption
android:id="@+id/customToolbarOption"
android:layout_width="match_parent"
android:layout_height="50dp" />
</FrameLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="409dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="50dp"
android:background="#4883B5DD"
tools:layout_editor_absoluteX="1dp"
tools:layout_editor_absoluteY="1dp" />
......
......@@ -37,7 +37,7 @@
android:layout_height="wrap_content"
android:background="@drawable/bg_icon"
android:padding="10dp"
android:src="@drawable/camera" />
android:src="@drawable/ic_camera" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
......
......@@ -13,14 +13,21 @@
android:scaleType="fitXY"
android:src="@drawable/index" />
<ImageView
android:id="@+id/img"
android:layout_below="@+id/imageView8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="40dp"
android:src="@drawable/pic_stones"/>
<LinearLayout
android:id="@+id/linearLayoutRecorder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/imageView8"
android:layout_below="@+id/img"
android:layout_alignParentBottom="@id/imageView8"
android:layout_marginTop="80dp"
android:orientation="vertical">
<ImageView
......
......@@ -3,8 +3,43 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@drawable/index">
android:background="?colorSurface"
android:layout_height="140dp"
android:id="@+id/main_activity_layout">
<ImageView
android:id="@+id/imageView3"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="20dp"
android:src="@drawable/pic_flowers"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="19dp"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="16dp"
android:text="welcome"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView3" />
<ImageView
android:id="@+id/theme"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="24dp"
android:layout_marginRight="24dp"
android:padding="6dp"
android:src="@drawable/ic_night_mode"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="?android:textColor" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -16,7 +16,7 @@
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginTop="17dp"
android:background="@drawable/media_header_bg"
android:background="@drawable/bg_media_header"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
......
......@@ -3,4 +3,27 @@
<color name="colorPrimary">#457FAE</color>
<color name="colorPrimaryDark">#3A478C</color>
<color name="colorAccent">#2980b9</color>
<color name="colorButtonTxt">#FFFFFF</color>
<color name="colorBtn">#2980b9</color>
<color name="colorDrawer">#e3f2fb</color>
<color name="colorHeader">#F57AA0B5</color>
<color name="mediaHeader">#3A478C</color>
<color name="colorPrimary2">#ffb142</color>
<color name="colorPrimaryDark2">#cc8e35</color>
<color name="colorAccent2">#ffda79</color>
<color name="colorButtonTxt2">#FFFFFF</color>
<color name="colorBtn2">#f2dbb2</color>
<color name="colorDrawer2">#e9d9bf</color>
<color name="colorHeader2">#ffda79</color>
<color name="mediaHeader2">#9E691D</color>
<color name="colorPrimary3">#2ed573</color>
<color name="colorPrimaryDark3">#cc8e35</color>
<color name="colorAccent3">#ffda79</color>
<color name="colorButtonTxt3">#ff6348</color>
<color name="colorBtn3">#f2dbb2</color>
<color name="colorDrawer3">#e9d9bf</color>
<color name="colorHeader3">#ffda79</color>
<color name="mediaHeader3">#9E691D</color>
</resources>
\ No newline at end of file
<resources>
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<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>
<item name="colorSecondary">@color/colorBtn</item>
<item name="android:textColor">@color/white</item>
<item name="android:textColorPrimary">@color/black</item>
<item name="colorSecondaryVariant">@color/colorDrawer</item>
<item name="colorSurface">@color/colorHeader</item>
<item name="android:textColorTertiary">@color/mediaHeader</item>
</style>
<style name="AppThemeNoActionBAr" parent="Theme.AppCompat.Light.NoActionBar">
<!-- bright application theme. -->
<style name="AppThemeNoActionBArBright" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="colorSecondary">@color/colorBtn</item>
<item name="android:textColor">@color/white</item>
<item name="android:textColorPrimary">@color/black</item>
<item name="colorSecondaryVariant">@color/colorDrawer</item>
<item name="colorSurface">@color/colorHeader</item>
<item name="android:textColorTertiary">@color/mediaHeader</item>
</style>
<!-- dark application theme. -->
<style name="AppThemeDark" parent="Theme.AppCompat.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary2</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark2</item>
<item name="colorAccent">@color/colorAccent2</item>
<item name="colorSecondary">@color/colorBtn2</item>
<item name="android:textColor">@color/black</item>
<item name="android:textColorPrimary">@color/white</item>
<item name="colorSecondaryVariant">@color/colorDrawer2</item>
<item name="colorSurface">@color/colorHeader2</item>
<item name="android:textColorTertiary">@color/mediaHeader2</item>
</style>
<style name="AppThemeColored">
<item name="colorPrimary">@color/colorPrimary3</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark3</item>
<item name="colorAccent">@color/colorAccent3</item>
<item name="colorSecondary">@color/colorBtn3</item>
<item name="android:textColor">@color/black</item>
<item name="android:textColorPrimary">@color/white</item>
<item name="colorSecondaryVariant">@color/colorDrawer3</item>
<item name="colorSurface">@color/colorHeader3</item>
<item name="android:textColorTertiary">@color/mediaHeader3</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