Android Open Source - UniversalLoader Helper






From Project

Back to project page UniversalLoader.

License

The source code is released under:

Apache License

If you think the Android project UniversalLoader listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.michaelflisar.universalloader.demo;
/* w w  w. j  ava  2 s.  c  om*/
import java.util.concurrent.Callable;

import android.app.Activity;
import android.graphics.Color;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;

public class Helper
{
    public static View getTestFragmentView(Activity activity, OnClickListener clickListener)
    {
        LinearLayout v = new LinearLayout(activity);
        v.setBackgroundColor(Color.BLUE);
        v.setOrientation(LinearLayout.VERTICAL);
        TextView tv1 = new TextView(activity);
        TextView tv2 = new TextView(activity);
        Button b1 = new Button(activity);
        Button b2 = new Button(activity);
        Button b3 = new Button(activity);

        b1.setText("reload 1");
        b2.setText("reload 2");
        b3.setText("reload all");

        b1.setId(1);
        b2.setId(2);
        b3.setId(3);

        tv1.setId(android.R.id.text1);
        tv2.setId(android.R.id.text2);

        b1.setOnClickListener(clickListener);
        b2.setOnClickListener(clickListener);
        b3.setOnClickListener(clickListener);

        v.addView(tv1);
        v.addView(tv2);
        v.addView(b1);
        v.addView(b2);
        v.addView(b3);
        
        return v;
    }
    
    public static Callable<Object> getCallable(final int seconds)
    {
        return new Callable<Object>()
        {
            @Override
            public Object call() throws Exception
            {
                Thread.sleep(seconds * 1000);
                return seconds + "s pause finished";
            }
        };
    }
}




Java Source Code List

com.michaelflisar.universalloader.ULActivity.java
com.michaelflisar.universalloader.ULFragmentImpl.java
com.michaelflisar.universalloader.UniversalLoader.java
com.michaelflisar.universalloader.data.fragments.ULFragmentLoaderData.java
com.michaelflisar.universalloader.data.fragments.ULFragmentLoaders.java
com.michaelflisar.universalloader.data.main.ULFragmentKey.java
com.michaelflisar.universalloader.data.main.ULKey.java
com.michaelflisar.universalloader.data.main.ULLoaderDataManager.java
com.michaelflisar.universalloader.data.main.ULResultManager.java
com.michaelflisar.universalloader.data.main.ULResult.java
com.michaelflisar.universalloader.data.main.ULTaskManager.java
com.michaelflisar.universalloader.data.main.ULTask.java
com.michaelflisar.universalloader.demo.Helper.java
com.michaelflisar.universalloader.demo.TestActivity.java
com.michaelflisar.universalloader.demo.TestLoaderFragment.java
com.michaelflisar.universalloader.fragments.ULDialogFragment.java
com.michaelflisar.universalloader.fragments.ULFragment.java
com.michaelflisar.universalloader.helper.ULDebugger.java
com.michaelflisar.universalloader.helper.ULHelper.java
com.michaelflisar.universalloader.interfaces.IFragmentImplParent.java
com.michaelflisar.universalloader.interfaces.IUniversalLoaderListener.java
com.michaelflisar.universalloader.interfaces.IUniversalLoaderProvider.java