Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xabber-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
xabber-android
Commits
e427377b
Commit
e427377b
authored
Jun 22, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Version added to navigation drawer top right corner.
parent
5a8888d2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
ContactListDrawerFragment.java
...java/com/xabber/android/ui/ContactListDrawerFragment.java
+13
-0
contact_list_drawer.xml
app/src/main/res/layout/contact_list_drawer.xml
+10
-0
No files found.
app/src/main/java/com/xabber/android/ui/ContactListDrawerFragment.java
View file @
e427377b
...
...
@@ -3,6 +3,8 @@ package com.xabber.android.ui;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.pm.PackageInfo
;
import
android.content.pm.PackageManager
;
import
android.os.Bundle
;
import
android.support.annotation.Nullable
;
import
android.support.v4.app.Fragment
;
...
...
@@ -12,6 +14,7 @@ import android.view.ViewGroup;
import
android.widget.AdapterView
;
import
android.widget.ImageView
;
import
android.widget.ListView
;
import
android.widget.TextView
;
import
com.xabber.android.R
;
import
com.xabber.android.data.Application
;
...
...
@@ -41,6 +44,14 @@ public class ContactListDrawerFragment extends Fragment implements View.OnClickL
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
View
view
=
inflater
.
inflate
(
R
.
layout
.
contact_list_drawer
,
container
,
false
);
try
{
((
TextView
)
view
.
findViewById
(
R
.
id
.
version
))
.
setText
(
getActivity
().
getPackageManager
().
getPackageInfo
(
getActivity
().
getPackageName
(),
0
)
.
versionName
);
}
catch
(
PackageManager
.
NameNotFoundException
e
)
{
e
.
printStackTrace
();
}
View
drawerHeader
=
view
.
findViewById
(
R
.
id
.
drawer_header
);
drawerHeaderImage
=
(
ImageView
)
drawerHeader
.
findViewById
(
R
.
id
.
drawer_header_image
);
...
...
@@ -67,6 +78,8 @@ public class ContactListDrawerFragment extends Fragment implements View.OnClickL
divider
=
footerView
.
findViewById
(
R
.
id
.
drawer_divider
);
return
view
;
}
...
...
app/src/main/res/layout/contact_list_drawer.xml
View file @
e427377b
...
...
@@ -67,6 +67,16 @@
</LinearLayout>
</LinearLayout>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"right"
android:text=
"1.0.0"
android:id=
"@+id/version"
android:textColor=
"@color/grey_300"
android:paddingRight=
"4dp"
android:textSize=
"12sp"
/>
</FrameLayout>
<ListView
...
...
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