Skip to content

Commit

Permalink
贴图素材提交
Browse files Browse the repository at this point in the history
  • Loading branch information
siwangqishiq committed Aug 10, 2015
1 parent b782a13 commit 3fd47b5
Show file tree
Hide file tree
Showing 128 changed files with 14 additions and 3 deletions.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
10 changes: 10 additions & 0 deletions app/src/main/java/com/xinlan/imageeditandroid/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import android.util.FloatMath;
import android.view.View;
import android.widget.ImageView;
import android.widget.Toast;

import com.xinlan.imageeditlibrary.editimage.EditImageActivity;
import com.xinlan.imageeditlibrary.picchooser.SelectPictureActivity;
Expand Down Expand Up @@ -94,11 +95,20 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
handleSelectFromAblum(data);
break;
case ACTION_REQUEST_EDITIMAGE://
handleEditorImage(data);
break;
}// end switch
}
}

private void handleEditorImage(Intent data) {
String newFilePath = data.getStringExtra("save_file_path");
Toast.makeText(this, "新图片路径: " + newFilePath, Toast.LENGTH_LONG).show();
//System.out.println("newFilePath---->" + newFilePath);
LoadImageTask loadTask = new LoadImageTask();
loadTask.execute(newFilePath);
}

private void handleSelectFromAblum(Intent data) {
String filepath = data.getStringExtra("imgPath");
path = filepath;
Expand Down
1 change: 0 additions & 1 deletion imageeditlibrary/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xinlan.imageeditlibrary" >

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public ViewHolder onCreateViewHolder(ViewGroup parent, int viewtype) {
public void onBindViewHolder(ViewHolder holder, int position) {
ImageHolder imageHoler = (ImageHolder) holder;
String path = pathList.get(position);
// System.out.println(path);
System.out.println(path);
ImageLoader.getInstance().displayImage("assets://" + path,
imageHoler.image, imageOption);
imageHoler.image.setTag(path);
Expand All @@ -85,7 +85,6 @@ public void addStickerImages(String folderPath) {
.list(folderPath);
for (String name : files) {
pathList.add(folderPath + File.separator + name);
// System.out.println(name);
}
} catch (IOException e) {
e.printStackTrace();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
import java.io.InputStream;
import java.util.LinkedHashMap;

import android.annotation.TargetApi;
import android.app.Dialog;
import android.content.res.AssetManager;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.widget.LinearLayoutManager;
Expand Down Expand Up @@ -218,6 +220,7 @@ protected void onCancelled() {
dialog.dismiss();
}

@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@Override
protected void onCancelled(Bitmap result) {
super.onCancelled(result);
Expand Down

0 comments on commit 3fd47b5

Please sign in to comment.