This file contains hidden or 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
//once created, set the position to the middle | |
listViewObject.setSelectionFromTop(nameOfAdapterObject.MIDDLE, 0); |
This file contains hidden or 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
Picasso.with( context ) | |
.load( your_path ) | |
.error( R.drawable.ic_error ) | |
.placeholder( R.drawable.progress_animation ) | |
.into( image_view ); |
This file contains hidden or 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
viewPager = new ViewPager(this){ | |
@Override | |
public boolean dispatchKeyEvent(KeyEvent event) { | |
View nextFocus = findFocus(); | |
if(event.getAction() == KeyEvent.ACTION_DOWN) { | |
if(event.getKeyCode() == KeyEvent.KEYCODE_DPAD_RIGHT) | |
Log.d("TestFocus", "" + (nextFocus = FocusFinder.getInstance().findNextFocus(this, findFocus(), FOCUS_RIGHT))); | |
else if(event.getKeyCode() == KeyEvent.KEYCODE_DPAD_LEFT) | |
Log.d("TestFocus", "" + (nextFocus = FocusFinder.getInstance().findNextFocus(this, findFocus(), FOCUS_LEFT))); |
This file contains hidden or 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.pantos27.www.lesson17_asynctask; | |
import android.os.AsyncTask; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.view.View; | |
import android.widget.Toast; | |
import java.net.URL; |
NewerOlder