Skip to content
This repository has been archived by the owner on Oct 23, 2019. It is now read-only.

Commit

Permalink
+toolbar to myAccount
Browse files Browse the repository at this point in the history
  • Loading branch information
DonnA98 committed Nov 6, 2018
1 parent 14da1e8 commit c713125
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.databinding.DataBindingUtil;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.widget.ArrayAdapter;
Expand Down Expand Up @@ -42,7 +43,7 @@ public class MyAccountActivity extends DependencyConfigurationAgnosticActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (dependenciesNotReady()) return;
setContentView(R.layout.activity_my_account);
DataBindingUtil.setContentView(this, R.layout.activity_my_account);
onResume();
}

Expand Down
55 changes: 36 additions & 19 deletions app/src/main/res/layout/activity_my_account.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/fab_margin"
android:layout_marginStart="@dimen/fab_margin"
android:layout_marginTop="@dimen/in_margin"
android:orientation="vertical"
tools:context=".activities.MyAccountActivity">

<ListView
android:id="@+id/myAccountLayout"
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<android.support.v4.widget.DrawerLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="@android:color/transparent"
android:dividerHeight="@dimen/in_margin"
android:focusedByDefault="true"
android:listSelector="@android:color/transparent"
android:orientation="horizontal" />
android:layout_height="match_parent">
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include
android:id="@+id/game_list_toolbar"
layout="@layout/toolbar_main"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_scrollFlags="scroll|enterAlways"
app:title="@{@string/titleMyAccountActivity}"
/>
</android.support.design.widget.AppBarLayout>

<ListView
android:id="@+id/myAccountLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/fab_margin"
android:layout_marginStart="@dimen/fab_margin"
android:layout_marginTop="@dimen/in_margin"
android:divider="@android:color/transparent"
android:dividerHeight="@dimen/in_margin"
android:focusedByDefault="true"
android:listSelector="@android:color/transparent"
android:orientation="horizontal"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
</android.support.design.widget.CoordinatorLayout>
</android.support.v4.widget.DrawerLayout>
</layout>

</LinearLayout>
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 @@ -14,6 +14,7 @@
<string name="title_create_game_activity">Create Game</string>
<string name="title_example_for_toolbar_activity">Example for Toolbar</string>
<string name="title_signup_activity">Sign Up</string>
<string name="titleMyAccountActivity">My Account</string>

<!-- Login error messages-->
<string name="noNameMessage">No username</string>
Expand Down

0 comments on commit c713125

Please sign in to comment.