Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
620ab984
Commit
620ab984
authored
Nov 13, 2016
by
Yusuke Iwaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
multi-pane
parent
d5acef38
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
217 additions
and
170 deletions
+217
-170
MainActivity.java
.../main/java/chat/rocket/android/activity/MainActivity.java
+13
-0
sidebar.xml
app/src/main/res/layout/sidebar.xml
+204
-170
No files found.
app/src/main/java/chat/rocket/android/activity/MainActivity.java
View file @
620ab984
...
...
@@ -3,6 +3,7 @@ package chat.rocket.android.activity;
import
android.os.Bundle
;
import
android.support.annotation.Nullable
;
import
android.support.v4.widget.SlidingPaneLayout
;
import
android.view.View
;
import
android.widget.CompoundButton
;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
...
...
@@ -51,6 +52,18 @@ public class MainActivity extends AbstractAuthedActivity {
closeSidebarIfNeeded
();
});
SlidingPaneLayout
pane
=
(
SlidingPaneLayout
)
findViewById
(
R
.
id
.
sliding_pane
);
if
(
pane
!=
null
)
{
final
SlidingPaneLayout
subPane
=
(
SlidingPaneLayout
)
findViewById
(
R
.
id
.
sub_sliding_pane
);
pane
.
setPanelSlideListener
(
new
SlidingPaneLayout
.
SimplePanelSlideListener
()
{
@Override
public
void
onPanelClosed
(
View
panel
)
{
super
.
onPanelClosed
(
panel
);
if
(
subPane
!=
null
)
{
subPane
.
closePane
();
}
}
});
}
ImageView
myAvatar
=
(
ImageView
)
findViewById
(
R
.
id
.
img_my_avatar
);
new
Avatar
(
"demo.rocket.chat"
,
"John Doe"
).
into
(
myAvatar
);
}
...
...
app/src/main/res/layout/sidebar.xml
View file @
620ab984
<?xml version="1.0" encoding="utf-8"?>
<
RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:
layout_width=
"288dp
"
android:layout_height=
"match_parent
"
<
android.support.v4.widget.SlidingPaneLayout
android:
id=
"@+id/sub_sliding_pane
"
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:layout_gravity=
"start"
android:layout_width=
"280dp"
android:layout_height=
"match_parent"
android:theme=
"@style/AppTheme.Dark"
>
<android.support.v4.widget.NestedScrollView
android:layout_width=
"96dp"
android:layout_height=
"match_parent"
android:layout_gravity=
"start"
android:background=
"?attr/colorPrimaryDark"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<ImageButton
android:layout_width=
"80dp"
android:layout_height=
"80dp"
android:layout_margin=
"@dimen/margin_8"
android:src=
"@mipmap/ic_launcher"
style=
"@style/Base.Widget.AppCompat.Button.Borderless"
/>
<chat.rocket.android.widget.FontAwesomeButton
android:layout_width=
"80dp"
android:layout_height=
"80dp"
android:layout_margin=
"@dimen/margin_8"
android:text=
"@string/fa_plus"
style=
"@style/Base.Widget.AppCompat.Button.Borderless"
/>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
<RelativeLayout
android:layout_width=
"288dp"
android:layout_height=
"match_parent"
>
<LinearLayout
android:id=
"@+id/user_info_container"
...
...
@@ -209,5 +243,5 @@
/>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</RelativeLayout>
\ No newline at end of file
</RelativeLayout>
</android.support.v4.widget.SlidingPaneLayout>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment