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
b2b57b9c
Commit
b2b57b9c
authored
Jun 02, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
About screen: scroll animation implemented using new Google Support Design library.
parent
f1010d29
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
115 additions
and
49 deletions
+115
-49
build.gradle
app/build.gradle
+2
-0
AboutViewer.java
app/src/main/java/com/xabber/android/ui/AboutViewer.java
+13
-2
about_backdrop.jpg
app/src/main/res/drawable/about_backdrop.jpg
+0
-0
about_viewer.xml
app/src/main/res/layout/about_viewer.xml
+73
-44
theme.xml
app/src/main/res/values-v21/theme.xml
+8
-0
theme.xml
app/src/main/res/values/theme.xml
+18
-2
preference_editor.xml
app/src/main/res/xml/preference_editor.xml
+1
-1
No files found.
app/build.gradle
View file @
b2b57b9c
...
...
@@ -41,11 +41,13 @@ repositories {
}
dependencies
{
compile
'com.android.support:design:22.2.0'
compile
'com.android.support:appcompat-v7:22.2.0'
compile
'com.android.support:support-v13:22.2.0'
compile
'com.github.ksoichiro:android-observablescrollview:1.5.0'
compile
'de.hdodenhof:circleimageview:1.2.2'
compile
'com.melnykov:floatingactionbutton:1.2.0'
compile
'dnsjava:dnsjava:2.1.7'
compile
'com.github.bumptech.glide:glide:3.6.0'
compile
project
(
'otr4j'
)
}
app/src/main/java/com/xabber/android/ui/AboutViewer.java
View file @
b2b57b9c
...
...
@@ -20,10 +20,13 @@ import android.content.pm.PackageInfo;
import
android.content.pm.PackageManager
;
import
android.net.Uri
;
import
android.os.Bundle
;
import
android.support.design.widget.CollapsingToolbarLayout
;
import
android.support.v4.app.NavUtils
;
import
android.support.v7.widget.Toolbar
;
import
android.view.View
;
import
android.widget.ImageView
;
import
com.bumptech.glide.Glide
;
import
com.xabber.android.R
;
import
com.xabber.android.ui.helper.ManagedActivity
;
...
...
@@ -50,8 +53,16 @@ public class AboutViewer extends ManagedActivity implements View.OnClickListener
findViewById
(
R
.
id
.
about_twitter
).
setOnClickListener
(
this
);
findViewById
(
R
.
id
.
about_redsolution
).
setOnClickListener
(
this
);
// ((TextView) findViewById(R.id.about_version))
// .setText(getString(R.string.about_version, getVersionName()));
CollapsingToolbarLayout
collapsingToolbar
=
(
CollapsingToolbarLayout
)
findViewById
(
R
.
id
.
collapsing_toolbar
);
collapsingToolbar
.
setTitle
(
"Xabber"
);
loadBackdrop
();
}
private
void
loadBackdrop
()
{
final
ImageView
imageView
=
(
ImageView
)
findViewById
(
R
.
id
.
backdrop
);
Glide
.
with
(
this
).
load
(
R
.
drawable
.
about_backdrop
).
centerCrop
().
into
(
imageView
);
}
private
String
getVersionName
()
{
...
...
app/src/main/res/drawable/about_backdrop.jpg
0 → 100644
View file @
b2b57b9c
81.5 KB
app/src/main/res/layout/about_viewer.xml
View file @
b2b57b9c
...
...
@@ -12,62 +12,91 @@
You should have received a copy of the GNU General Public License,
along with this program. If not, see http://www.gnu.org/licenses/.
-->
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<android.support.design.widget.CoordinatorLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:id=
"@+id/main_content"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
android:fitsSystemWindows=
"true"
>
<
Line
arLayout
android:id=
"@+id/a
bout_fake_tool
bar"
<
android.support.design.widget.AppB
arLayout
android:id=
"@+id/a
pp
bar"
android:layout_width=
"match_parent"
android:layout_height=
"
wrap_content
"
android:background=
"
?attr/colorPrimary
"
android:layout_height=
"
192dp
"
android:background=
"
#212122
"
android:elevation=
"8dp"
android:
paddingBottom=
"16dp
"
android:
paddingTop=
"?attr/actionBarSize
"
>
android:
fitsSystemWindows=
"true
"
android:
theme=
"@style/ThemeOverlay.AppCompat.Dark.ActionBar
"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@drawable/ic_connect"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:text=
"X"
android:textColor=
"@color/red_500"
android:textSize=
"56sp"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:text=
"abber"
android:textColor=
"@color/white"
android:textSize=
"56sp"
/>
<android.support.design.widget.CollapsingToolbarLayout
android:id=
"@+id/collapsing_toolbar"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:elevation=
"8dp"
android:fitsSystemWindows=
"true"
app:collapsedTitleTextAppearance=
"@style/ToolbarTitle"
app:contentScrim=
"#212122"
app:expandedTitleMarginBottom=
"56dp"
app:expandedTitleMarginEnd=
"64dp"
app:expandedTitleMarginStart=
"88dp"
app:expandedTitleTextAppearance=
"@style/CollapsingToolbarTitle"
app:layout_scrollFlags=
"scroll|exitUntilCollapsed"
>
<FrameLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:fitsSystemWindows=
"true"
app:layout_collapseMode=
"parallax"
>
<ImageView
android:id=
"@+id/backdrop"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:fitsSystemWindows=
"true"
android:scaleType=
"centerCrop"
</LinearLayout
>
/
>
<android.support.v7.widget.Toolbar
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:id=
"@+id/toolbar_default"
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:paddingBottom=
"16dp"
android:paddingLeft=
"16dp"
android:src=
"@drawable/ic_connect"
/>
android:elevation=
"8dp"
android:theme=
"@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme=
"@style/ThemeOverlay.AppCompat.Light"
app:titleTextAppearance=
"@style/ToolbarTitle"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:layout_marginBottom=
"36dp"
android:layout_marginLeft=
"88dp"
android:shadowColor=
"@color/grey_700"
android:shadowDx=
"1"
android:shadowDy=
"1"
android:shadowRadius=
"2"
android:text=
"@string/about_open_source_xmpp_client"
android:textColor=
"@color/green_50"
/>
</FrameLayout>
<android.support.v7.widget.Toolbar
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:id=
"@+id/toolbar_default"
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:elevation=
"8dp"
android:theme=
"@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:layout_collapseMode=
"pin"
app:popupTheme=
"@style/ThemeOverlay.AppCompat.Light"
/>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<ScrollView
<
android.support.v4.widget.Nested
ScrollView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
a
ndroid:layout_below=
"@id/about_fake_toolba
r"
>
a
pp:layout_behavior=
"@string/appbar_scrolling_view_behavio
r"
>
<LinearLayout
android:layout_width=
"match_parent"
...
...
@@ -263,6 +292,6 @@
</LinearLayout>
</ScrollView>
</
android.support.v4.widget.Nested
ScrollView>
</RelativeLayout>
\ No newline at end of file
</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file
app/src/main/res/values-v21/theme.xml
0 → 100644
View file @
b2b57b9c
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style
name=
"ThemeDark"
parent=
"Base.ThemeDark"
>
<item
name=
"android:windowDrawsSystemBarBackgrounds"
>
true
</item>
<item
name=
"android:statusBarColor"
>
@android:color/transparent
</item>
</style>
</resources>
\ No newline at end of file
app/src/main/res/values/theme.xml
View file @
b2b57b9c
...
...
@@ -14,12 +14,18 @@
-->
<resources>
<style
name=
"Theme"
parent=
"Theme.AppCompat.Light.NoActionBar"
>
<style
name=
"Theme"
parent=
"Theme.AppCompat.Light.DarkActionBar"
>
<item
name=
"windowActionBar"
>
false
</item>
<item
name=
"windowNoTitle"
>
true
</item>
<!--for text selection toolbar to be above usual toolbar -->
<item
name=
"windowActionModeOverlay"
>
true
</item>
</style>
<style
name=
"ThemeDark"
parent=
"Theme.AppCompat.NoActionBar"
>
<style
name=
"ThemeDark"
parent=
"Base.ThemeDark"
></style>
<style
name=
"Base.ThemeDark"
parent=
"Theme.AppCompat.NoActionBar"
>
<!--for text selection toolbar to be above usual toolbar -->
<item
name=
"windowActionModeOverlay"
>
true
</item>
</style>
...
...
@@ -27,4 +33,14 @@
<style
name=
"ToolbarTitle"
parent=
"@style/TextAppearance.Widget.AppCompat.Toolbar.Title"
>
<item
name=
"android:textSize"
>
17sp
</item>
</style>
<style
name=
"CollapsingToolbarTitle"
parent=
"@style/TextAppearance.Widget.AppCompat.Toolbar.Title"
>
<item
name=
"android:textSize"
>
32sp
</item>
<item
name=
"android:shadowColor"
>
@color/grey_700
</item>
<item
name=
"android:shadowDx"
>
10
</item>
<item
name=
"android:shadowDy"
>
10
</item>
<item
name=
"android:shadowRadius"
>
20
</item>
<item
name=
"android:textColor"
>
@color/grey_50
</item>
</style>
</resources>
\ No newline at end of file
app/src/main/res/xml/preference_editor.xml
View file @
b2b57b9c
...
...
@@ -65,7 +65,7 @@
android:key=
"@string/preference_about_key"
android:title=
"@string/preference_about"
>
<intent
android:targetClass=
"com.xabber.android.ui.
preferences.
AboutViewer"
android:targetClass=
"com.xabber.android.ui.AboutViewer"
android:targetPackage=
"@string/application_package"
/>
</Preference>
</PreferenceScreen>
\ 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