Skip to content

Instantly share code, notes, and snippets.

View marcherdiego's full-sized avatar
💻
Coding | 🍔 Eating | 🚲 Biking

Diego Marcher marcherdiego

💻
Coding | 🍔 Eating | 🚲 Biking
View GitHub Profile
@marcherdiego
marcherdiego / ListViewToFile.java
Created August 4, 2021 20:47
ListView to file
public Bitmap getWholeListViewItemsToBitmap(ListView listview) {
ListAdapter adapter = listview.getAdapter();
int itemCount = adapter.getCount();
int allItemsHeight = 0;
List<Bitmap> bitmaps = new ArrayList<>();
for (int i = 0; i < itemCount; i++) {
View childView = adapter.getView(i, null, listview);
childView.measure(
MeasureSpec.makeMeasureSpec(listview.getWidth(), MeasureSpec.EXACTLY),
@marcherdiego
marcherdiego / fruits_memory_game_privacy_policy.md
Created February 16, 2021 13:47
Fruits memory game privacy policy

Privacy Policy

Nerd's Corner built the Fruits Memory Game for Kids app as a Free app. This SERVICE is provided by Nerd's Corner at no cost and is intended for use as is.

This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.

If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.

The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Fruits Memory Game for Kiss unless otherwise defined in this Privacy Policy.

@marcherdiego
marcherdiego / CHANGELOG.MD
Created January 19, 2021 14:16
Example changelog file

vX.Y.Z

New

  • Feature 1
  • Feature 2

Fixed

  • Bugfix 1
  • Bugfix 2

Privacy Policy

Nerd's Corner built the Coloring Book - Kids Paint Playing app as a Free app. This SERVICE is provided by Nerd's Corner at no cost and is intended for use as is.

This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.

If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.

The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Coloring Book - Kids Paint Playing unless otherwise defined in this Privacy Policy.

@marcherdiego
marcherdiego / privacy.md
Last active November 5, 2020 15:34
privacy.md

Privacy Policy

Nerd's Corner built the Balloon Pop for Kids app as a Free app. This SERVICE is provided by Nerd's Corner at no cost and is intended for use as is.

This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.

If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.

The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Balloon Pop for Kiss unless otherwise defined in this Privacy Policy.

[
{
"screenId": 1,
"screenName": "Main",
"screenFields": [
{
"fieldId": 1,
"fieldName": "title",
"fieldValue": [
{
class MainView(activity: MainActivity, private val bus: EventBus) {
private val activityRef = WeakReference(activity)
init {
activity.findViewById<View>(R.id.someButton_id).setOnClickListener {
bus.post(SomeKindOfEvent())
}
}
class SomeKindOfEvent
class MainModel {
fun doBackgroundWork() {
object : AsyncTask<Unit, Unit, Unit>() {
override fun doInBackground(vararg params: Unit?) {
// Heavy work
}
override fun onPostExecute(result: Unit?) {
bus.post(ServerCallCompletedEvent())
}
@Subscribe
fun onSomebuttonClicked(event: SomebuttonClickedEvent) {
val activity = view.getActivity() ?: return
val someIntent = Intent(activity, SomeActivity::class.java)
activity.startActivity(someIntent)
}
class MainModel(private val bus: EventBus) {
// Your logic here
}