version3.2(with all layouts)

This commit is contained in:
Andrey 2025-02-20 10:49:21 +03:00
parent 342f9fc0af
commit b81e479a8d
11 changed files with 239 additions and 77 deletions

View File

@ -39,6 +39,9 @@ dependencies {
implementation("com.google.android.material:material:1.12.0")
implementation("androidx.activity:activity:1.10.0")
implementation("androidx.constraintlayout:constraintlayout:2.2.0")
implementation("androidx.legacy:legacy-support-v4:1.0.0")
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.8.7")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.7")
defaultLibrary()
implementation(Dependencies.AndroidX.activity)
implementation(Dependencies.AndroidX.fragment)

View File

@ -0,0 +1,38 @@
package ru.myitschool.work.ui.profile;
import androidx.lifecycle.ViewModelProvider;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import ru.myitschool.work.R;
public class RedactProfileFragment extends Fragment {
private RedactProfileViewModel mViewModel;
public static RedactProfileFragment newInstance() {
return new RedactProfileFragment();
}
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
@Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_redact_profile, container, false);
}
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
mViewModel = new ViewModelProvider(this).get(RedactProfileViewModel.class);
// TODO: Use the ViewModel
}
}

View File

@ -0,0 +1,7 @@
package ru.myitschool.work.ui.profile;
import androidx.lifecycle.ViewModel;
public class RedactProfileViewModel extends ViewModel {
// TODO: Implement the ViewModel
}

View File

@ -0,0 +1,38 @@
package ru.myitschool.work.ui.userlist;
import androidx.lifecycle.ViewModelProvider;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import ru.myitschool.work.R;
public class CompanyInfoFragment extends Fragment {
private CompanyInfoViewModel mViewModel;
public static CompanyInfoFragment newInstance() {
return new CompanyInfoFragment();
}
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
@Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.company_info_fragment, container, false);
}
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
mViewModel = new ViewModelProvider(this).get(CompanyInfoViewModel.class);
// TODO: Use the ViewModel
}
}

View File

@ -0,0 +1,7 @@
package ru.myitschool.work.ui.userlist;
import androidx.lifecycle.ViewModel;
public class CompanyInfoViewModel extends ViewModel {
// TODO: Implement the ViewModel
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 499 B

View File

@ -45,9 +45,9 @@
<RelativeLayout
android:id="@+id/relLay"
android:id="@+id/relllLay"
android:layout_width="wrap_content"
android:layout_height="200dp"
android:layout_height="50dp"
android:layout_below="@+id/imageCompany"
android:layout_alignParentStart="true"
android:layout_alignParentEnd="true"
@ -56,105 +56,170 @@
android:layout_marginEnd="0dp">
<TextView
android:id="@+id/fio"
android:id="@+id/nameCompany"
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"/>
android:layout_marginStart="20dp"
android:layout_marginTop="14dp"
android:layout_marginEnd="38dp"
android:maxLines="1" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/descriptionLay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/workTimeLay"
android:layout_alignParentStart="true"
android:layout_alignParentEnd="true"
android:layout_marginStart="10dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="10dp"
android:background="#B1B1CF">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginStart="15dp"
android:layout_marginTop="10dp"
android:background="@drawable/info" />
<TextView
android:id="@+id/description"
android:layout_width="350dp"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_marginStart="50dp"
android:layout_marginTop="40dp"
android:layout_marginEnd="36dp"
android:maxLines="10" />
<TextView
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_below="@+id/fio"
android:layout_below="@+id/description"
android:layout_alignParentStart="true"
android:layout_alignParentEnd="true"
android:layout_marginStart="32dp"
android:layout_marginStart="50dp"
android:layout_marginTop="-45dp"
android:layout_marginEnd="270dp"
android:text="@string/description" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/workTimeLay"
android:layout_width="wrap_content"
android:layout_height="120dp"
android:layout_below="@+id/relLay"
android:layout_alignParentStart="true"
android:layout_alignParentEnd="true"
android:layout_marginStart="10dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="10dp"
android:background="#B1B1CF">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginStart="15dp"
android:layout_marginTop="5dp"
android:layout_marginEnd="300dp"
android:text="@string/FIO"/>
android:background="@drawable/contacts" />
<TextView
android:id="@+id/telephone_tv"
android:layout_width="350dp"
android:layout_height="30dp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_marginStart="50dp"
android:layout_marginTop="37dp"
android:layout_marginEnd="36dp"
android:maxLines="1" />
<TextView
android:id="@+id/email_tv"
android:layout_width="350dp"
android:layout_height="30dp"
android:layout_below="@+id/telephone_tv"
android:layout_alignParentStart="true"
android:layout_alignParentEnd="true"
android:layout_marginStart="50dp"
android:layout_marginTop="6dp"
android:layout_marginEnd="36dp"
android:maxLines="1" />
<TextView
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_below="@+id/telephone_tv"
android:layout_alignParentStart="true"
android:layout_alignParentEnd="true"
android:layout_marginStart="50dp"
android:layout_marginTop="-54dp"
android:layout_marginEnd="270dp"
android:text="@string/contacts" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/relLay"
android:layout_width="wrap_content"
android:layout_height="200dp"
android:layout_below="@+id/imageCompany"
android:layout_height="80dp"
android:layout_below="@+id/relllLay"
android:layout_alignParentStart="true"
android:layout_alignParentEnd="true"
android:layout_marginStart="0dp"
android:layout_marginTop="0dp"
android:layout_marginEnd="0dp">
android:layout_marginStart="10dp"
android:layout_marginTop="5dp"
android:layout_marginEnd="10dp"
android:background="#B1B1CF">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginStart="5dp"
android:layout_marginTop="15dp"
android:background="@drawable/ic_address" />
<TextView
android:id="@+id/fio"
android:id="@+id/address"
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"/>
android:layout_marginStart="50dp"
android:layout_marginTop="37dp"
android:layout_marginEnd="36dp"
android:maxLines="1" />
<TextView
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_below="@+id/fio"
android:layout_below="@+id/address"
android:layout_alignParentStart="true"
android:layout_alignParentEnd="true"
android:layout_marginStart="32dp"
android:layout_marginTop="5dp"
android:layout_marginEnd="300dp"
android:text="@string/FIO"/>
android:layout_marginStart="50dp"
android:layout_marginTop="-54dp"
android:layout_marginEnd="301dp"
android:text="@string/address" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/relLay"
android:layout_width="wrap_content"
android:layout_height="200dp"
android:layout_below="@+id/imageCompany"
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"/>
</RelativeLayout>
</RelativeLayout>

View File

@ -1,18 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/employees"
android:title="@string/employees"
android:icon="@drawable/management"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<item
android:id="@+id/profile"
android:title="@string/profile"
android:icon="@drawable/account"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<item
android:id="@+id/scaner"
android:title="@string/scaning"
@ -26,5 +14,18 @@
android:icon="@drawable/office"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<item
android:id="@+id/employees"
android:title="@string/employees"
android:icon="@drawable/management"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<item
android:id="@+id/profile"
android:title="@string/profile"
android:icon="@drawable/account"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</menu>

View File

@ -36,4 +36,7 @@
<string name="redacting">Изменить фото профиля</string>
<string name="setProfile">Настройка профиля</string>
<string name="company_info">Информация о компании</string>
<string name="address">Адрес</string>
<string name="contacts">Контакты</string>
<string name="description">Описание</string>
</resources>