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
54872cab
Commit
54872cab
authored
Nov 24, 2016
by
Yusuke Iwaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
introduce Icepick.
parent
2ae619c8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
0 deletions
+27
-0
build.gradle
app/build.gradle
+4
-0
proguard-rules.pro
app/proguard-rules.pro
+10
-0
AbstractFragmentActivity.java
...hat/rocket/android/activity/AbstractFragmentActivity.java
+13
-0
No files found.
app/build.gradle
View file @
54872cab
...
...
@@ -72,6 +72,7 @@ repositories {
maven
{
url
'https://github.com/lijingle1/stetho-realm/raw/master/maven-repo'
}
maven
{
url
'https://github.com/RocketChat/Android-DDP/raw/master/repository'
}
maven
{
url
'http://dl.bintray.com/amulyakhare/maven'
}
maven
{
url
"https://clojars.org/repo/"
}
//for icepick.
}
dependencies
{
...
...
@@ -97,4 +98,7 @@ dependencies {
compile
'com.trello:rxlifecycle-components:1.0'
compile
'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
compile
'frankiesardo:icepick:3.2.0'
provided
'frankiesardo:icepick-processor:3.2.0'
}
app/proguard-rules.pro
View file @
54872cab
...
...
@@ -15,3 +15,13 @@
#-
keepclassmembers
class
fqcn
.
of
.
javascript
.
interface
.
for
.
webview
{
#
public
*
;
#
}
#
Icepick
-
dontwarn
icepick
.
**
-
keep
class
icepick
.
**
{
*
;
}
-
keep
class
**
$$
Icepick
{
*
;
}
-
keepclasseswithmembernames
class
*
{
@
icepick
.
*
<
fields
>
;
}
-
keepnames
class
*
{
@
icepick
.
State
*
;}
\ No newline at end of file
app/src/main/java/chat/rocket/android/activity/AbstractFragmentActivity.java
View file @
54872cab
package
chat
.
rocket
.
android
.
activity
;
import
android.os.Bundle
;
import
android.support.annotation.IdRes
;
import
android.support.annotation.Nullable
;
import
android.support.v4.app.Fragment
;
import
android.support.v4.app.FragmentManager
;
import
chat.rocket.android.helper.OnBackPressListener
;
import
com.trello.rxlifecycle.components.support.RxAppCompatActivity
;
import
icepick.Icepick
;
abstract
class
AbstractFragmentActivity
extends
RxAppCompatActivity
{
@Override
protected
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
Icepick
.
restoreInstanceState
(
this
,
savedInstanceState
);
}
@Override
protected
void
onSaveInstanceState
(
Bundle
outState
)
{
super
.
onSaveInstanceState
(
outState
);
Icepick
.
saveInstanceState
(
this
,
outState
);
}
protected
abstract
@IdRes
int
getLayoutContainerForFragment
();
@Override
public
final
void
onBackPressed
()
{
...
...
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