File tree Expand file tree Collapse file tree
lite/examples/object_detection/android
java/org/tensorflow/lite/examples/detection Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,7 +38,8 @@ apply from:'download_model.gradle'
3838
3939dependencies {
4040 implementation fileTree(dir : ' libs' , include : [' *.jar' ,' *.aar' ])
41- implementation ' com.android.support:appcompat-v7:28.0.0'
42- implementation ' com.android.support:design:28.0.0'
41+ implementation ' androidx.appcompat:appcompat:1.0.0'
42+ implementation ' androidx.coordinatorlayout:coordinatorlayout:1.0.0'
43+ implementation ' com.google.android.material:material:1.0.0'
4344 implementation ' org.tensorflow:tensorflow-lite:0.0.0-nightly'
4445}
Original file line number Diff line number Diff line change 3434import android .os .Handler ;
3535import android .os .HandlerThread ;
3636import android .os .Trace ;
37- import android . support .annotation .NonNull ;
38- import android . support . design . widget .BottomSheetBehavior ;
39- import android . support . v7 .app .AppCompatActivity ;
40- import android . support . v7 .widget .SwitchCompat ;
41- import android . support . v7 .widget .Toolbar ;
37+ import androidx .annotation .NonNull ;
38+ import com . google . android . material . bottomsheet .BottomSheetBehavior ;
39+ import androidx . appcompat .app .AppCompatActivity ;
40+ import androidx . appcompat .widget .SwitchCompat ;
41+ import androidx . appcompat .widget .Toolbar ;
4242import android .util .Size ;
4343import android .view .Surface ;
4444import android .view .View ;
Original file line number Diff line number Diff line change 1414 limitations under the License.
1515-->
1616
17- <android .support.design .widget.CoordinatorLayout xmlns : android =" http://schemas.android.com/apk/res/android"
17+ <androidx .coordinatorlayout .widget.CoordinatorLayout xmlns : android =" http://schemas.android.com/apk/res/android"
1818 xmlns : tools =" http://schemas.android.com/tools"
1919 android : layout_width =" match_parent"
2020 android : layout_height =" match_parent"
3535 android : layout_height =" match_parent"
3636 tools : context =" org.tensorflow.demo.CameraActivity" />
3737
38- <android .support.v7 .widget.Toolbar
38+ <androidx .appcompat .widget.Toolbar
3939 android : id =" @+id/toolbar"
4040 android : layout_width =" match_parent"
4141 android : layout_height =" ?attr/actionBarSize"
4646 android : layout_width =" wrap_content"
4747 android : layout_height =" wrap_content"
4848 android : src =" @drawable/tfl_logo" />
49- </android .support.v7 .widget.Toolbar>
49+ </androidx .appcompat .widget.Toolbar>
5050
5151 </RelativeLayout >
5252
5353 <include
5454 android : id =" @+id/bottom_sheet_layout"
5555 layout =" @layout/layout_bottom_sheet" />
56- </android .support.design .widget.CoordinatorLayout>
56+ </androidx .coordinatorlayout .widget.CoordinatorLayout>
Original file line number Diff line number Diff line change 1010 android : orientation =" vertical"
1111 android : padding =" 8dp"
1212 app : behavior_hideable =" true"
13- app : layout_behavior =" android.support.design.widget .BottomSheetBehavior" >
13+ app : layout_behavior =" com.google.android.material.bottomsheet .BottomSheetBehavior" >
1414
1515 <LinearLayout
1616 android : id =" @+id/gesture_layout"
173173 android : text =" API"
174174 android : textColor =" @android:color/black" />
175175
176- <android .support.v7 .widget.SwitchCompat
176+ <androidx .appcompat .widget.SwitchCompat
177177 android : id =" @+id/api_info_switch"
178178 android : layout_width =" match_parent"
179179 android : layout_height =" wrap_content"
Original file line number Diff line number Diff line change @@ -11,3 +11,5 @@ org.gradle.jvmargs=-Xmx1536m
1111# This option should only be used with decoupled projects. More details, visit
1212# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1313# org.gradle.parallel=true
14+ android.useAndroidX =true
15+ android.enableJetifier =true
You can’t perform that action at this time.
0 commit comments