當前位置: 首頁>>代碼示例>>Java>>正文


Java ActivityManager類代碼示例

本文整理匯總了Java中cn.finalteam.toolsfinal.ActivityManager的典型用法代碼示例。如果您正苦於以下問題:Java ActivityManager類的具體用法?Java ActivityManager怎麽用?Java ActivityManager使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ActivityManager類屬於cn.finalteam.toolsfinal包,在下文中一共展示了ActivityManager類的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: takeResult

import cn.finalteam.toolsfinal.ActivityManager; //導入依賴的package包/類
@Override
protected void takeResult(PhotoInfo info) {
    if (!mFunctionConfig.isMutiSelect()) {
        mPhotoList.clear();
        mSelectPhotoMap.clear();
    }
    mPhotoList.add(info);
    if(mFunctionConfig.isEnablePreview()){
        mIvPreView.setVisibility(View.VISIBLE);
    }
    mSelectPhotoMap.put(info.getPhotoPath(), info);
    mPhotoTempMap.put(info.getPhotoId(), new PhotoTempModel(info.getPhotoPath()));
    mPhotoEditListAdapter.notifyDataSetChanged();

    PhotoSelectActivity activity = (PhotoSelectActivity) ActivityManager.getActivityManager().getActivity(PhotoSelectActivity.class.getName());
    if (activity != null) {
        activity.takeRefreshGallery(info, true);
    }
    loadImage(info);
}
 
開發者ID:YuanPengandy,項目名稱:GalleryFinal-master,代碼行數:21,代碼來源:PhotoEditActivity.java

示例2: takeResult

import cn.finalteam.toolsfinal.ActivityManager; //導入依賴的package包/類
@Override
protected void takeResult(PhotoInfo info) {
    if (!GalleryFinal.getFunctionConfig().isMutiSelect()) {
        mPhotoList.clear();
        mSelectPhotoMap.clear();
    }
    mPhotoList.add(0, info);
    mSelectPhotoMap.put(info.getPhotoPath(), info);
    mPhotoTempMap.put(info.getPhotoId(), new PhotoTempModel(info.getPhotoPath()));
    if (!GalleryFinal.getFunctionConfig().isEditPhoto() && mTakePhotoAction) {
        resultAction();
    } else {
        if (GalleryFinal.getFunctionConfig().isEnablePreview()) {
            mIvPreView.setVisibility(View.VISIBLE);
        }
        mPhotoEditListAdapter.notifyDataSetChanged();

        PhotoSelectActivity activity = (PhotoSelectActivity) ActivityManager.getActivityManager().getActivity(PhotoSelectActivity.class.getName());
        if (activity != null) {
            activity.takeRefreshGallery(info, true);
        }
        loadImage(info);

        hasForceCrop();
    }
}
 
開發者ID:Liar1995,項目名稱:GeneqiaoGallery,代碼行數:27,代碼來源:PhotoEditActivity.java

示例3: takeResult

import cn.finalteam.toolsfinal.ActivityManager; //導入依賴的package包/類
@Override
protected void takeResult(PhotoInfo info) {
    if (!GalleryFinal.getFunctionConfig().isMutiSelect()) {
        mPhotoList.clear();
        mSelectPhotoList.clear();
    }
    mPhotoList.add(0, info);
    mSelectPhotoList.add(info);
    mPhotoTempMap.put(info.getPhotoId(), new PhotoTempModel(info.getPhotoPath()));
    if (!GalleryFinal.getFunctionConfig().isEditPhoto() && mTakePhotoAction) {
        resultAction();
    } else {
        if (GalleryFinal.getFunctionConfig().isEnablePreview()) {
            mIvPreView.setVisibility(View.VISIBLE);
        }
        mPhotoEditListAdapter.notifyDataSetChanged();

        PhotoSelectActivity activity = (PhotoSelectActivity) ActivityManager.getActivityManager().getActivity(PhotoSelectActivity.class.getName());
        if (activity != null) {
            activity.takeRefreshGallery(info, true);
        }
        loadImage(info);

        hasForceCrop();
    }
}
 
開發者ID:pengjianbo,項目名稱:GalleryFinal,代碼行數:27,代碼來源:PhotoEditActivity.java

示例4: onCreate

import cn.finalteam.toolsfinal.ActivityManager; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    super.onCreate(savedInstanceState);
    ActivityManager.getActivityManager().addActivity(this);
    mMediaScanner = new MediaScanner(this);
    DisplayMetrics dm = DeviceUtils.getScreenPix(this);
    mScreenWidth = dm.widthPixels;
    mScreenHeight = dm.heightPixels;
}
 
開發者ID:YuanPengandy,項目名稱:GalleryFinal-master,代碼行數:11,代碼來源:PhotoBaseActivity.java

示例5: onDestroy

import cn.finalteam.toolsfinal.ActivityManager; //導入依賴的package包/類
@Override
protected void onDestroy() {
    System.gc();
    super.onDestroy();
    mMediaScanner.unScanFile();
    ActivityManager.getActivityManager().finishActivity(this);
}
 
開發者ID:YuanPengandy,項目名稱:GalleryFinal-master,代碼行數:8,代碼來源:PhotoBaseActivity.java

示例6: deleteIndex

import cn.finalteam.toolsfinal.ActivityManager; //導入依賴的package包/類
public void deleteIndex(int position, PhotoInfo dPhoto) {
    if (dPhoto != null) {
        PhotoSelectActivity activity = (PhotoSelectActivity) ActivityManager.getActivityManager().getActivity(PhotoSelectActivity.class.getName());
        if (activity != null) {
            activity.deleteSelect(dPhoto.getPhotoId());
        }

        try {
            Iterator<Map.Entry<String, PhotoInfo>> entries = mSelectPhotoMap.entrySet().iterator();
            while (entries.hasNext()) {
                Map.Entry<String, PhotoInfo> entry = entries.next();
                if (entry.getValue() != null && entry.getValue().getPhotoId() == dPhoto.getPhotoId()) {
                    entries.remove();
                }
            }
        } catch (Exception e){}
    }

    if (mPhotoList.size() == 0) {
        mSelectIndex = 0;
        mTvEmptyView.setText(R.string.no_photo);
        mTvEmptyView.setVisibility(View.VISIBLE);
        mIvSourcePhoto.setVisibility(View.GONE);
        mIvCropPhoto.setVisibility(View.GONE);
        mIvPreView.setVisibility(View.GONE);
    } else {
        if (position == 0) {
            mSelectIndex = 0;
        } else if (position == mPhotoList.size()) {
            mSelectIndex = position - 1;
        } else {
            mSelectIndex = position;
        }

        PhotoInfo photoInfo = mPhotoList.get(mSelectIndex);
        loadImage(photoInfo);
    }
}
 
開發者ID:YuanPengandy,項目名稱:GalleryFinal-master,代碼行數:39,代碼來源:PhotoEditActivity.java

示例7: onCreate

import cn.finalteam.toolsfinal.ActivityManager; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    super.onCreate(savedInstanceState);
    ActivityManager.getActivityManager().addActivity(this);
    mMediaScanner = new MediaScanner(this);
    DisplayMetrics dm = DeviceUtils.getScreenPix(this);
    mScreenWidth = dm.widthPixels;
    mScreenHeight = dm.heightPixels;

}
 
開發者ID:Liar1995,項目名稱:GeneqiaoGallery,代碼行數:12,代碼來源:PhotoBaseActivity.java

示例8: onDestroy

import cn.finalteam.toolsfinal.ActivityManager; //導入依賴的package包/類
@Override
protected void onDestroy() {
    super.onDestroy();
    if (mMediaScanner != null) {
        mMediaScanner.unScanFile();
    }
    ActivityManager.getActivityManager().finishActivity(this);
}
 
開發者ID:Liar1995,項目名稱:GeneqiaoGallery,代碼行數:9,代碼來源:PhotoBaseActivity.java

示例9: finishGalleryFinalPage

import cn.finalteam.toolsfinal.ActivityManager; //導入依賴的package包/類
private void finishGalleryFinalPage() {
    ActivityManager.getActivityManager().finishActivity(PhotoEditActivity.class);
    ActivityManager.getActivityManager().finishActivity(PhotoSelectActivity.class);
    ActivityManager.getActivityManager().finishActivity(PhotoPreviewActivity.class);
    Global.mPhotoSelectActivity = null;
    System.gc();
}
 
開發者ID:Liar1995,項目名稱:GeneqiaoGallery,代碼行數:8,代碼來源:PhotoBaseActivity.java

示例10: deleteIndex

import cn.finalteam.toolsfinal.ActivityManager; //導入依賴的package包/類
public void deleteIndex(int position, PhotoInfo dPhoto) {
    if (dPhoto != null) {
        PhotoSelectActivity activity = (PhotoSelectActivity) ActivityManager.getActivityManager().getActivity(PhotoSelectActivity.class.getName());
        if (activity != null) {
            activity.deleteSelect(dPhoto.getPhotoId());
        }

        try {
            for(Iterator<PhotoInfo> iterator = mSelectPhotoList.iterator();iterator.hasNext();){
                PhotoInfo info = iterator.next();
                if (info != null && info.getPhotoId() == dPhoto.getPhotoId()) {
                    iterator.remove();
                    break;
                }
            }
        } catch (Exception e){}
    }

    if (mPhotoList.size() == 0) {
        mSelectIndex = 0;
        mTvEmptyView.setText(R.string.no_photo);
        mTvEmptyView.setVisibility(View.VISIBLE);
        mIvSourcePhoto.setVisibility(View.GONE);
        mIvCropPhoto.setVisibility(View.GONE);
        mIvPreView.setVisibility(View.GONE);
    } else {
        if (position == 0) {
            mSelectIndex = 0;
        } else if (position == mPhotoList.size()) {
            mSelectIndex = position - 1;
        } else {
            mSelectIndex = position;
        }

        PhotoInfo photoInfo = mPhotoList.get(mSelectIndex);
        loadImage(photoInfo);
    }
}
 
開發者ID:pengjianbo,項目名稱:GalleryFinal,代碼行數:39,代碼來源:PhotoEditActivity.java

示例11: finishGalleryFinalPage

import cn.finalteam.toolsfinal.ActivityManager; //導入依賴的package包/類
private void finishGalleryFinalPage() {
    ActivityManager.getActivityManager().finishActivity(PhotoEditActivity.class);
    ActivityManager.getActivityManager().finishActivity(PhotoSelectActivity.class);
}
 
開發者ID:YuanPengandy,項目名稱:GalleryFinal-master,代碼行數:5,代碼來源:PhotoBaseActivity.java

示例12: finishGalleryFinalPage

import cn.finalteam.toolsfinal.ActivityManager; //導入依賴的package包/類
private void finishGalleryFinalPage() {
    ActivityManager.getActivityManager().finishActivity(PhotoEditActivity.class);
    ActivityManager.getActivityManager().finishActivity(PhotoSelectActivity.class);
    Global.mPhotoSelectActivity = null;
    System.gc();
}
 
開發者ID:pengjianbo,項目名稱:GalleryFinal,代碼行數:7,代碼來源:PhotoBaseActivity.java


注:本文中的cn.finalteam.toolsfinal.ActivityManager類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。