GithubHelp home page GithubHelp logo

load from cloud about gesture-imageview HOT 6 OPEN

jasonpolites avatar jasonpolites commented on July 30, 2024
load from cloud

from gesture-imageview.

Comments (6)

shailendra123 avatar shailendra123 commented on July 30, 2024

Very hard to say anything without having a look into code. can you post your query along with code at stackoverflow as well. will try to answer you there

from gesture-imageview.

TequilaZhang avatar TequilaZhang commented on July 30, 2024

pic2

from gesture-imageview.

TequilaZhang avatar TequilaZhang commented on July 30, 2024

@shailendra123 ,I have not enough reputation on stackoverflow,
and when click ,the pic changed clear

from gesture-imageview.

TequilaZhang avatar TequilaZhang commented on July 30, 2024

@shailendra123 ,the girl is load from cloud,the file picture is the default, when i click ,it become clear.

from gesture-imageview.

TequilaZhang avatar TequilaZhang commented on July 30, 2024

public class PreviewActivity extends ActivityWithTitleBar {

public final static String BUNDLE_KEY_FILE_METADATA = "PreviewFile";

private GestureImageView mPreviewImage;
private CommonFile mFile ;
//private FrameLayout mProgressBar;
private ProgressDialog mProgressDialog;
private Dialog mDeleteDialog;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Intent intent = getIntent();
    if(intent != null) {
        mFile = (CommonFile) intent.getSerializableExtra(BUNDLE_KEY_FILE_METADATA);     
    }
    mActionBar.setTitle(mFile.getFileName());
    //mProgressBar.setVisibility(View.VISIBLE);
    initDialog();

    if(mFile != null){

        mFile.getPreviewContent(R.drawable.thumnail_placeholder, mPreviewImage, new onCachedItemLoadListener<String, Bitmap>() {

            @Override
            public void onCachedItemLoadFinished(final String key,  final int errorCode) {
                if (BackupFileException.ErrorOk == errorCode) {
                    if (mFile.getCloudId().equals(key)) {
                        runOnUiThread(new Runnable() {
                            public void run() {
                                //mProgressBar.setVisibility(View.GONE);
                                mPreviewImage.redraw();;

                            }
                        });
                    }
                } else {
                    runOnUiThread(new Runnable() {
                        public void run() {
                            //mProgressBar.setVisibility(View.GONE);
                        }
                    });
                }                   
            }

            @Override
            public void onCachedItemLoadProgress(String key,
                    long currentSize, long totalSize) {
            }
        });
    }
}

from gesture-imageview.

TequilaZhang avatar TequilaZhang commented on July 30, 2024

@shailendra123
in getPreviewContent function:when the drawable is downloaded from cloud. it will call mPreviewImage.setImageDrawable(drawable )

from gesture-imageview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.