added missing cards
This commit is contained in:
@@ -2,11 +2,13 @@ package com.example.personenapp;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.google.android.material.card.MaterialCardView;
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.cardview.widget.CardView;
|
||||
|
||||
import android.view.View;
|
||||
import android.view.Menu;
|
||||
@@ -52,4 +54,13 @@ public class MainActivity extends AppCompatActivity {
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
public void liftCard(View v) {
|
||||
CardView cardView = (CardView) v;
|
||||
if (cardView.getZ() > 15f) {
|
||||
cardView.setZ(15f);
|
||||
} else {
|
||||
cardView.setZ(100f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,20 +12,20 @@
|
||||
tools:showIn="@layout/activity_main">
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/scrollView2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:layout_editor_absoluteX="10dp"
|
||||
tools:layout_editor_absoluteY="10dp"
|
||||
android:id="@+id/scrollView2">
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
tools:layout_conversion_absoluteHeight="0dp"
|
||||
tools:layout_editor_absoluteY="10dp"
|
||||
tools:layout_conversion_absoluteWidth="392dp"
|
||||
tools:layout_editor_absoluteX="10dp"
|
||||
tools:layout_conversion_absoluteWidth="392dp" >
|
||||
tools:layout_editor_absoluteY="10dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -92,16 +92,18 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView4" />
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/cardView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/margin_cardView"
|
||||
android:onClick="liftCard"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/space2" >
|
||||
app:layout_constraintTop_toBottomOf="@+id/space2">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="150dp"
|
||||
android:background="@color/colorLesen"
|
||||
android:background="@color/colorSerien"
|
||||
android:padding="@dimen/layout_padding">
|
||||
|
||||
<ImageView
|
||||
@@ -137,6 +139,134 @@
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintStart_toEndOf="@+id/imageView"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView5" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView9"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/open_sans_light"
|
||||
android:text="Serien"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/cardView2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/margin_cardView"
|
||||
android:onClick="liftCard"
|
||||
app:cardBackgroundColor="@color/colorSport"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/cardView">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="150dp"
|
||||
android:padding="@dimen/layout_padding">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView2"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_male_solid" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView7"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="60dp"
|
||||
android:fontFamily="@font/open_sans_light"
|
||||
android:text="Otto"
|
||||
android:textColor="#000000"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintStart_toEndOf="@+id/imageView2"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView8"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="60dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:fontFamily="@font/open_sans_light"
|
||||
android:text="Joe"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintStart_toEndOf="@+id/imageView2"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView7" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView10"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/open_sans_light"
|
||||
android:text="Sport"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="150dp"
|
||||
android:layout_margin="@dimen/margin_cardView"
|
||||
android:onClick="liftCard"
|
||||
app:cardBackgroundColor="@color/colorLesen"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/cardView2">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="@dimen/layout_padding">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView3"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_walking_solid" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView11"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="60dp"
|
||||
android:fontFamily="@font/open_sans_light"
|
||||
android:text="Heinz"
|
||||
android:textColor="#000000"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintStart_toEndOf="@+id/imageView3"
|
||||
app:layout_constraintTop_toTopOf="@+id/imageView3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView12"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="60dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:fontFamily="@font/open_sans_light"
|
||||
android:text="Andrea"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintStart_toEndOf="@+id/imageView3"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView11" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView13"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/open_sans_light"
|
||||
android:text="Lesen"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<resources>
|
||||
<dimen name="fab_margin">62dp</dimen>
|
||||
<dimen name="layout_padding">10dp</dimen>
|
||||
<dimen name="margin_cardView">5dp</dimen>
|
||||
<dimen name="margin_cardView">15dp</dimen>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user