-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/native-android-camera-component (#210)
* upgraded to RN 0.43.4 with broken dependencies * Fixed style issues cause by native-base in some components (will be fully fixed in future commit) * deleted ‘home’ page (was not used anywhere) * Removed some native-base redundant form components * handled some parts of sign-in and splash screen to be “native-base less” * Made BadNavigationScreen into a Functional Component * Fixed native-base issues in activation page * fixed native-base issues in signup page * Replaced all the native-base view and text with react-native view and text * Animations look AWESOME * Refactored most of the flow of uploadLook * tiny refactor for brands autocomplete * Fixed native-base style issues in uploadLook (all stages) * fixed native-base issues with profilescreen & settings screen * Fixed broken react-native-video * fixed disappearing list views * Updated package son for RN0.43 * Removed duplicate permissions from AndroidManifest * fixed ‘next’ button style in uploadLookScreen * Added missing binding in addItemScreen constructor * fixed clear button * Fixed gif issue (facebook/react-native#13345) * Aligned Gllu.Button text * aligned report and back button in profile screen * fixed LikeView alignment * Fixed incorrect styling of LikeView * fix look screen keys bug * Removed weird gap in bottom of comments view * ios changes for rn0.40 * fixed empty view style issues in Notifications/Followers & Following screens * App loads react modules correctly. (Still have to deal with Flurry bug) * Fixed iOS flurry bug (resolved react-native-config version straight form sources instead of fork) * fixed missing config files in build.gradle * Feature/native android camera component (#208) * - Integrate camera native component * -Change default record circle button. - Force default front camera. - Crop image after stillshot. - Set crop aspect ratio to 9:16 * - Change cropper action bar background. - Remove unnecessary buttons. - Add flip horizontal button. - Remove image preview screen. - Fix taking photos on some devices. * - Fix video stretching. - Video preview now showed full screen * Remove from gitignore * - Remove rotate button. - Fix landscape camera crash (disable landscape) * - Add trimer library * Trim Video settings * Integrate video trimming in entire flow
- Loading branch information
Showing
41 changed files
with
2,785 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
117 changes: 117 additions & 0 deletions
117
android/app/src/main/java/com/gllu/Activities/TrimmerActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
package com.gllu.Activities; | ||
|
||
import android.app.ProgressDialog; | ||
import android.content.Intent; | ||
import android.net.Uri; | ||
import android.os.Bundle; | ||
import android.support.v7.app.ActionBar; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.view.Menu; | ||
import android.view.MenuItem; | ||
import android.widget.Toast; | ||
|
||
import com.gllu.R; | ||
|
||
import life.knowledge4.videotrimmer.K4LVideoTrimmer; | ||
import life.knowledge4.videotrimmer.interfaces.OnK4LVideoListener; | ||
import life.knowledge4.videotrimmer.interfaces.OnTrimVideoListener; | ||
|
||
public class TrimmerActivity extends AppCompatActivity implements OnTrimVideoListener, OnK4LVideoListener { | ||
|
||
public final static String EXTRA_VIDEO_PATH = "EXTRA_VIDEO_PATH"; | ||
|
||
private K4LVideoTrimmer mVideoTrimmer; | ||
private ProgressDialog mProgressDialog; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_trimmer); | ||
|
||
Intent extraIntent = getIntent(); | ||
String path = ""; | ||
|
||
if (extraIntent != null) { | ||
path = extraIntent.getStringExtra(this.EXTRA_VIDEO_PATH); | ||
} | ||
|
||
//setting progressbar | ||
mProgressDialog = new ProgressDialog(this); | ||
mProgressDialog.setCancelable(false); | ||
mProgressDialog.setMessage("Trimming your video..."); | ||
|
||
mVideoTrimmer = ((K4LVideoTrimmer) findViewById(R.id.timeLine)); | ||
if (mVideoTrimmer != null) { | ||
mVideoTrimmer.setMaxDuration(20); | ||
mVideoTrimmer.setOnTrimVideoListener(this); | ||
mVideoTrimmer.setOnK4LVideoListener(this); | ||
mVideoTrimmer.setDestinationPath("/storage/emulated/0/DCIM/CameraCustom/"); | ||
mVideoTrimmer.setVideoURI(Uri.parse(path)); | ||
mVideoTrimmer.setVideoInformationVisibility(false); | ||
} | ||
|
||
ActionBar actionBar = getSupportActionBar(); | ||
if (actionBar != null) { | ||
actionBar.setTitle("Trim Video"); | ||
actionBar.setDisplayHomeAsUpEnabled(true); | ||
} | ||
} | ||
|
||
@Override | ||
public boolean onCreateOptionsMenu(Menu menu) { | ||
super.onCreateOptionsMenu(menu); | ||
getMenuInflater().inflate(R.menu.trim_video_menu, menu); | ||
return true; | ||
} | ||
|
||
@Override | ||
public boolean onOptionsItemSelected(MenuItem item) { | ||
if (item.getItemId() == R.id.trim_video){ | ||
mVideoTrimmer.onSaveClicked(); | ||
} | ||
if (item.getItemId() == android.R.id.home) { | ||
setResult(RESULT_CANCELED); | ||
finish(); | ||
return true; | ||
} | ||
|
||
return true; | ||
} | ||
|
||
@Override | ||
public void onTrimStarted() { | ||
mProgressDialog.show(); | ||
} | ||
|
||
@Override | ||
public void getResult(final Uri uri) { | ||
mProgressDialog.cancel(); | ||
Intent intent = new Intent(); | ||
intent.putExtra(EXTRA_VIDEO_PATH, uri); | ||
setResult(RESULT_OK, intent); | ||
finish(); | ||
} | ||
|
||
@Override | ||
public void cancelAction() { | ||
mProgressDialog.cancel(); | ||
mVideoTrimmer.destroy(); | ||
finish(); | ||
} | ||
|
||
@Override | ||
public void onError(final String message) { | ||
mProgressDialog.cancel(); | ||
|
||
runOnUiThread(new Runnable() { | ||
@Override | ||
public void run() { | ||
Toast.makeText(TrimmerActivity.this, message, Toast.LENGTH_SHORT).show(); | ||
} | ||
}); | ||
} | ||
|
||
@Override | ||
public void onVideoPrepared() { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<life.knowledge4.videotrimmer.K4LVideoTrimmer xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:id="@+id/timeLine" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" /> | ||
|
29 changes: 29 additions & 0 deletions
29
...trimmer/src/androidTest/java/life/knowledge4/videotrimmer/ExampleInstrumentationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package life.knowledge4.videotrimmer; | ||
|
||
import android.content.Context; | ||
import android.support.test.InstrumentationRegistry; | ||
import android.support.test.filters.MediumTest; | ||
import android.support.test.runner.AndroidJUnit4; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
|
||
import static org.junit.Assert.*; | ||
|
||
/** | ||
* Instrumentation test, which will execute on an Android device. | ||
* | ||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a> | ||
*/ | ||
@MediumTest | ||
@RunWith(AndroidJUnit4.class) | ||
public class ExampleInstrumentationTest { | ||
@Test | ||
public void useAppContext() throws Exception { | ||
// Context of the app under test. | ||
Context appContext = InstrumentationRegistry.getTargetContext(); | ||
|
||
assertEquals("life.knowledge4.videotrimmer", appContext.getPackageName()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="life.knowledge4.videotrimmer"> | ||
|
||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | ||
|
||
<application | ||
android:allowBackup="true"> | ||
|
||
</application> | ||
|
||
</manifest> |
Oops, something went wrong.