joaquimley / avenging Goto Github PK
View Code? Open in Web Editor NEWMVP pattern example on Android: no Dagger or RxJava example
Home Page: http://joaquimley.com/blog/avenging/
License: Apache License 2.0
MVP pattern example on Android: no Dagger or RxJava example
Home Page: http://joaquimley.com/blog/avenging/
License: Apache License 2.0
Change list mode to wear-guidelines, handle list clicks to launch the new details activity.
Change list UI to 3 items per screen.
Handle the onLoadMore()
function
(try to) Fix flickering effect when the dataset changes
List click should start the new details activity
Extra: Add voice recognition for search feature #25
The wear version of the app isn't really showing any content on the details screen
We should have a similar experience as the mobile version, showing the description, list of comics, events etc.
Screens should appear with the list order
ANR on configuration change in List screen
App should not crash on the List screen rotation
Should be able to rotate screen without loosing any info or causing ANRs
Application sometimes crashes on configuration change
This isn't mandatory, more like a "nice-to-have".
Tutorial from android developer documents here
More info here
Create Instrumentation tests for the List features
onLoadMore()
)Noticed that when orientation is changed on ListActivity several times, LeakCanary finds a memory leak.
Apparently, RecyclerView
in ListFragment
leaks ListActivity
. When the adapter is detached from RecyclerView in onDestroyView(), the memory leak is fixed.
[ordered list the process to finding and recreating the issue, example below]
There should be no memory leaks
LeakCanary detects a memory leak, the Adapter is holding a reference to the ListFragment
since it has the setRetainInstance(true)
the onDestroy()
is not called.
ListFragment#onDestroyView
but this isn't very elegant. #19LeakCanary
screenshotBeen trying hard to get a minified version working but can't seem to get the correct rules.
Building with minifyEnabled = true / proguard gives many warning ultimately failing.
Here is the full error:
Error:(18, 0) Could not get unknown property 'marvelProductionEndpoint' for ProductFlavor_Decorated{name=main, dimension=null, minSdkVersion=DefaultApiVersion{mApiLevel=11, mCodename='null'}, targetSdkVersion=DefaultApiVersion{mApiLevel=24, mCodename='null'}, renderscriptTargetApi=null, renderscriptSupportModeEnabled=null, renderscriptSupportModeBlasEnabled=null, renderscriptNdkModeEnabled=null, versionCode=null, versionName=null, applicationId=null, testApplicationId=null, testInstrumentationRunner=null, testInstrumentationRunnerArguments={}, testHandleProfiling=null, testFunctionalTest=null, signingConfig=null, resConfig=null, mBuildConfigFields={}, mResValues={}, mProguardFiles=[], mConsumerProguardFiles=[], mManifestPlaceholders={}, mWearAppUnbundled=null} of type com.android.build.gradle.internal.dsl.ProductFlavor. <a href="openFile:/Users/smarques84/AndroidStudioProjects/avenging/core/build.gradle">Open File</a>
Noticed that when orientation is changed on ListActivity several times, LeakCanary finds a memory leak.
Apparently, RecyclerView
in ListFragment
leaks ListActivity
. When the adapter is detached from RecyclerView in onDestroyView(), the memory leak is fixed.
[ordered list the process to finding and recreating the issue, example below]
There should be no memory leaks
LeakCanary detects a memory leak, the Adapter is holding a reference to the ListFragment
since it has the setRetainInstance(true)
the onDestroy()
is not called.
ListFragment#onDestroyView
but this isn't very elegant. #19LeakCanary
screenshotMore info here
Create Instrumentation tests for the List features
onLoadMore()
)Using customer converters we can delegate the deserialization of the meta-data to the HTTP client, instead of having the abstract model Jake Wharton's talk on custom converters.
This enables us to remove unnecessary boilerplate encapsulating models/code.
See the talk then:
Some variables (such as compileSdkVersion
and buildToolsVersion
) don't need to be secret therefore shouldn't/don't need to be on gradle.settings
With the current situation we have a (very) verbose build.gradle
and unnecessary CI variables.
Does not apply.
Does not apply
Does not apply
After passing to the project's build.gradle
like this:
ext.buildToolsVer = '24.0.0'
ext.androidSupportVer = '24.1.1'
ext.googlePlayServicesVer = '9.0.2'
We can remove both the CI variables and verbose build.gradle
variables.
gradle.properties
to project:build.gradle
project:build.gradle
from both mobile and wear modulesREADME.MD
- What went wrong:
A problem occurred configuring project ':core'.You have not accepted the license agreements of the following SDK components:
[Android SDK Build-Tools 24.0.2].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html
onLoadMore black screen
notifyDataSetChanged() causes the whole adapter to be refreshed which (in some cases) causes a black screen and requires user interaction to refresh the view
Sometimes screen becomes black.
Change from GridViewPagerAdapter to fragment adapter
ANR on configuration change in Character detail screen
App should not crash on the Character details screen rotation
Should be able to rotate screen without loosing any info or causing ANRs
Application sometimes crashes on configuration change
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.