From 8b9ba1c7b2a4d8769d54d7d7c965c3ae993f1832 Mon Sep 17 00:00:00 2001 From: fl_shy Date: Thu, 13 Jun 2024 22:19:46 +0800 Subject: [PATCH] =?UTF-8?q?minefragment=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle.kts | 6 + src/main/AndroidManifest.xml | 27 +++++ .../java/com/hnucm/weather/GlideEngine.java | 114 ++++++++++++++++++ .../java/com/hnucm/weather/MineFragment.java | 35 ++++++ src/main/res/drawable/circle_shape.xml | 5 + src/main/res/drawable/img_31.png | Bin 0 -> 216 bytes src/main/res/drawable/img_32.png | Bin 0 -> 6441 bytes src/main/res/layout/fragment_life.xml | 5 +- src/main/res/layout/fragment_mine.xml | 24 +++- 9 files changed, 212 insertions(+), 4 deletions(-) create mode 100644 src/main/java/com/hnucm/weather/GlideEngine.java create mode 100644 src/main/res/drawable/circle_shape.xml create mode 100644 src/main/res/drawable/img_31.png create mode 100644 src/main/res/drawable/img_32.png diff --git a/build.gradle.kts b/build.gradle.kts index edf612b..03a34c3 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -38,4 +38,10 @@ dependencies { androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") implementation ("com.geyifeng.immersionbar:immersionbar:3.2.2") implementation ("com.geyifeng.immersionbar:immersionbar-components:3.2.2") + + implementation ("io.github.lucksiege:pictureselector:v3.11.2") + implementation ("io.github.lucksiege:compress:v3.11.2") + implementation ("io.github.lucksiege:ucrop:v3.11.2") + implementation ("io.github.lucksiege:camerax:v3.11.2") + implementation ("com.github.bumptech.glide:glide:4.15.1") } \ No newline at end of file diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml index 03494e0..1d3fc76 100644 --- a/src/main/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -1,6 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + () { + @Override + public void onResult(ArrayList result) { + //result.get(0).getRealPath(); + Glide.with(MineFragment.this) + .load(Uri.fromFile(new File(result.get(0).getRealPath()))) + .into(imageView); + } + + @Override + public void onCancel() { + + } + }); + imageView.setImageResource(R.drawable.circle_shape); + } + }); return view; } } \ No newline at end of file diff --git a/src/main/res/drawable/circle_shape.xml b/src/main/res/drawable/circle_shape.xml new file mode 100644 index 0000000..df29d5f --- /dev/null +++ b/src/main/res/drawable/circle_shape.xml @@ -0,0 +1,5 @@ + + + + diff --git a/src/main/res/drawable/img_31.png b/src/main/res/drawable/img_31.png new file mode 100644 index 0000000000000000000000000000000000000000..041e846f8c1d3ef70c94de109d958f4314ab55d5 GIT binary patch literal 216 zcmV;}04M*6P)$1Hm-?TaspXpI<6~UR75^mLNp~ zMo*f})LV|T!-SY2Db{kBH3qb7aiO<|v(;6rXhhU=WDGoq1E`jrz(t>L`_TSO?o;?1?RTQ%^jp8dU-Sawt;&p- Sn-8A=00009Nkl3i|N@f*9m}{i~jy%v5!EW+pSq;CuI+-yuwQ*K%)H-KB0-ckAZi z^!)SB$Gq~&E03>Ov0}sK&6_`MX=%B9^5n^z7cN|Ay>{)|y*qdA(7k*281OfK!!_K4 zd+`jOMHwiIFaN*P4$YrGKYiJf-DFFG;ju!GekF*RMZx z=FFMjc?P+-%|-~LmSanzWsk0Lg$*An!e#X?+R-D^B#jc2yOmL2?oO-mJZ)hd+GY^Kk1#O zFX)kfG?8iQd(^*XBZXFMrQnGzWUM(x#)hvcxbYkV{>E>(hI?=?o_Tn|PF4oWa+c7C z`+h2eB?B{*@0=dp{^K6KDao(!$@eLG;zlx59;Dz0&btJL%0sM7l#M!2mm`F}pig{1 zJ)U4r9yoB|XTC#P1h#-dsZ-vg;PRaUBi#n6F4T#-9T5%scHfxHOP4NP4hPL1`r+4B zs-M4u!pb*_%<5#I4QLD6WDlW_=qulUk0Mwme8bh~yDP0!GIKK-%eD)Q>1v=&XdBvS z524RIAG)08&6_vy*s){R_{Q>d^~PPQn!AmR9-;5x0ne8%A$Yj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%Chd9oT}fyg+W40i1Wy?L$ZOR~@a_siThOMz)YRk* z!NbKK39U^-?j+QSx;@6r_B4Vy2}=f>AnggsI7%oJWuuP!(sb==!rpBJ>~P8fEFGK& zf @@ -272,7 +271,7 @@ android:layout_marginBottom="8dp" android:text="晾晒指数" android:textColor="@color/white" - android:textSize="15dp" + android:textSize="20dp" android:textStyle="bold" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" diff --git a/src/main/res/layout/fragment_mine.xml b/src/main/res/layout/fragment_mine.xml index f6a995c..e799450 100644 --- a/src/main/res/layout/fragment_mine.xml +++ b/src/main/res/layout/fragment_mine.xml @@ -13,6 +13,7 @@ android:layout_marginTop="-10dp" android:src="@drawable/test14" app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.0" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> @@ -512,16 +513,37 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" /> + +