Dylan McIntyre 8 years ago
commit 425fc07054
  1. 2
      build.gradle
  2. 4
      camerakit/build.gradle
  3. 5
      camerakit/src/main/java/com/flurgle/camerakit/CameraView.java
  4. 4
      demo/build.gradle
  5. 2
      demo/src/main/AndroidManifest.xml
  6. 4
      demo/src/main/java/com/flurgle/camerakit/demo/AutoUnfocusEditText.java
  7. 16
      demo/src/main/res/layout/activity_main.xml
  8. 14
      demo/src/main/res/layout/activity_preview.xml
  9. 2
      gradle/wrapper/gradle-wrapper.properties

@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.android.tools.build:gradle:2.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files

@ -11,7 +11,7 @@ android {
buildToolsVersion "25.0.2"
defaultConfig {
minSdkVersion 16
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
@ -32,7 +32,7 @@ android {
}
dependencies {
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.android.support:appcompat-v7:25.2.0'
}
apply from: 'https://raw.githubusercontent.com/blundell/release-android-library/master/android-release-aar.gradle'

@ -122,6 +122,7 @@ public class CameraView extends FrameLayout {
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
if (mAdjustViewBounds) {
Size previewSize = getPreviewSize();
if(previewSize != null) {
if (getLayoutParams().width == LayoutParams.WRAP_CONTENT) {
int height = MeasureSpec.getSize(heightMeasureSpec);
float ratio = (float) height / (float) previewSize.getWidth();
@ -141,6 +142,10 @@ public class CameraView extends FrameLayout {
);
return;
}
}else{
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
return;
}
}
super.onMeasure(widthMeasureSpec, heightMeasureSpec);

@ -5,7 +5,7 @@ android {
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.flurgle.camerakit.demo"
minSdkVersion 16
minSdkVersion 15
targetSdkVersion 25
versionCode 2
versionName "1.0.1"
@ -21,7 +21,7 @@ android {
dependencies {
compile project(':camerakit')
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.jakewharton:butterknife:8.4.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
}

@ -3,7 +3,7 @@
package="com.flurgle.camerakit.demo">
<application
android:allowBackup="true"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher"

@ -1,12 +1,12 @@
package com.flurgle.camerakit.demo;
import android.content.Context;
import android.support.v7.widget.AppCompatEditText;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
public class AutoUnfocusEditText extends EditText {
public class AutoUnfocusEditText extends AppCompatEditText {
public AutoUnfocusEditText(Context context) {
super(context);

@ -109,7 +109,7 @@
android:layout_marginLeft="3dp"
android:text="CAPTURE METHOD"
android:textColor="@android:color/black"
android:textSize="14dp"
android:textSize="14sp"
android:textStyle="bold" />
<RadioGroup
@ -161,7 +161,7 @@
android:layout_marginLeft="3dp"
android:text="CROP OUTPUT"
android:textColor="@android:color/black"
android:textSize="14dp"
android:textSize="14sp"
android:textStyle="bold" />
<RadioGroup
@ -216,7 +216,7 @@
android:layout_marginLeft="3dp"
android:text="WIDTH"
android:textColor="@android:color/black"
android:textSize="14dp"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
@ -226,7 +226,7 @@
android:layout_marginLeft="3dp"
android:text="screen: 1080px"
android:textColor="@android:color/black"
android:textSize="11dp" />
android:textSize="11sp" />
<FrameLayout
android:layout_width="match_parent"
@ -250,7 +250,7 @@
android:gravity="center"
android:text="UPDATE"
android:textColor="@android:color/white"
android:textSize="14dp"
android:textSize="14sp"
android:textStyle="bold" />
</FrameLayout>
@ -314,7 +314,7 @@
android:layout_marginLeft="3dp"
android:text="HEIGHT"
android:textColor="@android:color/black"
android:textSize="14dp"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
@ -324,7 +324,7 @@
android:layout_marginLeft="3dp"
android:text="screen: 1920px"
android:textColor="@android:color/black"
android:textSize="11dp" />
android:textSize="11sp" />
<FrameLayout
android:layout_width="match_parent"
@ -348,7 +348,7 @@
android:gravity="center"
android:text="UPDATE"
android:textColor="@android:color/white"
android:textSize="14dp"
android:textSize="14sp"
android:textStyle="bold" />
</FrameLayout>

@ -50,7 +50,7 @@
android:layout_marginLeft="3dp"
android:text="NATIVE CAPTURE RESOLUTION"
android:textColor="@android:color/black"
android:textSize="18dp"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
@ -59,7 +59,7 @@
android:layout_height="wrap_content"
android:layout_marginLeft="3dp"
android:textColor="@android:color/black"
android:textSize="14.5dp" />
android:textSize="14.5sp" />
</LinearLayout>
@ -87,7 +87,7 @@
android:layout_marginLeft="3dp"
android:text="ACTUAL RESOLUTION"
android:textColor="@android:color/black"
android:textSize="18dp"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
@ -96,7 +96,7 @@
android:layout_height="wrap_content"
android:layout_marginLeft="3dp"
android:textColor="@android:color/black"
android:textSize="14.5dp" />
android:textSize="14.5sp" />
</LinearLayout>
@ -124,7 +124,7 @@
android:layout_marginLeft="3dp"
android:text="APPROX. UNCOMPRESSED SIZE"
android:textColor="@android:color/black"
android:textSize="18dp"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
@ -161,7 +161,7 @@
android:layout_marginLeft="3dp"
android:text="CAPTURE LATENCY"
android:textColor="@android:color/black"
android:textSize="18dp"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
@ -170,7 +170,7 @@
android:layout_height="wrap_content"
android:layout_marginLeft="3dp"
android:textColor="@android:color/black"
android:textSize="14.5dp" />
android:textSize="14.5sp" />
</LinearLayout>

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip

Loading…
Cancel
Save