You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.6 KiB
Java
53 lines
1.6 KiB
Java
package com.xypower.mppreview;
|
|
|
|
import androidx.appcompat.app.AppCompatActivity;
|
|
|
|
import android.content.ComponentCallbacks2;
|
|
import android.content.Context;
|
|
import android.content.Intent;
|
|
import android.os.Build;
|
|
import android.os.Bundle;
|
|
import android.util.Log;
|
|
import android.view.View;
|
|
import android.view.Window;
|
|
import android.view.WindowInsets;
|
|
import android.view.WindowInsetsController;
|
|
import android.view.WindowManager;
|
|
|
|
import com.xypower.mppreview.bean.Contants;
|
|
|
|
public class CameraActivity extends AppCompatActivity {
|
|
|
|
private final static String TAG = "HDR";
|
|
public int intExtra;
|
|
|
|
@Override
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
super.onCreate(savedInstanceState);
|
|
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
|
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
|
setContentView(R.layout.activity_camera);
|
|
Intent intent = getIntent();
|
|
intExtra = intent.getIntExtra(Contants.HDRNUM, 0);
|
|
if (null == savedInstanceState) {
|
|
Bundle bundle = new Bundle();
|
|
bundle.putInt(Contants.HDRNUM,intExtra);
|
|
getSupportFragmentManager().beginTransaction().setReorderingAllowed(true).replace(R.id.container, Camera2RawFragment.class, bundle).commit();
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public void onTrimMemory(int level) {
|
|
Log.w(TAG, "Event onTrimMemory level=" + level);
|
|
try {
|
|
System.gc();
|
|
} catch (Exception ex) {
|
|
ex.printStackTrace();
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public void onLowMemory() {
|
|
Log.w(TAG, "Event onLowMemory");
|
|
}
|
|
} |