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
/* -------------------------------- DOWNLOAD BUTTON ---------------------------------------- */ | |
private fun downloadRegionDialog() { | |
val builder = AlertDialog.Builder(this@MainActivity) | |
val regionNameEdit = EditText(this@MainActivity) | |
regionNameEdit.hint = "Introduce un nombre" | |
regionNameEdit.gravity = Gravity.CENTER_HORIZONTAL | |
regionNameEdit.ellipsize |
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
package com.jeluchu.movimadrid.activity | |
import android.annotation.SuppressLint | |
import android.content.Context | |
import android.graphics.Bitmap | |
import android.graphics.BitmapFactory | |
import android.os.AsyncTask | |
import android.os.Bundle | |
import android.view.View | |
import android.widget.* |
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
import android.annotation.SuppressLint | |
import android.app.Activity | |
import android.app.AlertDialog | |
import android.content.Context | |
import android.support.annotation.StringRes | |
import android.support.v4.app.Fragment | |
import android.view.LayoutInflater | |
import android.view.View | |
import android.widget.Button | |
import android.widget.TextView |
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
@TypeConverter | |
fun stringToListPromo(data: String?): List<PromoEntity?>? { | |
if (data == null) { | |
return Collections.emptyList() | |
} | |
val listType: Type = object : | |
TypeToken<List<PromoEntity?>?>() {}.type | |
return gson.fromJson<List<PromoEntity?>>(data, listType) | |
} |