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
//view | |
private val itemTouchHelper = | |
ItemTouchHelper(object : ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.RIGHT) { | |
override fun onMove( | |
recyclerView: RecyclerView, | |
viewHolder: RecyclerView.ViewHolder, | |
target: RecyclerView.ViewHolder | |
): Boolean = false | |
override fun onSwiped(viewHolder: RecyclerView.ViewHolder, direction: Int) { |
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
//https://square.github.io/retrofit/ | |
@FormUrlEncoded | |
@POST("endpoint/") | |
Call<LoginResponse> login(@Field("codigo_empresa") String username); | |
String username = user.getText().toString().trim(); | |
Log.v("CONSOLE",username); | |
Call< LoginResponse > loginResponseCall = ApiClient.getUserService ( ).login ( username ); |
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 LogInFragment : Fragment() { | |
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | |
super.onViewCreated(view, savedInstanceState) | |
//TODO events | |
binding.buttonLogIn.setOnClickListener { | |
if(validForm()) { | |
showMessage() | |
} |
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
Mercado pago : | |
implementation ('com.mercadopago.android.px:checkout:4.+') | |
https://github.com/mercadopago/px-android | |
Error: | |
Duplicate value for resource 'attr/labelVisibilityMode' with config 'DEFAULT' and product | |
Fix : | |
build.gradle | |
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() { | |
private val html = "<html><ul>Message".plus( | |
"<li> Prueba 1</li>" | |
).plus( | |
"<li> Prueba 2</li>" | |
).plus( | |
"<li> Prueba 3</li>" | |
).plus( | |
"</ul></html>" | |
) |
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
edmedina@BLX-PE-edmedina-2 AppDemo % ./gradlew tasks | |
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details | |
> Task :tasks | |
------------------------------------------------------------ | |
Tasks runnable from root project | |
------------------------------------------------------------ | |
Android tasks |
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.emedinaa.rawdemo | |
import android.net.Uri | |
import android.os.Bundle | |
import android.util.Log | |
import androidx.appcompat.app.AppCompatActivity | |
import kotlinx.android.synthetic.main.activity_main.* | |
import java.io.* | |
class MainActivity : AppCompatActivity() { |
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
@Override | |
public void onBindViewHolder(@NonNull RecyclerAdapter.CharacterViewHolder holder, int position) { | |
Character character = characterList.get(position); | |
holder.tvName.setText(character.getName()); | |
holder.tvHouse.setText(character.getHouse()); | |
holder.tvPatronous.setText(character.getPatronus()); | |
holder.tvSpecies.setText(character.getBloodStatus()); | |
holder.tvSpecies.setText(character.getSpecies()); |
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
task sourcesJar(type: Jar) { | |
from android.sourceSets.main.java.srcDirs | |
archiveClassifier = 'sources' | |
} | |
artifacts { | |
archives sourcesJar | |
} |
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
//build.gradle | |
buildscript { | |
ext.kotlin_version = '1.3.21' | |
repositories { | |
google() | |
jcenter() | |
} | |
dependencies { |