-
Notifications
You must be signed in to change notification settings - Fork 465
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Android] add app welcome page (#766)
* Remove redundant code for segmentation. * Classification Documentation and example improvement. * Ocr Documentation and example improvement. * 1.detection、face、seg module add "svPreview.enableCamera();". 2.java/android add fastdepolyUi module. * examples/vision/ to add OCRv3. * Modify UI directory name. * Refresh examples\vision,change OCR README.md * Update ui module * Update ui module * [Android] add enableCamera method. * [Android] add welcome page. * [Android] add text:“Power by EasyEdge”. Co-authored-by: DefTruth <31974251+DefTruth@users.noreply.github.com>
- Loading branch information
1 parent
11995e5
commit 0d53ebb
Showing
16 changed files
with
617 additions
and
2 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
31 changes: 31 additions & 0 deletions
31
...om/baidu/paddle/fastdeploy/app/examples/classification/ClassificationWelcomeActivity.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,31 @@ | ||
package com.baidu.paddle.fastdeploy.app.examples.classification; | ||
|
||
import android.app.Activity; | ||
import android.content.Intent; | ||
import android.graphics.Color; | ||
import android.os.Build; | ||
import android.os.Bundle; | ||
import android.support.annotation.Nullable; | ||
import android.view.View; | ||
|
||
import com.baidu.paddle.fastdeploy.app.examples.R; | ||
|
||
public class ClassificationWelcomeActivity extends Activity { | ||
|
||
@Override | ||
protected void onCreate(@Nullable Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) { | ||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | ||
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE | ||
); | ||
getWindow().setStatusBarColor(Color.TRANSPARENT); | ||
} | ||
setContentView(R.layout.classification_welcome); | ||
} | ||
|
||
public void startActivity(View view) { | ||
Intent intent = new Intent(ClassificationWelcomeActivity.this, ClassificationMainActivity.class); | ||
startActivity(intent); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...ain/java/com/baidu/paddle/fastdeploy/app/examples/detection/DetectionWelcomeActivity.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,30 @@ | ||
package com.baidu.paddle.fastdeploy.app.examples.detection; | ||
|
||
import android.app.Activity; | ||
import android.content.Intent; | ||
import android.graphics.Color; | ||
import android.os.Build; | ||
import android.os.Bundle; | ||
import android.support.annotation.Nullable; | ||
import android.view.View; | ||
|
||
import com.baidu.paddle.fastdeploy.app.examples.R; | ||
|
||
public class DetectionWelcomeActivity extends Activity { | ||
@Override | ||
protected void onCreate(@Nullable Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) { | ||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | ||
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE | ||
); | ||
getWindow().setStatusBarColor(Color.TRANSPARENT); | ||
} | ||
setContentView(R.layout.detection_welcome); | ||
} | ||
|
||
public void startActivity(View view) { | ||
Intent intent = new Intent(DetectionWelcomeActivity.this, DetectionMainActivity.class); | ||
startActivity(intent); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...rc/main/java/com/baidu/paddle/fastdeploy/app/examples/facedet/FaceDetWelcomeActivity.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,30 @@ | ||
package com.baidu.paddle.fastdeploy.app.examples.facedet; | ||
|
||
import android.app.Activity; | ||
import android.content.Intent; | ||
import android.graphics.Color; | ||
import android.os.Build; | ||
import android.os.Bundle; | ||
import android.support.annotation.Nullable; | ||
import android.view.View; | ||
|
||
import com.baidu.paddle.fastdeploy.app.examples.R; | ||
|
||
public class FaceDetWelcomeActivity extends Activity { | ||
@Override | ||
protected void onCreate(@Nullable Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) { | ||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | ||
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE | ||
); | ||
getWindow().setStatusBarColor(Color.TRANSPARENT); | ||
} | ||
setContentView(R.layout.facedet_welcome); | ||
} | ||
|
||
public void startActivity(View view) { | ||
Intent intent = new Intent(FaceDetWelcomeActivity.this, FaceDetMainActivity.class); | ||
startActivity(intent); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...du/paddle/fastdeploy/app/examples/keypointdetection/KeyPointDetectionWelcomeActivity.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,30 @@ | ||
package com.baidu.paddle.fastdeploy.app.examples.keypointdetection; | ||
|
||
import android.app.Activity; | ||
import android.content.Intent; | ||
import android.graphics.Color; | ||
import android.os.Build; | ||
import android.os.Bundle; | ||
import android.support.annotation.Nullable; | ||
import android.view.View; | ||
|
||
import com.baidu.paddle.fastdeploy.app.examples.R; | ||
|
||
public class KeyPointDetectionWelcomeActivity extends Activity { | ||
@Override | ||
protected void onCreate(@Nullable Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) { | ||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | ||
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE | ||
); | ||
getWindow().setStatusBarColor(Color.TRANSPARENT); | ||
} | ||
setContentView(R.layout.keypointdetection_welcome); | ||
} | ||
|
||
public void startActivity(View view) { | ||
Intent intent = new Intent(KeyPointDetectionWelcomeActivity.this, KeyPointDetectionMainActivity.class); | ||
startActivity(intent); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...id/app/src/main/java/com/baidu/paddle/fastdeploy/app/examples/ocr/OcrWelcomeActivity.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,30 @@ | ||
package com.baidu.paddle.fastdeploy.app.examples.ocr; | ||
|
||
import android.app.Activity; | ||
import android.content.Intent; | ||
import android.graphics.Color; | ||
import android.os.Build; | ||
import android.os.Bundle; | ||
import android.support.annotation.Nullable; | ||
import android.view.View; | ||
|
||
import com.baidu.paddle.fastdeploy.app.examples.R; | ||
|
||
public class OcrWelcomeActivity extends Activity { | ||
@Override | ||
protected void onCreate(@Nullable Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) { | ||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | ||
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE | ||
); | ||
getWindow().setStatusBarColor(Color.TRANSPARENT); | ||
} | ||
setContentView(R.layout.ocr_welcome); | ||
} | ||
|
||
public void startActivity(View view) { | ||
Intent intent = new Intent(OcrWelcomeActivity.this, OcrMainActivity.class); | ||
startActivity(intent); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...va/com/baidu/paddle/fastdeploy/app/examples/segmentation/SegmentationWelcomeActivity.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,30 @@ | ||
package com.baidu.paddle.fastdeploy.app.examples.segmentation; | ||
|
||
import android.app.Activity; | ||
import android.content.Intent; | ||
import android.graphics.Color; | ||
import android.os.Build; | ||
import android.os.Bundle; | ||
import android.support.annotation.Nullable; | ||
import android.view.View; | ||
|
||
import com.baidu.paddle.fastdeploy.app.examples.R; | ||
|
||
public class SegmentationWelcomeActivity extends Activity { | ||
@Override | ||
protected void onCreate(@Nullable Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) { | ||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | ||
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE | ||
); | ||
getWindow().setStatusBarColor(Color.TRANSPARENT); | ||
} | ||
setContentView(R.layout.segmentation_welcome); | ||
} | ||
|
||
public void startActivity(View view) { | ||
Intent intent = new Intent(SegmentationWelcomeActivity.this, SegmentationMainActivity.class); | ||
startActivity(intent); | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
71 changes: 71 additions & 0 deletions
71
java/android/app/src/main/res/layout/classification_welcome.xml
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,71 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<FrameLayout | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<ImageView | ||
android:id="@+id/imageView" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:scaleType="centerCrop" | ||
android:background="@drawable/main_bk" | ||
/> | ||
|
||
<RelativeLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<TextView | ||
android:id="@+id/model_text" | ||
android:layout_width="320dp" | ||
android:layout_height="wrap_content" | ||
android:layout_centerHorizontal="true" | ||
android:layout_marginTop="120dp" | ||
android:background="@color/colorStartBtn" | ||
android:gravity="center" | ||
android:text="FastDeploy-Classification" | ||
android:textColor="@color/colorTextWrite" | ||
android:textSize="25sp" /> | ||
|
||
<TextView | ||
android:id="@+id/baidu" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_below="@id/model_text" | ||
android:layout_centerHorizontal="true" | ||
android:layout_marginTop="20dp" | ||
android:text="百度" | ||
android:textColor="@color/colorTextWrite" | ||
android:textSize="22sp" /> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_below="@id/baidu" | ||
android:layout_centerHorizontal="true" | ||
android:layout_marginTop="10dp" | ||
android:text="Power by EasyEdge" | ||
android:textColor="@color/colorTextWrite" | ||
android:textSize="22sp" /> | ||
|
||
<Button | ||
|
||
android:id="@+id/start_ui_activity" | ||
android:layout_width="200dp" | ||
android:layout_height="50dp" | ||
android:layout_alignParentBottom="true" | ||
android:layout_centerHorizontal="true" | ||
android:layout_marginBottom="50dp" | ||
android:background="@drawable/round_corner_btn" | ||
android:text="@string/start_ui_activity" | ||
android:textColor="@color/colorTextWrite" | ||
android:textSize="22sp" | ||
android:onClick="startActivity"/> | ||
|
||
|
||
</RelativeLayout> | ||
</FrameLayout> | ||
|
||
|
||
|
70 changes: 70 additions & 0 deletions
70
java/android/app/src/main/res/layout/detection_welcome.xml
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,70 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<FrameLayout | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<ImageView | ||
android:id="@+id/imageView" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:scaleType="centerCrop" | ||
android:background="@drawable/main_bk" | ||
/> | ||
|
||
<RelativeLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<TextView | ||
android:id="@+id/model_text" | ||
android:layout_width="320dp" | ||
android:layout_height="wrap_content" | ||
android:layout_centerHorizontal="true" | ||
android:layout_marginTop="120dp" | ||
android:background="@color/colorStartBtn" | ||
android:gravity="center" | ||
android:text="FastDeploy-Detection" | ||
android:textColor="@color/colorTextWrite" | ||
android:textSize="25sp" /> | ||
|
||
<TextView | ||
android:id="@+id/baidu" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_below="@id/model_text" | ||
android:layout_centerHorizontal="true" | ||
android:layout_marginTop="20dp" | ||
android:text="百度" | ||
android:textColor="@color/colorTextWrite" | ||
android:textSize="22sp" /> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_below="@id/baidu" | ||
android:layout_centerHorizontal="true" | ||
android:layout_marginTop="10dp" | ||
android:text="Power by EasyEdge" | ||
android:textColor="@color/colorTextWrite" | ||
android:textSize="22sp" /> | ||
|
||
<Button | ||
android:id="@+id/start_ui_activity" | ||
android:layout_width="200dp" | ||
android:layout_height="50dp" | ||
android:layout_alignParentBottom="true" | ||
android:layout_centerHorizontal="true" | ||
android:layout_marginBottom="50dp" | ||
android:background="@drawable/round_corner_btn" | ||
android:text="@string/start_ui_activity" | ||
android:textColor="@color/colorTextWrite" | ||
android:textSize="22sp" | ||
android:onClick="startActivity"/> | ||
|
||
|
||
</RelativeLayout> | ||
</FrameLayout> | ||
|
||
|
||
|
Oops, something went wrong.