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
| //naive way of not getting OOME (still terrible but...) | |
| //in loop DO NOT DECODE TO BITMAP | |
| //map.put(TAG_Photo, bitmap); should become: | |
| map.put(TAG_Photo, Base64.decode(photo, Base64.DEFAULT)); //byte array take less space than coresponded base64 string | |
| SimpleAdapter adapter = ...; | |
| adapter.setViewBinder(new SimpleAdapter.ViewBinder() { | |
| @Override |
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 pl.selvin.simplelistfragmentsample; | |
| import android.database.Cursor; | |
| import android.net.Uri; | |
| import android.os.Bundle; | |
| import android.support.v4.app.FragmentActivity; | |
| import android.support.v4.app.ListFragment; | |
| import android.support.v4.app.LoaderManager; | |
| import android.support.v4.content.CursorLoader; | |
| import android.support.v4.content.Loader; |
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
| import android.content.Context; | |
| import android.database.Cursor; | |
| import android.database.DataSetObserver; | |
| import android.graphics.Color; | |
| import android.net.Uri; | |
| import android.os.Bundle; | |
| import android.provider.ContactsContract; | |
| import android.support.annotation.Nullable; | |
| import android.support.v4.app.Fragment; | |
| import android.support.v4.app.LoaderManager; |
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 pl.selvin.fragmentloader; | |
| import android.content.Intent; | |
| import android.os.AsyncTask; | |
| import android.os.Bundle; | |
| import android.support.v4.app.Fragment; | |
| import android.support.v7.app.AppCompatActivity; | |
| import android.view.View; | |
| import android.widget.Button; | |
| import android.widget.LinearLayout; |
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 pl.selvin.wallpaperchanger; | |
| import android.app.AlarmManager; | |
| import android.app.IntentService; | |
| import android.app.PendingIntent; | |
| import android.app.WallpaperManager; | |
| import android.content.BroadcastReceiver; | |
| import android.content.Context; | |
| import android.content.Intent; | |
| import android.os.Bundle; |
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
| using System; | |
| using System.Runtime.InteropServices; | |
| namespace SharedObject1Test | |
| { | |
| class Program | |
| { | |
| public class SharedObject1Proxy : IDisposable | |
| { | |
| #if GCC |
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
| public class MyPojo { | |
| private long id; | |
| private String name; | |
| public String getName() { | |
| return name; | |
| } | |
| public void setName(String name) { | |
| this.name = name; |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example" > | |
| <application | |
| <!-- other Activities goes here --> | |
| <activity | |
| android:name=".ProxyActivity" | |
| android:label="Some nice label" | |
| android:noHistory="true" | |
| android:theme="@android:style/Theme.NoDisplay"> | |
| <intent-filter> |
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
| static volatile boolean isRunning = true; | |
| void test() { | |
| final int SIZE = 16 * 1024; | |
| try { | |
| final PipedOutputStream pipedOutputStream = new PipedOutputStream(); | |
| final PipedInputStream pipedInputStream = new PipedInputStream(SIZE); | |
| pipedOutputStream.connect(pipedInputStream); | |
| final Object wait = new Object(); | |
| new Thread(new Runnable() { | |
| @Override |