Skip to content

refactor(auth, analytics): remove RelativeLayout from xml files #1246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions analytics/app/src/main/res/layout/fragment_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand All @@ -29,10 +29,9 @@ specific language governing permissions and limitations under the License.
android:id="@+id/imageView"
android:minHeight="256dp"
android:minWidth="256dp"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:layout_gravity="center"
android:elevation="2dp"
android:scaleType="center"
android:background="@drawable/circle"/>

</RelativeLayout>
</FrameLayout>
73 changes: 46 additions & 27 deletions auth/app/src/main/res/layout/activity_generic_idp.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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/main_layout"
android:layout_width="match_parent"
Expand All @@ -8,7 +9,7 @@
android:orientation="vertical"
android:weightSum="4">

<LinearLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="3"
Expand All @@ -18,55 +19,73 @@
<ImageView
android:id="@+id/icon"
style="@style/ThemeOverlay.FirebaseIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/desc_firebase_lockup"
android:src="@drawable/firebase_lockup_400"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/titleText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/title_bottom_margin"
android:text="@string/generic_title_text"
android:layout_marginTop="16dp"
android:gravity="center"
android:theme="@style/ThemeOverlay.MyTitleText" />
android:text="@string/generic_title_text"
android:theme="@style/ThemeOverlay.MyTitleText"
app:layout_constraintEnd_toEndOf="@+id/icon"
app:layout_constraintStart_toStartOf="@+id/icon"
app:layout_constraintTop_toBottomOf="@+id/icon" />

<TextView
android:id="@+id/status"
style="@style/ThemeOverlay.MyTextDetail"
android:text="@string/signed_out" />
android:layout_marginTop="16dp"
android:text="@string/signed_out"
app:layout_constraintEnd_toEndOf="@+id/titleText"
app:layout_constraintStart_toStartOf="@+id/titleText"
app:layout_constraintTop_toBottomOf="@+id/titleText" />

<TextView
android:id="@+id/detail"
style="@style/ThemeOverlay.MyTextDetail"
app:layout_constraintEnd_toEndOf="@+id/status"
app:layout_constraintStart_toStartOf="@+id/status"
app:layout_constraintTop_toBottomOf="@+id/status"
tools:text="Firebase User ID: 123456789abc" />

<RelativeLayout
android:id="@+id/spinnerLayout"
<TextView
android:id="@+id/providerSpinnerLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp">

<TextView
android:id="@+id/providerSpinnerLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:textStyle="bold"
android:text="@string/generic_label_provider"/>
android:layout_marginTop="16dp"
android:text="@string/generic_label_provider"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="@+id/detail"
app:layout_constraintTop_toBottomOf="@+id/detail" />

<Spinner
android:id="@+id/providerSpinner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/providerSpinnerLabel"
android:layout_toRightOf="@+id/providerSpinnerLabel"
android:layout_toEndOf="@+id/providerSpinnerLabel" />
<Spinner
android:id="@+id/providerSpinner"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/providerSpinnerLabel"
android:layout_toEndOf="@+id/providerSpinnerLabel"
android:layout_toRightOf="@+id/providerSpinnerLabel"
app:layout_constraintBottom_toBottomOf="@+id/providerSpinnerLabel"
app:layout_constraintEnd_toEndOf="@+id/detail"
app:layout_constraintStart_toEndOf="@+id/providerSpinnerLabel"
app:layout_constraintTop_toTopOf="@+id/providerSpinnerLabel" />

</RelativeLayout>
<androidx.constraintlayout.widget.Group
android:id="@+id/spinnerLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:constraint_referenced_ids="providerSpinner, providerSpinnerLabel"/>

</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

<FrameLayout
android:layout_width="match_parent"
Expand Down