Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] add welcome page. #766

Merged
merged 44 commits into from
Dec 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
7f339a4
Remove redundant code for segmentation.
WinterGeng Nov 18, 2022
48d2a1b
Merge branch 'PaddlePaddle:develop' into gbd_android
WinterGeng Nov 19, 2022
d1eaee0
Merge branch 'develop' into gbd_android
DefTruth Nov 20, 2022
d2974f6
Merge remote-tracking branch 'origin/gbd_android' into gbd_android
WinterGeng Nov 21, 2022
b5d07e3
Merge branch 'PaddlePaddle:develop' into gbd_android
WinterGeng Nov 21, 2022
3033096
Merge branch 'PaddlePaddle:develop' into gbd_android
WinterGeng Nov 21, 2022
6107d59
Merge branch 'PaddlePaddle:develop' into gbd_android
WinterGeng Nov 22, 2022
e77b79e
Merge branch 'PaddlePaddle:develop' into gbd_android
WinterGeng Nov 22, 2022
40da422
Merge branch 'PaddlePaddle:develop' into gbd_android
WinterGeng Nov 23, 2022
9d58f32
Merge branch 'PaddlePaddle:develop' into gbd_android
WinterGeng Nov 23, 2022
30d18c6
Classification Documentation and example improvement.
WinterGeng Nov 23, 2022
1851eb9
Ocr Documentation and example improvement.
WinterGeng Nov 23, 2022
8e1e776
Merge branch 'develop' into gbd_android
DefTruth Nov 23, 2022
4ebf2ff
Merge branch 'develop' into gbd_android
DefTruth Nov 23, 2022
791e140
Modify submitted code.
WinterGeng Nov 24, 2022
f2cacaf
Modify submitted code.
WinterGeng Nov 24, 2022
a195485
Merge branch 'PaddlePaddle:develop' into gbd_android
WinterGeng Nov 24, 2022
3a59510
Merge branch 'PaddlePaddle:develop' into gbd_android
WinterGeng Nov 25, 2022
9acc8f9
1.detection、face、seg module add "svPreview.enableCamera();".
WinterGeng Nov 25, 2022
d4c6bae
Merge branch 'PaddlePaddle:develop' into gbd_android
WinterGeng Nov 25, 2022
138b1fa
change pekage name.
WinterGeng Nov 25, 2022
c757cc4
Merge branch 'PaddlePaddle:develop' into gbd_android
WinterGeng Nov 28, 2022
59853cc
Merge branch 'PaddlePaddle:develop' into gbd_android
WinterGeng Nov 29, 2022
58f0ef2
Merge branch 'develop' into gbd_android
DefTruth Nov 29, 2022
043f14c
Merge branch 'PaddlePaddle:develop' into gbd_android
WinterGeng Nov 29, 2022
9063869
Merge branch 'PaddlePaddle:develop' into gbd_android
WinterGeng Nov 29, 2022
18720f2
examples/vision/ to add OCRv3.
WinterGeng Nov 29, 2022
f69d3a0
Merge branch 'PaddlePaddle:develop' into gbd_android
WinterGeng Nov 29, 2022
86987a2
Merge branch 'PaddlePaddle:develop' into gbd_android
WinterGeng Nov 29, 2022
b0b0b74
Modify UI directory name.
WinterGeng Nov 29, 2022
33ff536
Merge branch 'develop' into gbd_android
DefTruth Nov 29, 2022
712df08
Merge branch 'PaddlePaddle:develop' into gbd_android
WinterGeng Nov 29, 2022
5416541
Merge branch 'PaddlePaddle:develop' into gbd_android
WinterGeng Nov 29, 2022
0306489
Refresh examples\vision,change OCR README.md
WinterGeng Nov 29, 2022
888577c
Update ui module
WinterGeng Nov 29, 2022
ddf3556
Update ui module
WinterGeng Nov 29, 2022
c1081ef
Merge branch 'develop' into gbd_android
WinterGeng Nov 29, 2022
64320ae
Merge branch 'PaddlePaddle:develop' into gbd_android
WinterGeng Nov 30, 2022
b285bfd
[Android] add enableCamera method.
WinterGeng Nov 30, 2022
93f888f
Merge branch 'PaddlePaddle:develop' into gbd_android
WinterGeng Nov 30, 2022
7262123
Merge branch 'PaddlePaddle:develop' into gbd_android
WinterGeng Dec 1, 2022
78ad3d7
[Android] add welcome page.
WinterGeng Dec 1, 2022
1417bfa
Merge branch 'PaddlePaddle:develop' into gbd_android
WinterGeng Dec 1, 2022
0eb643d
[Android] add text:“Power by EasyEdge”.
WinterGeng Dec 1, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions java/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,18 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".ocr.OcrMainActivity">
<activity android:name=".segmentation.SegmentationWelcomeActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name=".ocr.OcrSettingsActivity"
android:name=".segmentation.SegmentationMainActivity"
android:label="Settings">
</activity>
<activity
android:name=".segmentation.SegmentationSettingsActivity"
android:label="Settings">
</activity>
</application>
Expand Down
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);
}
}
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);
}
}
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);
}
}
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);
}
}
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);
}
}
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 java/android/app/src/main/res/layout/classification_welcome.xml
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 java/android/app/src/main/res/layout/detection_welcome.xml
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>



Loading