Skip to content

Commit

Permalink
Fix card margins and update version number
Browse files Browse the repository at this point in the history
  • Loading branch information
gouravkhunger committed Oct 12, 2021
1 parent e33ece5 commit 80b2a94
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 101 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ android {
minSdk = 23
targetSdk = 31
versionCode = 2
versionName = "1.1.0"
versionName = "2.0.0"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
188 changes: 90 additions & 98 deletions app/src/main/res/layout/fragment_quote.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,120 +31,111 @@
android:background="@android:color/transparent">

<LinearLayout
android:id="@+id/cardHolder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toTopOf="@+id/fab"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<LinearLayout
android:id="@+id/cardHolder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<androidx.cardview.widget.CardView
android:id="@+id/quoteCard"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
<androidx.cardview.widget.CardView
android:id="@+id/quoteCard"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_margin="16dp"
app:cardCornerRadius="32dp"
app:cardElevation="8dp">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="32dp"
app:cardCornerRadius="32dp"
app:cardElevation="32dp">
android:orientation="vertical">

<LinearLayout
android:layout_width="match_parent"
<ProgressBar
android:id="@+id/quoteLoading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="32dp"
android:orientation="vertical">
android:layout_gravity="center" />

<ProgressBar
android:id="@+id/quoteLoading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center" />
<TextView
android:id="@+id/noQuote"
style="@style/fontJosefinSans"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/black"
android:textSize="22sp"
android:visibility="gone" />

<TextView
android:id="@+id/quoteTv"
style="@style/fontJosefinSans"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/black"
android:textSize="26sp"
android:visibility="gone" />

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">

<TextView
android:id="@+id/noQuote"
style="@style/fontJosefinSans"
android:id="@+id/authorTv"
style="@style/fontWorkSans"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/black"
android:textSize="22sp"
android:visibility="gone" />

<TextView
android:id="@+id/quoteTv"
style="@style/fontJosefinSans"
android:textSize="16sp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<ImageView
android:id="@+id/quoteShare"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/black"
android:textSize="26sp"
android:visibility="gone" />
android:background="?attr/selectableItemBackgroundBorderless"
android:clickable="true"
android:contentDescription="@string/share_description"
android:focusable="true"
android:padding="8dp"
android:src="@drawable/ic_share"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

</LinearLayout>

</androidx.cardview.widget.CardView>

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">

<TextView
android:id="@+id/authorTv"
style="@style/fontWorkSans"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<ImageView
android:id="@+id/quoteShare"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackgroundBorderless"
android:clickable="true"
android:contentDescription="@string/share_description"
android:focusable="true"
android:padding="8dp"
android:src="@drawable/ic_share"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

</LinearLayout>

</androidx.cardview.widget.CardView>

</LinearLayout>

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cardHolder">

<TextView
android:id="@+id/extraText"
style="@style/fontWorkSans"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="30dp"
android:layout_marginEnd="30dp"
android:text="@string/info"
android:textColor="@android:color/white"
android:textSize="16sp" />
</LinearLayout>

<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cardHolder">

<TextView
android:id="@+id/extraText"
style="@style/fontWorkSans"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:text="@string/info"
android:textColor="@android:color/white"
android:textSize="16sp"/>

</LinearLayout>
</LinearLayout>

<com.google.android.material.floatingactionbutton.FloatingActionButton
Expand All @@ -159,6 +150,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:tint="@android:color/white" />
app:tint="@android:color/white"
android:contentDescription="@string/save_quote" />

</androidx.constraintlayout.widget.ConstraintLayout>
4 changes: 2 additions & 2 deletions app/src/main/res/layout/quote_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="32dp"
android:layout_margin="16dp"
app:cardCornerRadius="32dp"
app:cardElevation="32dp">
app:cardElevation="8dp">

<LinearLayout
android:layout_width="match_parent"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,5 @@

<string name="toogleBookMark">Bookmark</string>
<string name="share_description">Share Quote as an image</string>
<string name="save_quote">Save quote</string>
</resources>

0 comments on commit 80b2a94

Please sign in to comment.