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
ANDROID | |
THIS IS THE ACTIVITY CLASS | |
============================================================================================================================= | |
public class AyudaEntelDialog extends android.support.v4.app.DialogFragment{ | |
private ImageView ivExit; | |
private VideoView vvTutorial; | |
private View rootView; |
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
ANDROID | |
THIS IS THE ACTIVITY CLASS | |
============================================================================================================================= | |
public class MensajeErrorDialog extends DialogFragment implements View.OnClickListener { | |
public final static int TIPO_NORMAL = 1; | |
public final static int TIPO_PREGUNTA = 2; | |
private String titulo, mensaje; |
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
ANDROID | |
=============================================================================================================================== | |
protected void reiniciarTimer(){ | |
cancelarTimer(); | |
timer = new Timer(); | |
TimerTask timerTask = new TimerTask() { | |
@Override | |
public void run() { | |
irPantalla(PromocionesActivity.class); |
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
ANDROID | |
=============================================================================================================================== | |
protected void playVideo(String videoPath, VideoView vv){ | |
try{ | |
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); | |
vv.setVideoPath(videoPath); | |
vv.start(); | |
vv.setOnErrorListener(new MediaPlayer.OnErrorListener() { | |
@Override |
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
ANDROID | |
================================================================================================================================= | |
SpannableString ss = new SpannableString(getResources().getString(R.string.politicaContrato)); | |
ClickableSpan clickableSpan = new ClickableSpan() { | |
@Override | |
public void onClick(View textView){ | |
reiniciarTimer(); | |
terminosCondicionesDialog = TerminosCondicionesDialog.newInstance(terminosCondicionesResponse); | |
terminosCondicionesDialog.show(getSupportFragmentManager(), "terminoCondiciones"); |
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
ANDROID | |
================================================================================================================================ | |
private void insertarRowDocumento(final DocumentoBean document) { | |
if (document != null) { | |
LinearLayout nuevoParticipante = new LinearLayout(getContext()); | |
LayoutInflater inflater = (LayoutInflater) getActivity().getSystemService(LAYOUT_INFLATER_SERVICE); | |
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); | |
View rootView = inflater.inflate(R.layout.document_row, null); |
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
ANDROID | |
================================================================================================================================== | |
código para enviar un intent y estar a la espera de su regreso | |
================================================================================================================================== | |
Intent intent = new Intent(getContext(), DocumentoClienteActivity.class); | |
startActivityForResult(intent, DOCUMENT_CODE); | |
================================================================================================================================== | |
código para enviar de regreso el objeto | |
================================================================================================================================== |
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
ANDROID | |
=================================================================================================================================== | |
setSupportActionBar(tbDocumento); | |
ActionBar actBar = getSupportActionBar(); | |
if (actBar != null) { | |
actBar.setDisplayHomeAsUpEnabled(true); | |
actBar.setIcon(R.drawable.ic_shopping_cart); | |
actBar.setHomeAsUpIndicator(R.drawable.ic_arrow_back); | |
actBar.setTitle("Editar Documento"); |
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
ANDROID | |
=================================================================================================================================== | |
viewpager.setAdapter(new FragmentPagerAdapter(getSupportFragmentManager(), getBaseContext())); | |
slidingTabs.setupWithViewPager(viewpager); | |
=================================================================================================================================== | |
xml | |
=================================================================================================================================== | |
<android.support.design.widget.TabLayout | |
android:id="@+id/sliding_tabs" |
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
ANDROID | |
=================================================================================================================================== | |
ADAPTER | |
=================================================================================================================================== | |
public class DocumentAdapter extends RecyclerView.Adapter<DocumentAdapter.ViewHolder>{ | |
private List<DocumentoBean> items; | |
public DocumentAdapter(List<DocumentoBean> items){ |
OlderNewer