This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Paint strokePaint = new Paint(); | |
| strokePaint.setStyle(Paint.Style.STROKE); | |
| strokePaint.setStrokeWidth(Etils.dpToPx(1)); | |
| strokePaint.setColor(Color.RED); | |
| canvas.drawRect(innerRectHump, strokePaint); | |
| canvas.drawRect(outerRectHump, strokePaint); | |
| canvas.drawPath(humpCirclePath, strokePaint); | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // app/build.gradle | |
| // place this before other dependencies | |
| compile 'com.jakewharton:butterknife:8.6.0' | |
| annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.0' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private void init() { | |
| mAllEntriesAdapter = new AllEntriesRecyclerAdapter(AllEntriesActivity.this, mEntries, mAllEntriesRecyclerView); | |
| mAllEntriesLayoutManager = new StaggeredGridLayoutManager(mNumColumns, StaggeredGridLayoutManager.VERTICAL); | |
| mAllEntriesRecyclerView.setLayoutManager(mAllEntriesLayoutManager); | |
| mAllEntriesRecyclerView.setAdapter(mAllEntriesAdapter); | |
| RealmQuery<Entry> entriesQuery = mRealm.where(Entry.class); | |
| RealmResults<Entry> entriesResults = entriesQuery.findAll(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Android Studio 2 Mapping: bit.ly/eddie-as2 | |
| AS 3.0 Preview: bit.ly/eddie-as3 | |
| build.gradle | |
| https://gist.github.com/eddieberklee/dcb5606496f5bd0cbe12b55d2332661e | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "Profiles": [ | |
| { | |
| "Ansi 1 Color" : { | |
| "Green Component" : 0.3315432667732239, | |
| "Red Component" : 0.8398278951644897, | |
| "Blue Component" : 0.3842783868312836 | |
| }, | |
| "Tags" : [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # custom Android Studio VM options, see http://tools.android.com/tech-docs/configuration | |
| -Xms1024m | |
| -Xmx2048m | |
| -XX:MaxPermSize=1024m | |
| -XX:ReservedCodeCacheSize=800m | |
| -XX:+UseCompressedOops | |
| -XX:+HeapDumpOnOutOfMemoryError | |
| # Sets the size of the allocated class metadata space that will trigger a GC the first time it is exceeded, default max value is 350m |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -ea | |
| -server | |
| -Xms1g | |
| -Xmx1g | |
| -Xss16m | |
| -XX:PermSize=256m | |
| -XX:MaxPermSize=256m | |
| -XX:+DoEscapeAnalysis | |
| -XX:+UseCompressedOops | |
| -XX:+UnlockExperimentalVMOptions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class RemoteConfigUtil { | |
| public static final String SHOULD_REQUIRE_LOGIN = "should_require_login"; | |
| public static void init() { | |
| Map<String, Object> defaultsMap = getDefaultsMap(); | |
| FirebaseRemoteConfig firebaseRemoteConfig = FirebaseRemoteConfig.getInstance(); | |
| FirebaseRemoteConfigSettings configSettings = new FirebaseRemoteConfigSettings.Builder() | |
| .setMinimumFetchIntervalInSeconds(BuildConfig.DEBUG ? 15 : 3600) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val sensorManager = getSystemService(Context.SENSOR_SERVICE) as SensorManager | |
| sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER)?.let { accelerometer -> | |
| sensorManager.registerListener(object : SensorEventListener { | |
| override fun onSensorChanged(event: SensorEvent) { | |
| val x = event.values[0] | |
| val y = event.values[1] | |
| val z = event.values[2] | |
| Timber.d("x: $x y: $y z: $z") | |
| val xAnimation = SpringAnimation(binding.root, DynamicAnimation.TRANSLATION_X).apply { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class HabitDayFS { | |
| lateinit var id: String | |
| lateinit var habitId: String | |
| @get:PropertyName("isCompleted") | |
| @set:PropertyName("isCompleted") | |
| var isCompleted: Boolean = false | |
| var noteText: String = "" |