Browse Source

a lot of things

felocsss 1 năm trước cách đây
mục cha
commit
667fde5225
25 tập tin đã thay đổi với 828 bổ sung115 xóa
  1. 4 4
      app/build.gradle
  2. 58 0
      app/src/main/java/com/sharix/sportsmanfriend/BaseDialogClass.java
  3. 108 0
      app/src/main/java/com/sharix/sportsmanfriend/dialogs/ChoiceOfSportDialog.java
  4. 13 0
      app/src/main/java/com/sharix/sportsmanfriend/view/LauncherActivity.java
  5. 8 2
      app/src/main/java/com/sharix/sportsmanfriend/view/MainActivity.java
  6. 0 62
      app/src/main/java/com/sharix/sportsmanfriend/view/fragments/CalendarFragment.java
  7. 53 3
      app/src/main/java/com/sharix/sportsmanfriend/view/fragments/CreateMettingFragment.java
  8. 21 0
      app/src/main/java/com/sharix/sportsmanfriend/view/fragments/EventFiltersFragment.java
  9. 6 16
      app/src/main/java/com/sharix/sportsmanfriend/view/fragments/MapFragment.java
  10. 18 0
      app/src/main/res/drawable/black_border_2.xml
  11. 3 0
      app/src/main/res/drawable/custom_radio_button.xml
  12. 5 0
      app/src/main/res/drawable/ic_back.xml
  13. 5 0
      app/src/main/res/drawable/ic_forward.xml
  14. 5 0
      app/src/main/res/drawable/ic_select_event_location.xml
  15. 4 0
      app/src/main/res/drawable/radio_checked.xml
  16. 5 0
      app/src/main/res/drawable/switch_selector.xml
  17. 1 1
      app/src/main/res/layout/activity_login.xml
  18. 1 1
      app/src/main/res/layout/activity_singinsingup.xml
  19. 142 0
      app/src/main/res/layout/dialog_choice_of_sport.xml
  20. 0 8
      app/src/main/res/layout/fragment_calendar.xml
  21. 313 7
      app/src/main/res/layout/fragment_create_metting.xml
  22. 14 0
      app/src/main/res/layout/fragment_event_filters.xml
  23. 18 11
      app/src/main/res/layout/fragment_event_list.xml
  24. 2 0
      app/src/main/res/values/colors.xml
  25. 21 0
      app/src/main/res/values/themes.xml

+ 4 - 4
app/build.gradle

@@ -36,10 +36,10 @@ android {
 dependencies {
     implementation 'com.google.android.gms:play-services-location:21.0.1'
     implementation 'org.osmdroid:osmdroid-android:6.1.14'
-    implementation 'androidx.appcompat:appcompat:1.5.1'
-    implementation 'com.google.android.material:material:1.7.0'
+    implementation 'androidx.appcompat:appcompat:1.6.1'
+    implementation 'com.google.android.material:material:1.5.0'
     implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
     testImplementation 'junit:junit:4.13.2'
-    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
-    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
+    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
+    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
 }

+ 58 - 0
app/src/main/java/com/sharix/sportsmanfriend/BaseDialogClass.java

@@ -0,0 +1,58 @@
+package com.sharix.sportsmanfriend;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.graphics.Color;
+import android.graphics.drawable.ColorDrawable;
+import android.os.Bundle;
+import android.view.View;
+import android.view.WindowManager;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatDialogFragment;
+
+
+public abstract class BaseDialogClass extends AppCompatDialogFragment {
+
+    protected BaseDialogClass.DialogListener listener;
+    protected View view;
+
+    @NonNull
+    @Override
+    public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
+
+        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
+
+        Dialog d = builder.setView(view).create();
+
+        WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
+        lp.copyFrom(d.getWindow().getAttributes());
+        lp.width = WindowManager.LayoutParams.MATCH_PARENT;
+        lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
+        d.getWindow().setAttributes(lp);
+        d.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
+
+        return d;
+    }
+
+    @Override
+    public void onAttach(@NonNull Context context) {
+        super.onAttach(context);
+
+        try {
+            listener = (BaseDialogClass.DialogListener) getTargetFragment();
+        }catch (ClassCastException e) {
+            throw new ClassCastException(getTargetFragment().toString() + "must implement Example Dialog listener");
+        }
+
+    }
+
+    public interface DialogListener{
+        void applyInfo(Bundle bundle);
+    }
+
+    protected abstract Bundle DataToTransfer();
+}

+ 108 - 0
app/src/main/java/com/sharix/sportsmanfriend/dialogs/ChoiceOfSportDialog.java

@@ -0,0 +1,108 @@
+package com.sharix.sportsmanfriend.dialogs;
+
+import android.app.Dialog;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.CompoundButton;
+import android.widget.RadioButton;
+import android.widget.Toast;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+import com.sharix.sportsmanfriend.BaseDialogClass;
+import com.sharix.sportsmanfriend.R;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class ChoiceOfSportDialog extends BaseDialogClass
+{
+    Button btn_apply, btn_cancel;
+    RadioButton selectedRadioButton;
+    Dialog dialog;
+
+    @NonNull
+    @Override
+    public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
+
+        LayoutInflater inflater = getActivity().getLayoutInflater();
+        view = inflater.inflate(R.layout.dialog_choice_of_sport, null);
+
+        btn_apply = view.findViewById(R.id.btn_apply);
+        btn_cancel = view.findViewById(R.id.btn_cancel);
+
+        addClickEventToAllButtons();
+
+        dialog = super.onCreateDialog(savedInstanceState);
+        return dialog;
+    }
+
+    @Override
+    protected Bundle DataToTransfer() {
+        Bundle bundle = new Bundle();
+        bundle.putString("FromBlock", "SportBlock");
+        String tag = (String) selectedRadioButton.getTag();
+        String[] arr = tag.split(",");
+        bundle.putInt("Id", Integer.parseInt(arr[0]));
+        bundle.putString("Name", arr[1]);
+        return bundle;
+    }
+
+    private List<RadioButton> findAllRadioButtons(ViewGroup root) {
+        List<RadioButton> radioButtons = new ArrayList<>();
+        for (int i = 0; i < root.getChildCount(); i++) {
+            View child = root.getChildAt(i);
+            if (child instanceof RadioButton) {
+                radioButtons.add((RadioButton) child);
+            } else if (child instanceof ViewGroup) {
+                radioButtons.addAll(findAllRadioButtons((ViewGroup) child));
+            }
+        }
+        return radioButtons;
+    }
+
+    private void addClickEventToAllButtons() {
+
+        List<RadioButton> radioButtons = findAllRadioButtons((ViewGroup) view);
+        for (RadioButton element : radioButtons) {
+            element.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+                @Override
+                public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+                    if (isChecked) {
+                        for (RadioButton _element : radioButtons) {
+                            if (_element != buttonView) {
+                                _element.setChecked(false);
+                            }
+                        }
+                    }
+                }
+            });
+        }
+
+        btn_apply.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                for (RadioButton RB : radioButtons){
+                    if (RB.isChecked()) {
+                        selectedRadioButton = RB;
+                        listener.applyInfo(DataToTransfer());
+                        dialog.cancel();
+                        break;
+                    }
+                }
+            }
+        });
+
+        btn_cancel.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                dialog.cancel();
+            }
+        });
+    }
+}

+ 13 - 0
app/src/main/java/com/sharix/sportsmanfriend/view/LauncherActivity.java

@@ -1,8 +1,11 @@
 package com.sharix.sportsmanfriend.view;
 
 import androidx.appcompat.app.AppCompatActivity;
+import androidx.appcompat.app.AppCompatDelegate;
 
+import android.content.Context;
 import android.content.Intent;
+import android.content.SharedPreferences;
 import android.os.Bundle;
 import android.os.Handler;
 
@@ -10,11 +13,21 @@ import com.sharix.sportsmanfriend.R;
 
 public class LauncherActivity extends AppCompatActivity {
 
+    SharedPreferences preferences;
+    SharedPreferences.Editor editor;
+
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_launcher);
 
+       /* preferences = getSharedPreferences("MODE", Context.MODE_PRIVATE);
+
+        AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
+        editor = preferences.edit();
+        editor.putBoolean("night", true);
+        editor.apply();*/
+
         new Handler().postDelayed(new Runnable(){
             @Override
             public void run() {

+ 8 - 2
app/src/main/java/com/sharix/sportsmanfriend/view/MainActivity.java

@@ -3,12 +3,13 @@ package com.sharix.sportsmanfriend.view;
 import androidx.appcompat.app.AppCompatActivity;
 import android.os.Bundle;
 import android.preference.PreferenceManager;
-import android.widget.Toast;
+import android.util.Log;
 
 import com.sharix.sportsmanfriend.BuildConfig;
 import com.sharix.sportsmanfriend.OnBackPressedListener;
 import com.sharix.sportsmanfriend.R;
 import com.sharix.sportsmanfriend.databinding.ActivityMainBinding;
+import com.sharix.sportsmanfriend.BaseDialogClass;
 import com.sharix.sportsmanfriend.view.fragments.CalendarFragment;
 import com.sharix.sportsmanfriend.view.fragments.ChatsFragment;
 import com.sharix.sportsmanfriend.view.fragments.CreateMettingFragment;
@@ -21,7 +22,7 @@ import androidx.fragment.app.FragmentTransaction;
 
 import org.osmdroid.config.Configuration;
 
-public class MainActivity extends AppCompatActivity implements OnBackPressedListener {
+public class MainActivity extends AppCompatActivity implements OnBackPressedListener, BaseDialogClass.DialogListener {
 
     ActivityMainBinding binding;
 
@@ -95,4 +96,9 @@ public class MainActivity extends AppCompatActivity implements OnBackPressedList
             super.onBackPressed();
         }
     }
+
+    @Override
+    public void applyInfo(Bundle bundle) {
+
+    }
 }

+ 0 - 62
app/src/main/java/com/sharix/sportsmanfriend/view/fragments/CalendarFragment.java

@@ -1,82 +1,20 @@
 package com.sharix.sportsmanfriend.view.fragments;
 
 import android.os.Bundle;
-
-import androidx.annotation.NonNull;
 import androidx.fragment.app.Fragment;
-
-import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
-import android.widget.CalendarView;
-import android.widget.EditText;
-import android.widget.TextView;
-
 import com.sharix.sportsmanfriend.R;
 
-import java.util.Calendar;
-
 public class CalendarFragment extends Fragment {
 
-    private Bundle savedState = null;
-    EditText vstup;
-
     @Override
     public View onCreateView(LayoutInflater inflater, ViewGroup container,
                              Bundle savedInstanceState) {
         View view = inflater.inflate(R.layout.fragment_calendar, container, false);
 
-        vstup = view.findViewById(R.id.textView7);
-
-        if(savedInstanceState != null && savedState == null) {
-            savedState = savedInstanceState.getBundle("key1");
-        }
-        if(savedState != null) {
-            vstup.setText(savedState.getCharSequence("key2"));
-        }
-        savedState = null;
-
         return view;
     }
 
-    @Override
-    public void onPause() {
-        super.onPause();
-        Log.d("TAG", "onPause: ");
-    }
-
-    @Override
-    public void onStop() {
-        super.onStop();
-        Log.d("TAG", "onStop: ");
-    }
-
-    @Override
-    public void onDestroyView() {
-        super.onDestroyView();
-        savedState = saveState(); /* vstup defined here for sure */
-        vstup = null;
-    }
-
-    private Bundle saveState() { /* called either from onDestroyView() or onSaveInstanceState() */
-        Bundle state = new Bundle();
-        state.putCharSequence("key2", vstup.getText());
-        return state;
-    }
-
-    @Override
-    public void onDestroy() {
-        super.onDestroy();
-        Log.d("TAG", "onDestroy: ");
-    }
-
-    @Override
-    public void onSaveInstanceState(Bundle outState) {
-        super.onSaveInstanceState(outState);
-        /* If onDestroyView() is called first, we can use the previously savedState but we can't call saveState() anymore */
-        /* If onSaveInstanceState() is called first, we don't have savedState, so we need to call saveState() */
-        /* => (?:) operator inevitable! */
-        outState.putBundle("key1", (savedState != null) ? savedState : saveState());
-    }
 }

+ 53 - 3
app/src/main/java/com/sharix/sportsmanfriend/view/fragments/CreateMettingFragment.java

@@ -1,20 +1,70 @@
 package com.sharix.sportsmanfriend.view.fragments;
 
+import android.content.Context;
 import android.os.Bundle;
 
 import androidx.annotation.NonNull;
-import androidx.fragment.app.Fragment;
+import androidx.constraintlayout.widget.ConstraintLayout;
 
+import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
+import android.widget.TextView;
 
+import com.sharix.sportsmanfriend.BaseDialogClass;
+import com.sharix.sportsmanfriend.BaseFragmentClass;
 import com.sharix.sportsmanfriend.R;
-public class CreateMettingFragment extends Fragment {
+import com.sharix.sportsmanfriend.dialogs.ChoiceOfSportDialog;
+
+public class CreateMettingFragment extends BaseFragmentClass implements BaseDialogClass.DialogListener {
+
+    private ConstraintLayout SportBlock;
+    private TextView SportBlockText;
 
     @Override
     public View onCreateView(LayoutInflater inflater, ViewGroup container,
                              Bundle savedInstanceState) {
-        return inflater.inflate(R.layout.fragment_create_metting, container, false);
+        View v = inflater.inflate(R.layout.fragment_create_metting, container, false);
+
+        SportBlock = v.findViewById(R.id.sportBlock);
+        SportBlockText = v.findViewById(R.id.sportBlockText);
+
+        addClickEventToAllButtons();
+
+        return v;
+    }
+
+    private void addClickEventToAllButtons(){
+
+        SportBlock.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+
+                ChoiceOfSportDialog choiceOfSportDialog = new ChoiceOfSportDialog();
+                choiceOfSportDialog.setTargetFragment(CreateMettingFragment.this, 0);
+                choiceOfSportDialog.show(getActivity().getSupportFragmentManager(), "choiceOfSportDialog");
+
+            }
+        });
+    }
+
+    @Override
+    protected boolean hasSavedState() {
+        return false;
+    }
+
+    @Override
+    protected Bundle getStateToSave() {
+        return null;
+    }
+
+    @Override
+    public void applyInfo(Bundle bundle) {
+        Log.d("TAG", "applyInfo: ");
+        switch (bundle.getString("FromBlock")){
+            case "SportBlock":
+                SportBlockText.setText(bundle.getString("Name"));
+        }
     }
 }

+ 21 - 0
app/src/main/java/com/sharix/sportsmanfriend/view/fragments/EventFiltersFragment.java

@@ -0,0 +1,21 @@
+package com.sharix.sportsmanfriend.view.fragments;
+
+import android.os.Bundle;
+
+import androidx.fragment.app.Fragment;
+
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import com.sharix.sportsmanfriend.R;
+
+public class EventFiltersFragment extends Fragment {
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+                             Bundle savedInstanceState) {
+        // Inflate the layout for this fragment
+        return inflater.inflate(R.layout.fragment_event_filters, container, false);
+    }
+}

+ 6 - 16
app/src/main/java/com/sharix/sportsmanfriend/view/fragments/MapFragment.java

@@ -1,6 +1,7 @@
 package com.sharix.sportsmanfriend.view.fragments;
 
 import android.Manifest;
+import android.content.Context;
 import android.content.pm.PackageManager;
 
 import android.os.Bundle;
@@ -42,15 +43,11 @@ public class MapFragment extends BaseFragmentClass {
 
     private double latitude, longitude;
 
-    private static final int REQUEST_CODE = 1;
-    private String[] permissions = {Manifest.permission.READ_CONTACTS};
-
     @Override
     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
 
         View view = inflater.inflate(R.layout.fragment_map, container, false);
 
-        //
         btnZoomIn = view.findViewById(R.id.btn_zoomIn);
         btnZoomOut = view.findViewById(R.id.btn_zoomOut);
         btnMyLocation = view.findViewById(R.id.btnMyLocation);
@@ -64,13 +61,17 @@ public class MapFragment extends BaseFragmentClass {
             configureMap(55.934473, 37.497081, 15);
         }
 
-        ActivityCompat.requestPermissions(getActivity(), permissions, REQUEST_CODE);
         askPermissions();
         addClickEventToAllButtons();
 
         return view;
     }
 
+    @Override
+    public void onAttach(@NonNull Context context) {
+        super.onAttach(context);
+    }
+
     @Override
     public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
         super.onRequestPermissionsResult(requestCode, permissions, grantResults);
@@ -143,22 +144,11 @@ public class MapFragment extends BaseFragmentClass {
         });
 
         btnOpenEventList.setOnClickListener(v -> {
-            // Получаем менеджер фрагментов
             FragmentManager fragmentManager = getActivity().getSupportFragmentManager();
-
-            // Создаем транзакцию фрагментов
             FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
-
-            // Создаем новый фрагмент, который мы хотим открыть
             EventListFragment myFragment = new EventListFragment();
-
-            // Заменяем текущий фрагмент на новый
             fragmentTransaction.replace(R.id.frameWindow, myFragment);
-
-            // Добавляем транзакцию в стек возврата, чтобы пользователь мог вернуться назад
             fragmentTransaction.addToBackStack(null);
-
-            // Применяем транзакцию
             fragmentTransaction.commit();
         });
     }

+ 18 - 0
app/src/main/res/drawable/black_border_2.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle" >
+
+    <solid
+        android:color="@color/ElementsColor" >
+    </solid>
+
+    <corners
+        android:topLeftRadius="15dp"
+        android:bottomLeftRadius="15dp">
+    </corners>
+
+    <stroke
+        android:width="1dp"
+        android:color="@color/StrokeColor" />
+
+</shape>

+ 3 - 0
app/src/main/res/drawable/custom_radio_button.xml

@@ -0,0 +1,3 @@
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:drawable="@drawable/radio_checked" android:state_checked="true" />
+</selector>

+ 5 - 0
app/src/main/res/drawable/ic_back.xml

@@ -0,0 +1,5 @@
+<vector android:autoMirrored="true" android:height="25dp"
+    android:tint="#000000" android:viewportHeight="24"
+    android:viewportWidth="24" android:width="25dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="@android:color/white" android:pathData="M21,11H6.83l3.58,-3.59L9,6l-6,6 6,6 1.41,-1.41L6.83,13H21z"/>
+</vector>

+ 5 - 0
app/src/main/res/drawable/ic_forward.xml

@@ -0,0 +1,5 @@
+<vector android:autoMirrored="true" android:height="25dp"
+    android:tint="#000000" android:viewportHeight="24"
+    android:viewportWidth="24" android:width="25dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="@android:color/white" android:pathData="M6.23,20.23l1.77,1.77l10,-10l-10,-10l-1.77,1.77l8.23,8.23z"/>
+</vector>

+ 5 - 0
app/src/main/res/drawable/ic_select_event_location.xml

@@ -0,0 +1,5 @@
+<vector android:height="80dp" android:tint="#000000"
+    android:viewportHeight="24" android:viewportWidth="24"
+    android:width="80dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="@android:color/white" android:pathData="M20,1v3h3v2h-3v3h-2L18,6h-3L15,4h3L18,1h2zM12,13c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM14,3.25L14,7h3v3h2.92c0.05,0.39 0.08,0.79 0.08,1.2 0,3.32 -2.67,7.25 -8,11.8 -5.33,-4.55 -8,-8.48 -8,-11.8C4,6.22 7.8,3 12,3c0.68,0 1.35,0.08 2,0.25z"/>
+</vector>

+ 4 - 0
app/src/main/res/drawable/radio_checked.xml

@@ -0,0 +1,4 @@
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="oval">
+    <solid android:color="@color/MainColor" />
+</shape>

+ 5 - 0
app/src/main/res/drawable/switch_selector.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:drawable="@drawable/switch_on" android:state_checked="true"/>
+    <item android:drawable="@drawable/switch_off"/>
+</selector>

+ 1 - 1
app/src/main/res/layout/activity_login.xml

@@ -55,7 +55,7 @@
             android:layout_gravity="center_horizontal"
             android:layout_marginTop="30dp"
             android:background="@drawable/btn_with_big_corner"
-            android:backgroundTint="#489FF8"
+            android:backgroundTint="@color/MainColor"
             android:text="Sing In"
             android:textAllCaps="false"
             android:textColor="#FFFFFF"

+ 1 - 1
app/src/main/res/layout/activity_singinsingup.xml

@@ -48,7 +48,7 @@
             android:layout_gravity="center_horizontal"
             android:layout_marginTop="30dp"
             android:background="@drawable/btn_with_big_corner"
-            android:backgroundTint="#489FF8"
+            android:backgroundTint="@color/MainColor"
             android:text="@string/textNext"
             android:textAllCaps="false"
             android:textColor="#FFFFFF"

+ 142 - 0
app/src/main/res/layout/dialog_choice_of_sport.xml

@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@drawable/black_border"
+    android:padding="10dp">
+
+    <RadioGroup
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:paddingStart="15dp"
+        android:paddingEnd="15dp">
+        <ScrollView
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="vertical">
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:orientation="vertical">
+
+                    <androidx.constraintlayout.widget.ConstraintLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content">
+
+                        <ImageView
+                            android:id="@+id/imageView3"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:src="@drawable/ic_sport_icon"
+                            app:layout_constraintBottom_toBottomOf="parent"
+                            app:layout_constraintStart_toStartOf="parent"
+                            app:layout_constraintTop_toTopOf="parent"
+                            app:tint="@color/TextColor" />
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginStart="10dp"
+                            android:text="Basketball"
+                            android:textColor="@color/TextColor"
+                            android:textSize="16dp"
+                            app:layout_constraintBottom_toBottomOf="parent"
+                            app:layout_constraintStart_toEndOf="@+id/imageView3"
+                            app:layout_constraintTop_toTopOf="parent" />
+
+                        <RadioButton
+                            android:tag="1,Basketball"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:buttonTint="@color/TextColor"
+                            android:background="@drawable/custom_radio_button"
+                            android:text=""
+                            app:layout_constraintBottom_toBottomOf="parent"
+                            app:layout_constraintEnd_toEndOf="parent"
+                            app:layout_constraintTop_toTopOf="parent" />
+
+                    </androidx.constraintlayout.widget.ConstraintLayout>
+
+                    <androidx.constraintlayout.widget.ConstraintLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content">
+
+                        <ImageView
+                            android:id="@+id/imageView4"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:src="@drawable/ic_sport_icon"
+                            app:layout_constraintBottom_toBottomOf="parent"
+                            app:layout_constraintStart_toStartOf="parent"
+                            app:layout_constraintTop_toTopOf="parent"
+                            app:tint="@color/TextColor" />
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginStart="10dp"
+                            android:text="Soccer"
+                            android:textColor="@color/TextColor"
+                            android:textSize="16dp"
+                            app:layout_constraintBottom_toBottomOf="parent"
+                            app:layout_constraintStart_toEndOf="@+id/imageView4"
+                            app:layout_constraintTop_toTopOf="parent" />
+
+                        <RadioButton
+                            android:tag="2,Soccer"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:buttonTint="@color/TextColor"
+                            android:background="@drawable/custom_radio_button"
+                            android:text=""
+                            app:layout_constraintBottom_toBottomOf="parent"
+                            app:layout_constraintEnd_toEndOf="parent"
+                            app:layout_constraintTop_toTopOf="parent" />
+                    </androidx.constraintlayout.widget.ConstraintLayout>
+
+                </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal"
+                android:layout_gravity="center"
+                android:layout_marginTop="15dp">
+
+                <Button
+                    android:id="@+id/btn_cancel"
+                    android:layout_width="wrap_content"
+                    android:layout_height="35dp"
+                    android:background="@drawable/btn_with_big_corner"
+                    android:backgroundTint="@color/MainColor"
+                    android:text="Cancel"
+                    android:textColor="@color/TextColor"
+                    app:layout_constraintBottom_toBottomOf="parent"
+                    app:layout_constraintEnd_toEndOf="parent"
+                    app:layout_constraintTop_toTopOf="parent" />
+
+                <Button
+                    android:id="@+id/btn_apply"
+                    android:layout_width="wrap_content"
+                    android:layout_height="35dp"
+                    android:background="@drawable/btn_with_big_corner"
+                    android:backgroundTint="@color/MainColor"
+                    android:text="Apply"
+                    android:textColor="@color/TextColor"
+                    android:layout_marginStart="50dp"
+                    app:layout_constraintBottom_toBottomOf="parent"
+                    app:layout_constraintEnd_toEndOf="parent"
+                    app:layout_constraintTop_toTopOf="parent" />
+
+            </LinearLayout>
+
+            </LinearLayout>
+        </ScrollView>
+    </RadioGroup>
+
+</RelativeLayout>

+ 0 - 8
app/src/main/res/layout/fragment_calendar.xml

@@ -20,13 +20,5 @@
         app:layout_constraintStart_toStartOf="parent"
         app:layout_constraintTop_toTopOf="parent" />
 
-    <EditText
-        android:textColor="@color/TextColor"
-        android:id="@+id/textView7"
-        android:layout_width="match_parent"
-        android:layout_height="60dp"
-        android:layout_marginTop="10dp"
-        app:layout_constraintTop_toBottomOf="@+id/test"
-        android:background="@drawable/black_border"/>
 
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 313 - 7
app/src/main/res/layout/fragment_create_metting.xml

@@ -1,16 +1,322 @@
 <?xml version="1.0" encoding="utf-8"?>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     tools:context=".view.fragments.CreateMettingFragment"
     android:background="@color/AppBackground">
 
-    <!-- TODO: Update blank fragment layout -->
-    <TextView
+    <androidx.constraintlayout.widget.ConstraintLayout
+        android:id="@+id/constraintLayout"
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:text="@string/hello_blank_fragment"
-        android:textColor="@color/TextColor"/>
+        android:layout_height="wrap_content"
+        android:padding="15dp"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent">
 
-</FrameLayout>
+        <LinearLayout
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintTop_toTopOf="parent">
+
+            <ImageButton
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:background="#00000000"
+                android:padding="5dp"
+                android:src="@drawable/ic_back"
+                app:tint="@color/TextColor" />
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:layout_marginStart="10dp"
+                android:text="Create event"
+                android:textColor="@color/TextColor"
+                android:textSize="16sp" />
+
+        </LinearLayout>
+
+        <Button
+            android:layout_width="wrap_content"
+            android:layout_height="35dp"
+            android:layout_gravity="end"
+            android:background="@drawable/btn_with_big_corner"
+            android:backgroundTint="@color/MainColor"
+            android:text="Save"
+            android:textColor="@color/TextColor"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
+
+    </androidx.constraintlayout.widget.ConstraintLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        android:layout_margin="15dp"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/constraintLayout">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal"
+            android:background="@drawable/black_border">
+
+           <ImageButton
+               android:layout_width="wrap_content"
+               android:layout_height="wrap_content"
+               android:src="@drawable/ic_select_event_location"
+               android:background="@drawable/black_border_2"
+               app:tint="@color/TextColor"
+               android:padding="10dp"/>
+
+            <TextView
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:padding="25dp"
+                android:text="Yaroslavskaya Ulitsa, 12, стр.2, Moscow, 129366"
+                android:textColor="@color/TextColor"/>
+
+        </LinearLayout>
+
+        <androidx.constraintlayout.widget.ConstraintLayout
+            android:id="@+id/sportBlock"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_marginTop="5dp"
+            android:background="@drawable/black_border"
+            android:paddingStart="15dp"
+            android:paddingTop="20dp"
+            android:paddingEnd="15dp"
+            android:paddingBottom="20dp">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="Sport"
+                android:textColor="@color/TextColor"
+                android:textSize="16dp"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toTopOf="parent" />
+
+            <LinearLayout
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintEnd_toEndOf="parent"
+                app:layout_constraintTop_toTopOf="parent">
+
+                <TextView
+                    android:id="@+id/sportBlockText"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text=""
+                    android:textSize="16sp"
+                    android:textColor="@color/TextColor"/>
+
+                <ImageView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:src="@drawable/ic_forward"
+                    android:layout_marginStart="10dp"
+                    app:tint="@color/TextColor" />
+
+
+            </LinearLayout>
+
+        </androidx.constraintlayout.widget.ConstraintLayout>
+
+        <androidx.constraintlayout.widget.ConstraintLayout
+            android:id="@+id/memberLimitsBlock"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_marginTop="5dp"
+            android:background="@drawable/black_border"
+            android:paddingStart="15dp"
+            android:paddingTop="20dp"
+            android:paddingEnd="15dp"
+            android:paddingBottom="20dp">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="Member limits"
+                android:textColor="@color/TextColor"
+                android:textSize="16dp"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toTopOf="parent" />
+
+            <LinearLayout
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintEnd_toEndOf="parent"
+                app:layout_constraintTop_toTopOf="parent">
+
+                <TextView
+                    android:id="@+id/memberLimitsBlockText"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text=""
+                    android:textSize="16sp"
+                    android:textColor="@color/TextColor"/>
+
+                <ImageView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:src="@drawable/ic_forward"
+                    android:layout_marginStart="10dp"
+                    app:tint="@color/TextColor" />
+
+
+            </LinearLayout>
+
+        </androidx.constraintlayout.widget.ConstraintLayout>
+
+        <androidx.constraintlayout.widget.ConstraintLayout
+            android:id="@+id/dayBlock"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_marginTop="5dp"
+            android:background="@drawable/black_border"
+            android:paddingStart="15dp"
+            android:paddingTop="20dp"
+            android:paddingEnd="15dp"
+            android:paddingBottom="20dp">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="Day"
+                android:textColor="@color/TextColor"
+                android:textSize="16dp"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toTopOf="parent" />
+
+            <LinearLayout
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintEnd_toEndOf="parent"
+                app:layout_constraintTop_toTopOf="parent">
+
+                <TextView
+                    android:id="@+id/dayBlockText"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text=""
+                    android:textSize="16sp"
+                    android:textColor="@color/TextColor"/>
+
+                <ImageView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:src="@drawable/ic_forward"
+                    android:layout_marginStart="10dp"
+                    app:tint="@color/TextColor" />
+
+
+            </LinearLayout>
+
+        </androidx.constraintlayout.widget.ConstraintLayout>
+
+        <androidx.constraintlayout.widget.ConstraintLayout
+            android:id="@+id/timeBlock"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_marginTop="5dp"
+            android:background="@drawable/black_border"
+            android:paddingStart="15dp"
+            android:paddingTop="20dp"
+            android:paddingEnd="15dp"
+            android:paddingBottom="20dp">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="Time"
+                android:textColor="@color/TextColor"
+                android:textSize="16dp"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toTopOf="parent" />
+
+            <LinearLayout
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintEnd_toEndOf="parent"
+                app:layout_constraintTop_toTopOf="parent">
+
+                <TextView
+                    android:id="@+id/timeBlockText"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text=""
+                    android:textSize="16sp"
+                    android:textColor="@color/TextColor"/>
+
+                <ImageView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:src="@drawable/ic_forward"
+                    android:layout_marginStart="10dp"
+                    app:tint="@color/TextColor" />
+
+
+            </LinearLayout>
+
+        </androidx.constraintlayout.widget.ConstraintLayout>
+
+        <androidx.constraintlayout.widget.ConstraintLayout
+            android:id="@+id/publicBlock"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_marginTop="5dp"
+            android:background="@drawable/black_border"
+            android:paddingStart="15dp"
+            android:paddingTop="20dp"
+            android:paddingEnd="15dp"
+            android:paddingBottom="20dp">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="Public"
+                android:textColor="@color/TextColor"
+                android:textSize="16dp"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toTopOf="parent" />
+
+            <androidx.appcompat.widget.SwitchCompat
+                android:id="@+id/publicBlockSwitcher"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintEnd_toEndOf="parent"
+                app:layout_constraintTop_toTopOf="parent"
+                />
+
+        </androidx.constraintlayout.widget.ConstraintLayout>
+
+    </LinearLayout>
+
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 14 - 0
app/src/main/res/layout/fragment_event_filters.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context=".view.fragments.EventFiltersFragment">
+
+    <!-- TODO: Update blank fragment layout -->
+    <TextView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:text="@string/hello_blank_fragment" />
+
+</FrameLayout>

+ 18 - 11
app/src/main/res/layout/fragment_event_list.xml

@@ -7,11 +7,13 @@
     android:background="@color/AppBackground"
     tools:context=".view.fragments.EventListFragment">
 
-    <RelativeLayout
+    <androidx.constraintlayout.widget.ConstraintLayout
         android:id="@+id/relativeLayout"
         android:layout_width="match_parent"
         android:layout_height="55dp"
         android:background="@color/AppBackground"
+        android:paddingStart="15dp"
+        android:paddingEnd="15dp"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"
         app:layout_constraintTop_toTopOf="parent">
@@ -19,32 +21,37 @@
         <TextView
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
-            android:layout_marginStart="15dp"
             android:gravity="center_vertical"
             android:text="Events"
             android:textColor="@color/TextColor"
-            android:textSize="16sp" />
+            android:textSize="16sp"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
 
         <LinearLayout
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
             android:layout_alignParentEnd="true"
-            android:orientation="horizontal">
+            android:orientation="horizontal"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintTop_toTopOf="parent">
 
             <ImageButton
                 android:layout_width="wrap_content"
-                android:layout_height="match_parent"
+                android:layout_height="wrap_content"
                 android:background="#00000000"
-                android:gravity="center_vertical"
+                android:layout_gravity="center_vertical"
                 android:padding="7dp"
                 android:src="@drawable/ic_sort"
                 app:tint="@color/TextColor" />
 
             <ImageButton
                 android:layout_width="wrap_content"
-                android:layout_height="match_parent"
+                android:layout_height="wrap_content"
                 android:background="#00000000"
-                android:gravity="center_vertical"
+                android:layout_gravity="center_vertical"
                 android:padding="7dp"
                 android:src="@drawable/ic_filter"
                 app:tint="@color/TextColor" />
@@ -52,16 +59,16 @@
             <ImageButton
                 android:id="@+id/search"
                 android:layout_width="wrap_content"
-                android:layout_height="match_parent"
+                android:layout_height="wrap_content"
                 android:background="#00000000"
-                android:gravity="center_vertical"
+                android:layout_gravity="center_vertical"
                 android:padding="7dp"
                 android:src="@drawable/ic_search"
                 app:tint="@color/TextColor" />
 
         </LinearLayout>
 
-    </RelativeLayout>
+    </androidx.constraintlayout.widget.ConstraintLayout>
 
     <ScrollView
         android:layout_width="match_parent"

+ 2 - 0
app/src/main/res/values/colors.xml

@@ -12,4 +12,6 @@
     <color name="SubTextColor">#AF9999 </color>
     <color name="ElementsColor">#1A1A1A</color>
     <color name="StrokeColor">#403F3F</color>
+    <color name="MainColor">#0059C9</color>
+
 </resources>

+ 21 - 0
app/src/main/res/values/themes.xml

@@ -15,6 +15,10 @@
 
     </style>
 
+    <!-- Light theme -->
+
+    <!-- Light theme -->
+
     <style name="CalenderViewCustom" parent="Theme.AppCompat">
         <item name="colorAccent">@color/white</item>
     </style>
@@ -32,4 +36,21 @@
         <item name="android:textColor">@drawable/calendar_selected_date</item>
     </style>
 
+    <style name="TooltipStyle" parent="Widget.MaterialComponents.Tooltip">
+        <!-- background color of the Tooltip -->
+        <item name="backgroundTint">@color/white</item>
+    </style>
+
+    <style name="ThemeOverlay.Slider" parent="">
+        <!-- color used by the text in the Tooltip -->
+        <item name="colorOnPrimary">@color/purple_500</item>
+        <item name="colorOnBackground">@color/white</item>
+        <item name="colorSurface">@color/purple_200</item>
+    </style>
+
+    <style name="SliderStyle" parent="@style/Widget.MaterialComponents.Slider">
+        <item name="labelStyle">@style/TooltipStyle</item>
+        <item name="materialThemeOverlay">@style/ThemeOverlay.Slider</item>
+    </style>
+
 </resources>