This file contains 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
# Overall config | |
dist: xenial | |
language: android | |
# Android version config | |
android: | |
components: | |
- build-tools-28.0.3 | |
- android-28 |
This file contains 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
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="uk.co.jakelee.updatelistener"> | |
<application | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name" | |
android:roundIcon="@mipmap/ic_launcher_round" | |
android:supportsRtl="true" | |
android:theme="@style/AppTheme"> |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="uk.co.jakelee.dynamiciconchanging"> | |
<application | |
android:label="@string/app_name" | |
android:theme="@style/AppTheme"> | |
<activity android:name=".MainActivity"> | |
<intent-filter> | |
<category android:name="android.intent.category.LAUNCHER"/> |
This file contains 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 fun setupVersionInfo() { | |
findPreference(getString(R.string.pref_version)).title = "V${BuildConfig.VERSION_NAME}" | |
findPreference(getString(R.string.pref_version)).summary = String.format( | |
getString(R.string.version_summary), | |
BuildConfig.VERSION_CODE, | |
SimpleDateFormat("dd MMM yyy", Locale.US).format(BuildConfig.BUILD_TIME) | |
) | |
} |
This file contains 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 prefHelper = PreferenceHelper(this) | |
val myBoolean = prefHelper.getBooleanPref(PreferenceHelper.BooleanPref.setting1) | |
prefHelper.setBooleanPref(PreferenceHelper.BooleanPref.setting1, false) | |
val myString = prefHelper.getStringPref(PreferenceHelper.StringPref.setting1) | |
prefHelper.setStringPref(PreferenceHelper.StringPref.setting1, "abc") |
This file contains 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 MainActivity: AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
this.supportFragmentManager | |
.beginTransaction() | |
.replace(R.id.fragment_frame, PrefsFragment()) | |
.commit() | |
} |
This file contains 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 ContentAdapter(private val rows: List<IRow>) : RecyclerView.Adapter<RecyclerView.ViewHolder>() { | |
interface IRow | |
class HeaderRow(val date: String, val title: String) : IRow | |
class MessageRow(val message: String) : IRow | |
class ColourRow(val colour: Int) : IRow | |
class HeaderViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { | |
val dateView: TextView = itemView.findViewById(R.id.date) | |
val titleView: TextView = itemView.findViewById(R.id.title) |
This file contains 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
interface ListPositioner { | |
val recyclerScrollKey: String | |
fun loadListPosition() | |
fun saveListPosition() | |
fun resetListPosition() | |
} |
This file contains 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
<TableRow | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<TextView | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:text="@string/Label_Email" /> | |
<TextView | |
android:id="@+id/customer_email" |
This file contains 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
<a class="fa-stack fa-2x fa-fw" href="https://www.linkedin.com/in/jake-lee" target="_blank"> | |
<i class="fab fa-linkedin fa-2x"></i> | |
</a> | |
<a class="fa-stack fa-2x fa-fw" href="https://github.com/JakeSteam" target="_blank"> | |
<i class="fab fa-github-square fa-2x"></i> | |
</a> | |
<a class="fa-stack fa-2x fa-fw" href="https://www.reddit.com/user/JakeSteam/" target="_blank"> | |
<i class="fab fa-reddit-square fa-2x"></i> | |
</a> | |
<a class="fa-stack fa-2x fa-fw" href="https://facebook.com/Jake.L" target="_blank"> |