d
This commit is contained in:
@@ -8,8 +8,10 @@ import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.provider.MediaStore;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
@@ -84,6 +86,7 @@ public class Main4Fragment extends BaseFragment<FragmentMain4Binding> implements
|
||||
private BaseRecycleViewAdapter baseRecycleViewAdapter;
|
||||
private ImageView userImageView;
|
||||
BaseActivity baseActivity;
|
||||
private String fileolod = "";
|
||||
|
||||
public Main4Fragment() {
|
||||
// Required empty public constructor
|
||||
@@ -213,6 +216,28 @@ public class Main4Fragment extends BaseFragment<FragmentMain4Binding> implements
|
||||
@Override
|
||||
public void confirm() {
|
||||
takeMyPhoto(1000);
|
||||
// try {
|
||||
//
|
||||
//
|
||||
// Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
// intent.setAction(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
// intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri
|
||||
// .fromFile(new File(fileolod)));
|
||||
// startActivityForResult(intent, 1);
|
||||
//
|
||||
//
|
||||
// //拍照我们用Action为MediaStore.ACTION_IMAGE_CAPTURE,
|
||||
// //有些人使用其他的Action但我发现在有些机子中会出问题,所以优先选择这个
|
||||
//
|
||||
//
|
||||
// /* Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
// intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(
|
||||
// Environment.getExternalStorageDirectory(), "temp.jpg")));
|
||||
// System.out.println("=============" + Environment.getExternalStorageDirectory());*/
|
||||
//
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -571,7 +596,7 @@ public class Main4Fragment extends BaseFragment<FragmentMain4Binding> implements
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
|
||||
Log.e("测试","测试");
|
||||
try {
|
||||
if (!(data == null)) {
|
||||
setIconDataFromIntent(data, requestCode,resultCode);
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
@@ -328,6 +329,7 @@ public class MainTabActivity extends BaseActivity<ActivityMainTabBinding>
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
|
||||
Log.e("测试","测试");
|
||||
if (resultCode == RESUlT_CODE_4) {
|
||||
if (currentFragment == fragment4) {
|
||||
// if(fragment0!=null){
|
||||
|
||||
@@ -121,7 +121,8 @@ public class MyPropertyActivity extends BaseActivity<ActivityMyPropertyBinding>
|
||||
homeGridAdapterItemBinding.tvFamily.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (homegridentityvArrayList.get(position).getString13().equals("1")) {
|
||||
//此处接口返回的is_host是1,但是解析后是double类型的1.0,所以做了特别处理,如果日后有问题,看看后台返回的is_host值
|
||||
if (homegridentityvArrayList.get(position).getString13().equals("1.0")) {
|
||||
AddFamilyDialog addFamilyDialog = new AddFamilyDialog(MyPropertyActivity.this, new AddFamilyDialog.OnAddFamilyListener() {
|
||||
@Override
|
||||
public void click(String phone,String username) {
|
||||
|
||||
@@ -105,6 +105,28 @@ public class SelectPicDanimicActivity extends Activity implements OnClickListene
|
||||
break;
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
|
||||
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.setAction(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri
|
||||
.fromFile(new File(fileolod)));
|
||||
startActivityForResult(intent, 1);
|
||||
|
||||
|
||||
//拍照我们用Action为MediaStore.ACTION_IMAGE_CAPTURE,
|
||||
//有些人使用其他的Action但我发现在有些机子中会出问题,所以优先选择这个
|
||||
|
||||
|
||||
/* Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(
|
||||
Environment.getExternalStorageDirectory(), "temp.jpg")));
|
||||
System.out.println("=============" + Environment.getExternalStorageDirectory());*/
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user