diff options
author | Parménides GV <parmegv@sdf.org> | 2015-04-29 12:25:24 +0200 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2015-04-29 12:26:23 +0200 |
commit | f008b5ec8e1c74968e4a605d2de5423edf91b854 (patch) | |
tree | a6e8906aa5d09c24a48f533f6a057a84ee16265e /app/src/main/res/layout | |
parent | 6cc1443a27a4be762e4b53deb464d15a99d698ac (diff) |
Creating a user session fragment.
I've separated the user session management to it, and encapsulated
ProviderAPICommand into its own class.
Putting the fragment statically in dashboard.xml isn't working, Android
complains about it being duplicated, so I'm going to add it dynamically.
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r-- | app/src/main/res/layout/dashboard.xml | 28 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_user_session.xml | 37 |
2 files changed, 43 insertions, 22 deletions
diff --git a/app/src/main/res/layout/dashboard.xml b/app/src/main/res/layout/dashboard.xml index d76ccbec..30074b6a 100644 --- a/app/src/main/res/layout/dashboard.xml +++ b/app/src/main/res/layout/dashboard.xml @@ -18,29 +18,13 @@ android:singleLine="true" android:text="@string/provider_label_none" android:textAppearance="?android:attr/textAppearanceMedium" /> - - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content"> - <ProgressBar - android:id="@+id/user_session_status_progress" - android:layout_width="wrap_content" - android:layout_height="fill_parent" - android:indeterminate="true" - android:visibility="gone"/> - <TextView - android:id="@+id/user_session_status" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textSize="18sp" - android:layout_marginLeft="10dp" - android:layout_marginStart="10dp" - android:ellipsize="marquee" - android:singleLine="true" - android:textAppearance="?android:attr/textAppearanceMedium" - /> - </LinearLayout> + <fragment android:name="se.leap.bitmaskclient.userstatus.UserSessionFragment" + android:id="@+id/user_session_fragment" + android:tag="user_session_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content"/> + <LinearLayout android:id="@+id/servicesCollection" android:layout_width="match_parent" diff --git a/app/src/main/res/layout/fragment_user_session.xml b/app/src/main/res/layout/fragment_user_session.xml new file mode 100644 index 00000000..3b7b23c6 --- /dev/null +++ b/app/src/main/res/layout/fragment_user_session.xml @@ -0,0 +1,37 @@ +<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="match_parent" + android:orientation="horizontal" + tools:context="se.leap.bitmaskclient.userstatus.UserSessionFragment"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <ProgressBar + android:id="@+id/user_session_status_progress" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:indeterminate="true" + android:visibility="gone"/> + + <TextView + android:id="@+id/user_session_status" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="18sp" + android:layout_marginLeft="10dp" + android:layout_marginStart="10dp" + android:ellipsize="marquee" + android:singleLine="true" + android:textAppearance="?android:attr/textAppearanceMedium" /> + + </LinearLayout> + + <Button + android:id="@+id/user_session_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + /> +</LinearLayout> |