Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
b45a9f32c6
@ -14,9 +14,11 @@ class UserInfoMapper @Inject constructor() {
|
||||
fullname = model.fullname ?: error("fullname is null"),
|
||||
imageUrl = model.imageUrl ?: error("imageUrl is null"),
|
||||
position = model.position ?: error("position is null"),
|
||||
lastEntryMillis = model.lastEntry?.let { date ->
|
||||
lastEntryMillis = model.lastEntry.let { date ->
|
||||
simpleDateFormat.parse(date)?.time ?: error("parse lastEntry error")
|
||||
} ?: error("lastEntry is null")
|
||||
} ?: error("lastEntry is null"),
|
||||
role = model.role,
|
||||
blocked = model.blocked
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,12 @@
|
||||
package ru.myitschool.work.domain.profile.entities
|
||||
|
||||
import ru.myitschool.work.data.dto.Role
|
||||
|
||||
class UserInfoEntity(
|
||||
val fullname: String,
|
||||
val imageUrl: String,
|
||||
val position: String,
|
||||
val role: Role,
|
||||
val blocked: Boolean,
|
||||
val lastEntryMillis: Long,
|
||||
)
|
@ -70,11 +70,13 @@ class ProfileFragment : Fragment(R.layout.fragment_profile) {
|
||||
binding.lastEntry.text = state.lastEntry
|
||||
binding.fullname.text = state.fullname
|
||||
if (state.admin){
|
||||
//TODO Приделать админские штучки
|
||||
binding.admin.visibility = View.VISIBLE
|
||||
}else{
|
||||
} else {
|
||||
binding.admin.visibility = View.GONE
|
||||
}
|
||||
if (state.blocked) {
|
||||
// TODO: СДЕЛАТЬ ФОН КРАСНЫМ
|
||||
}
|
||||
Picasso.get()
|
||||
.load(state.imageUrl)
|
||||
.error(R.drawable.ic_no_img)
|
||||
|
@ -12,6 +12,7 @@ import kotlinx.coroutines.flow.asStateFlow
|
||||
import kotlinx.coroutines.flow.update
|
||||
import kotlinx.coroutines.launch
|
||||
import ru.myitschool.work.R
|
||||
import ru.myitschool.work.data.dto.Role
|
||||
import ru.myitschool.work.domain.auth.LogoutUseCase
|
||||
import ru.myitschool.work.domain.profile.GetUserInfoUseCase
|
||||
import ru.myitschool.work.utils.MutablePublishFlow
|
||||
@ -78,7 +79,8 @@ class ProfileViewModel @Inject constructor(
|
||||
imageUrl = value.imageUrl,
|
||||
position = value.position,
|
||||
lastEntry = simpleDateFormat.format(Date(value.lastEntryMillis)),
|
||||
admin = true
|
||||
admin = value.role == Role.ADMIN,
|
||||
blocked = value.blocked
|
||||
)
|
||||
}
|
||||
},
|
||||
@ -106,6 +108,7 @@ class ProfileViewModel @Inject constructor(
|
||||
val position: String,
|
||||
val lastEntry: String,
|
||||
val admin: Boolean,
|
||||
val blocked: Boolean
|
||||
) : State
|
||||
}
|
||||
|
||||
|
40
app/src/main/res/layout-land/fragment_entry_list.xml
Normal file
40
app/src/main/res/layout-land/fragment_entry_list.xml
Normal file
@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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:id="@+id/frameLayout2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="16dp"
|
||||
tools:context=".ui.entrylist.EntryListFragment">
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/floatingActionButton2"
|
||||
style="@style/Theme.UiTemplate.FAB.Gray"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:src="@drawable/ic_back"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView5"
|
||||
style="@style/Theme.UiTemplate.TextH2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/entry_history"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/floatingActionButton2"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/floatingActionButton2"
|
||||
app:layout_constraintTop_toTopOf="@+id/floatingActionButton2" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/floatingActionButton2" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
90
app/src/main/res/layout-land/fragment_information_admin.xml
Normal file
90
app/src/main/res/layout-land/fragment_information_admin.xml
Normal file
@ -0,0 +1,90 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:padding="16dp"
|
||||
android:orientation="vertical"
|
||||
android:layout_height="match_parent">
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/floatingActionButton2"
|
||||
style="@style/Theme.UiTemplate.FAB.Gray"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:src="@drawable/ic_back" />
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal">
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/photo2"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:layout_margin="5dp"
|
||||
android:elevation="10dp"
|
||||
app:cardCornerRadius="12dp">
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/photo"
|
||||
style="@style/roundedImageView"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:contentDescription="@null"
|
||||
tools:src="@tools:sample/avatars" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:id="@+id/fullname"
|
||||
style="@style/Theme.UiTemplate.TextH3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:textAlignment="center"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/photo2"
|
||||
tools:text="@tools:sample/full_names" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/position"
|
||||
style="@style/Theme.UiTemplate.TextH4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="16dp"
|
||||
tools:text="@tools:sample/cities" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lastEntry"
|
||||
style="@style/Theme.UiTemplate.TextH4_2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_gravity="center"
|
||||
tools:text="@tools:sample/date/hhmm" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
<Button
|
||||
android:id="@+id/login"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Theme.UiTemplate.OutlineButton.Error"
|
||||
android:layout_marginTop="80dp"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/admin_block" />
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
119
app/src/main/res/layout-land/fragment_login.xml
Normal file
119
app/src/main/res/layout-land/fragment_login.xml
Normal file
@ -0,0 +1,119 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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">
|
||||
|
||||
<androidx.constraintlayout.helper.widget.Flow
|
||||
android:id="@+id/flow"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
app:constraint_referenced_ids="log"
|
||||
app:flow_verticalGap="32dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<LinearLayout
|
||||
android:id="@+id/log"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/text_login"
|
||||
style="@style/Theme.UiTemplate.TextH1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/login_login" />
|
||||
<TextView
|
||||
android:id="@+id/text_welcome"
|
||||
style="@style/Theme.UiTemplate.TextH4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/login_welcome" />
|
||||
<TextView
|
||||
android:id="@+id/text_login_small"
|
||||
style="@style/Theme.UiTemplate.TextH4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/login_text" />
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Theme.UiTemplate.Input"
|
||||
android:id="@+id/input_username"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_width="match_parent"
|
||||
app:layout_constraintWidth_max="400dp"
|
||||
app:layout_constraintWidth_percent="0.8"
|
||||
android:layout_height="58dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/username"
|
||||
style="@style/Theme.UiTemplate.Input.Text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:hint="@string/login_username_hint">
|
||||
</com.google.android.material.textfield.TextInputEditText>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Theme.UiTemplate.Input"
|
||||
android:id="@+id/input_password"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
app:layout_constraintWidth_max="400dp"
|
||||
app:layout_constraintWidth_percent="0.8"
|
||||
android:layout_height="58dp"
|
||||
app:passwordToggleEnabled="true"
|
||||
tools:ignore="MissingConstraints">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/password"
|
||||
style="@style/Theme.UiTemplate.Input.Text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
android:hint="@string/login_password_hint">
|
||||
</com.google.android.material.textfield.TextInputEditText>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/login"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Theme.UiTemplate.Button"
|
||||
android:layout_marginTop="48dp"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/login_button" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/loading"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="25dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/error"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:visibility="gone"
|
||||
style="@style/Theme.UiTemplate.TextH4"
|
||||
android:layout_gravity="center"
|
||||
tools:text="Something wrong. Try again" />
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -37,7 +37,7 @@
|
||||
style="@style/Theme.UiTemplate.TextH1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="@string/profile_main_textview"
|
||||
android:textAlignment="center"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@ -57,7 +57,7 @@
|
||||
android:id="@+id/photo2"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:layout_margin="5dp"
|
||||
android:layout_margin="2dp"
|
||||
android:elevation="10dp"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/scan"
|
||||
@ -70,9 +70,8 @@
|
||||
style="@style/roundedImageView"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:contentDescription="@null"
|
||||
|
||||
app:layout_constraintBottom_toTopOf="@+id/scan"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@ -86,7 +85,6 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:textAlignment="center"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@ -98,7 +96,6 @@
|
||||
style="@style/Theme.UiTemplate.TextH4"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/fullname"
|
||||
app:layout_constraintStart_toStartOf="@+id/fullname"
|
||||
app:layout_constraintTop_toBottomOf="@+id/fullname"
|
||||
@ -110,7 +107,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="6dp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/fullname"
|
||||
app:layout_constraintStart_toStartOf="@+id/fullname"
|
||||
app:layout_constraintTop_toBottomOf="@+id/position"
|
||||
|
46
app/src/main/res/layout-land/fragment_qr_result.xml
Normal file
46
app/src/main/res/layout-land/fragment_qr_result.xml
Normal file
@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/loading"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toTopOf="@id/close"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="16dp"
|
||||
android:gravity="center"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Headline3"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@id/close"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
style="@style/Theme.UiTemplate.TextH2"
|
||||
tools:text="This is test text with result scanning"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/close"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:text="@string/close_button"
|
||||
style="@style/Theme.UiTemplate.Button"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
36
app/src/main/res/layout-land/fragment_qr_scan.xml
Normal file
36
app/src/main/res/layout-land/fragment_qr_scan.xml
Normal file
@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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">
|
||||
|
||||
<androidx.camera.view.PreviewView
|
||||
android:id="@+id/viewFinder"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/loading"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:contentDescription="@string/close_button"
|
||||
android:src="@drawable/ic_close"
|
||||
style="@style/Theme.UiTemplate.FAB.AccentColor"
|
||||
app:elevation="0dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
57
app/src/main/res/layout-land/fragment_search_user.xml
Normal file
57
app/src/main/res/layout-land/fragment_search_user.xml
Normal file
@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="16dp"
|
||||
android:orientation="vertical">
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/floatingActionButton2"
|
||||
style="@style/Theme.UiTemplate.FAB.Gray"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:src="@drawable/ic_back"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<TextView
|
||||
android:id="@+id/text_login"
|
||||
android:padding="35dp"
|
||||
style="@style/Theme.UiTemplate.TextH1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/admin_main" />
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Theme.UiTemplate.Input"
|
||||
android:id="@+id/input_username"
|
||||
android:layout_width="match_parent"
|
||||
app:layout_constraintWidth_max="400dp"
|
||||
app:layout_constraintWidth_percent="0.8"
|
||||
android:layout_height="58dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/username"
|
||||
style="@style/Theme.UiTemplate.Input.Text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:hint="@string/admin_input_hint">
|
||||
</com.google.android.material.textfield.TextInputEditText>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
<Button
|
||||
android:id="@+id/login"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Theme.UiTemplate.Button"
|
||||
android:layout_marginTop="28dp"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/admin_button" />
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
90
app/src/main/res/layout-land/fragment_user_info.xml
Normal file
90
app/src/main/res/layout-land/fragment_user_info.xml
Normal file
@ -0,0 +1,90 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:padding="16dp"
|
||||
android:orientation="vertical"
|
||||
android:layout_height="match_parent">
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/floatingActionButton2"
|
||||
style="@style/Theme.UiTemplate.FAB.Gray"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:src="@drawable/ic_back" />
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal">
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/photo2"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:layout_margin="5dp"
|
||||
android:elevation="10dp"
|
||||
app:cardCornerRadius="12dp">
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/photo"
|
||||
style="@style/roundedImageView"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:contentDescription="@null"
|
||||
tools:src="@tools:sample/avatars" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:id="@+id/fullname"
|
||||
style="@style/Theme.UiTemplate.TextH3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:textAlignment="center"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/photo2"
|
||||
tools:text="@tools:sample/full_names" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/position"
|
||||
style="@style/Theme.UiTemplate.TextH4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="16dp"
|
||||
tools:text="@tools:sample/cities" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lastEntry"
|
||||
style="@style/Theme.UiTemplate.TextH4_2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_gravity="center"
|
||||
tools:text="@tools:sample/date/hhmm" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
<Button
|
||||
android:id="@+id/login"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Theme.UiTemplate.OutlineButton.Error"
|
||||
android:layout_marginTop="80dp"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/admin_block" />
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
x
Reference in New Issue
Block a user