login/register scroll
This commit is contained in:
parent
aa17542f98
commit
255f69ad8f
@ -25,6 +25,7 @@ android {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
|
@ -42,7 +42,7 @@ public class PostService {
|
||||
|
||||
FirebaseFirestore db = FirebaseFirestore.getInstance();
|
||||
try {
|
||||
for (QueryDocumentSnapshot post : Tasks.await(db.collection("/post").limit(10).get())) {
|
||||
for (QueryDocumentSnapshot post : Tasks.await(db.collection("/post").get())) {
|
||||
DocumentSnapshot user = Tasks.await(post.getDocumentReference("user").get());
|
||||
String username = user.get("username", String.class);
|
||||
String email = user.get("email", String.class);
|
||||
|
@ -1,10 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<ScrollView
|
||||
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.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:context=".activity.MainActivity">
|
||||
|
||||
<TextView
|
||||
@ -60,11 +65,10 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/default_margin"
|
||||
android:onClick="redirect_register"
|
||||
android:text="@string/register_btn"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/login"
|
||||
android:onClick="redirect_register"/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
app:layout_constraintTop_toBottomOf="@+id/login" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</ScrollView>
|
||||
|
@ -1,10 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<ScrollView
|
||||
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.widget.ConstraintLayout
|
||||
android:id="@+id/main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:context=".activity.RegisterActivity">
|
||||
|
||||
<TextView
|
||||
@ -92,4 +97,6 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/register"
|
||||
android:onClick="redirect_login"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
@ -11,16 +11,16 @@
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<EditText
|
||||
android:hint="@string/content_hint"
|
||||
android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="@dimen/default_margin"
|
||||
android:ems="10"
|
||||
android:gravity="start|top"
|
||||
android:hint="@string/content_hint"
|
||||
android:inputType="textMultiLine"
|
||||
app:layout_constraintBottom_toTopOf="@+id/send_post"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
@ -28,12 +28,11 @@
|
||||
android:id="@+id/send_post"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/default_margin"
|
||||
android:text="@string/post_btn"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/content"
|
||||
/>
|
||||
android:layout_margin="@dimen/default_margin"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</FrameLayout>
|
Loading…
Reference in New Issue
Block a user