version3
This commit is contained in:
parent
dc426bf75a
commit
27d068f9ea
@ -0,0 +1,35 @@
|
||||
package ru.myitschool.work.ui.profile;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import ru.myitschool.work.R;
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
* Use the {@link ProfileFragment#newInstance} factory method to
|
||||
* create an instance of this fragment.
|
||||
*/
|
||||
public class ProfileFragment extends Fragment {
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
return inflater.inflate(R.layout.fragment_profile, container, false);
|
||||
}
|
||||
}
|
BIN
app/src/main/res/drawable/ic_user.png
Normal file
BIN
app/src/main/res/drawable/ic_user.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
50
app/src/main/res/layout/employees_fragment.xml
Normal file
50
app/src/main/res/layout/employees_fragment.xml
Normal file
@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/search_lay"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="60dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginEnd="0dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/ic_user"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="5dp"/>
|
||||
|
||||
<androidx.appcompat.widget.SearchView
|
||||
android:id="@+id/search"
|
||||
android:layout_width="340dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="0dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:layout_below="@+id/search_lay"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginEnd="0dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
</ScrollView>
|
||||
</RelativeLayout>
|
218
app/src/main/res/layout/fragment_profile.xml
Normal file
218
app/src/main/res/layout/fragment_profile.xml
Normal file
@ -0,0 +1,218 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout 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"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:context=".ui.profile.ProfileFragment">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="60dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginEnd="0dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/ic_user"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="5dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:text="@string/info"
|
||||
android:textSize="25dp"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView2"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="140dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="140dp"
|
||||
android:layout_marginTop="90dp"
|
||||
android:layout_marginEnd="140dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginTop="265dp"
|
||||
android:layout_marginEnd="0dp"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/Widget.AppCompat.Button.Colored"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:text="@string/redact"
|
||||
android:textColor="@color/black"
|
||||
app:backgroundTint="@color/white"
|
||||
app:cornerRadius="30dp"
|
||||
app:strokeColor="@color/design_default_color_on_primary" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:text="@string/bloked"
|
||||
app:backgroundTint="#D46A6C" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/relLay"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="200dp"
|
||||
android:layout_below="@+id/linearLayout"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_marginEnd="0dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fio"
|
||||
android:layout_width="350dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:layout_marginEnd="33dp"
|
||||
android:maxLines="1"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_below="@+id/fio"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="300dp"
|
||||
android:text="@string/FIO"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/role"
|
||||
android:layout_width="350dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_below="@+id/fio"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:layout_marginEnd="33dp"
|
||||
android:maxLines="1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_below="@+id/role"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="300dp"
|
||||
android:text="@string/role"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/id_user"
|
||||
android:layout_width="350dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_below="@+id/role"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:layout_marginEnd="33dp"
|
||||
android:maxLines="1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_below="@+id/id_user"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="300dp"
|
||||
android:text="@string/id"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="200dp"
|
||||
android:layout_below="@+id/relLay"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_marginEnd="0dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/telephone"
|
||||
android:layout_width="350dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:layout_marginEnd="33dp"
|
||||
android:maxLines="1"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_below="@+id/telephone"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="300dp"
|
||||
android:text="@string/phoneNum"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/email"
|
||||
android:layout_width="350dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_below="@+id/telephone"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:layout_marginEnd="33dp"
|
||||
android:maxLines="1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_below="@+id/email"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="230dp"
|
||||
android:text="@string/email"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
208
app/src/main/res/layout/fragment_redact_profile.xml
Normal file
208
app/src/main/res/layout/fragment_redact_profile.xml
Normal file
@ -0,0 +1,208 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout 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"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:context=".ui.profile.ProfileFragment">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="60dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginEnd="0dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/ic_user"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="5dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:text="@string/setProfile"
|
||||
android:textSize="25dp"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView2"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="140dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="140dp"
|
||||
android:layout_marginTop="90dp"
|
||||
android:layout_marginEnd="140dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginTop="265dp"
|
||||
android:layout_marginEnd="0dp"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/redacting"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="10dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/relLay"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="200dp"
|
||||
android:layout_below="@+id/linearLayout"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_marginEnd="0dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fio"
|
||||
android:layout_width="350dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:layout_marginEnd="33dp"
|
||||
android:maxLines="1"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_below="@+id/fio"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="300dp"
|
||||
android:text="@string/FIO"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/role"
|
||||
android:layout_width="350dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_below="@+id/fio"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:layout_marginEnd="33dp"
|
||||
android:maxLines="1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_below="@+id/role"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="300dp"
|
||||
android:text="@string/role"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/id_user"
|
||||
android:layout_width="350dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_below="@+id/role"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:layout_marginEnd="33dp"
|
||||
android:maxLines="1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_below="@+id/id_user"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="300dp"
|
||||
android:text="@string/id"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="200dp"
|
||||
android:layout_below="@+id/relLay"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_marginEnd="0dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/telephone"
|
||||
android:layout_width="350dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:layout_marginEnd="33dp"
|
||||
android:maxLines="1"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_below="@+id/telephone"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="300dp"
|
||||
android:text="@string/phoneNum"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/email"
|
||||
android:layout_width="350dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_below="@+id/telephone"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:layout_marginEnd="33dp"
|
||||
android:maxLines="1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_below="@+id/email"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="230dp"
|
||||
android:text="@string/email"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
@ -23,4 +23,16 @@
|
||||
<string name="profile">Профиль</string>
|
||||
<string name="office">Офис</string>
|
||||
<string name="scaning">Сканировать</string>
|
||||
<!-- TODO: Remove or change this placeholder text -->
|
||||
<string name="hello_blank_fragment">Hello blank fragment</string>
|
||||
<string name="info">Информация о сотруднике</string>
|
||||
<string name="redact">Редактировать</string>
|
||||
<string name="bloked">Заблокировать</string>
|
||||
<string name="FIO">ФИО</string>
|
||||
<string name="role">Должность</string>
|
||||
<string name="id">ID</string>
|
||||
<string name="phoneNum">Номер телефона</string>
|
||||
<string name="email">Электронная почта</string>
|
||||
<string name="redacting">Изменить фото профиля</string>
|
||||
<string name="setProfile">Настройка профиля</string>
|
||||
</resources>
|
Loading…
x
Reference in New Issue
Block a user