From 992051b15d6e09f1dddd10beffefe4d0b27b9943 Mon Sep 17 00:00:00 2001 From: CharleyChase <1223215091@qq.com> Date: Sat, 2 Jun 2018 12:13:42 +0800 Subject: [PATCH] =?UTF-8?q?#6=20#1510=20=E7=AC=AC=E5=85=AD=E6=AC=A1?= =?UTF-8?q?=E5=AE=9E=E9=AA=8C=E5=8F=8A=E6=8A=A5=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- com1614080901245/61.jpg | Bin 0 -> 6654 bytes com1614080901245/62.jpg | Bin 0 -> 10876 bytes com1614080901245/63.jpg | Bin 0 -> 8221 bytes com1614080901245/main/AndroidManifest.xml | 20 ++- .../androidlabs/com1614080901245/change.java | 137 ++++++++++++++++++ .../androidlabs/com1614080901245/view.java | 81 +++++++++++ .../main/res/layout/activity_change.xml | 49 +++++++ .../main/res/layout/activity_view.xml | 51 +++++++ .../layout/com1614080901245activity_main1.xml | 27 ++++ .../layout/com1614080901245activity_main2.xml | 38 +++++ com1614080901245/report6.md | 34 +++++ 11 files changed, 434 insertions(+), 3 deletions(-) create mode 100644 com1614080901245/61.jpg create mode 100644 com1614080901245/62.jpg create mode 100644 com1614080901245/63.jpg create mode 100644 com1614080901245/main/java/edu/hzuapps/androidlabs/com1614080901245/change.java create mode 100644 com1614080901245/main/java/edu/hzuapps/androidlabs/com1614080901245/view.java create mode 100644 com1614080901245/main/res/layout/activity_change.xml create mode 100644 com1614080901245/main/res/layout/activity_view.xml create mode 100644 com1614080901245/main/res/layout/com1614080901245activity_main1.xml create mode 100644 com1614080901245/main/res/layout/com1614080901245activity_main2.xml create mode 100644 com1614080901245/report6.md diff --git a/com1614080901245/61.jpg b/com1614080901245/61.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d5ac7f520a9be90c40819a4ee85d8d4e06f2cbcb GIT binary patch literal 6654 zcmeHLc{r5s`hUk@#!j~E`@Rpdgi(@ILPA+Wqii7|A_f&@jY4EiB0`oyw#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#_fJJ9VNapAPj-DV?xetbBB*304h_=B}O(TU7*0{=TZTL@joItzcCTTTl)6VuuGyZC4Ufu z8y?;=QkgR&$KAO(CtjJcsXiAo6~~wxB1k~BUAa28G~7G!wX=6j7dsOlP{X4Udaz~tmCH!#2WKU}^^U;hF|R?5Wy literal 0 HcmV?d00001 diff --git a/com1614080901245/62.jpg b/com1614080901245/62.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d894bed7c81e97d893aa0c4cd1c3322aa2f07743 GIT binary patch literal 10876 zcmdUV2Q=K@x9^uBqJ$8=M~O~E?<7GGgy=O&FnaGYQnb+tqIaSU(K|u(GJ5ZVD5JM1 zGjDR=z4!fo_pW=_d-wj=dhdN_?e(3r&R+YR&pzkuy}x@O)C_6`xUa0BqyS)GU;y6e zAAp(%o&k67+`+kneHRA@2N(A)9s%h+0(^V|Dv}38q;%8_^mNp;w2UmgY>Z6Y%(S%Z zA{^Y0`2__98Q8?6M4w3V3J5;=BLo8%7ncB^fb!lw$|nzLA3pg%eo)^5;=35mz!C_9 z3BV-A01;!LegF&rfPsyk?Vkz%^Mip2!ot3Ta~Bs6AI(s6AHc)_fiST^*w|QDXzl=X zKY&GyP4bXm?#=@ZGaM!t(kJg@v+puLt!O9H96e+aFn9fci$_jDNkz^2h>e|tQ&31) zL{v=t*>iaX#TQD-ueG#wboKNNEG*wzS=)eZ-P}Dqy}W&VKYj`d4hao|#>Ib5NKE>Y zoRX89mtRo$wWzqVs=B7OuD+qMqw_~scTaC$|JeA%=36V|^X`!~3V(YP?Nus~Qie{f-7dZ7tKjD`J>{|5HTPF ztg@GFA<0CbkgbIBTNFSF=_oi-zd5c!0c~rosk>T`WZJa2J?9BsHxz)E+9h++KaE5I zP?^=&-i1gX0~D})q&W2z1w0{C@)Wh@YCr)&s%x3QH|$UVq>JIOsQEPtkc2@FE_46L z!eMEm6(U2d&&HDfWN{Bu#G-p{F!7CoYR!~SNVSfAzh>RJH}O|qEo{d{?`Hij=>=J zrdN!0X7%fT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zotoTknL0PPEi0&1Fvu<+77Fb z^yqUuEOSV1ie!qu)JFkCkYCmem-u|>LVzi!Dpu{dq`;3OM@-X-re5CN$zUavbuUiMJJTLlnl+UTX8JRL82RDn0kQ+#O#+i%Xz zk9%Wr4(8vCKS`F#+Zr)%&VkMBBwd+(nORbI*itZ0>UV9Lh`8@Ep{@LPn*eKyJ7)m4 z@8t^)SdFRNW{r@@jESUYAI%TU)=9&n&ib?$C3GjMeNv1CUNu(522;T{ZTjdhB}eXD zK<^EBdvzWZ|IVD-c(j0CEIo(HRwe(F>A`NuC&HOB&HVa?jN{dP-oiMaJTV_u*TJ5J z3|0BR*=IU7^fvy@PE9Yfh2S!6SNzd-m}Ub3i`T`T&osjY2IuRXhuyllLZJGL39P{i sQO_SHjI0#V-Ia>8$t1BW%{Mfd2xZ2iDcm~CB4|C;kOxT71VPRI4=G|4(f|Me literal 0 HcmV?d00001 diff --git a/com1614080901245/63.jpg b/com1614080901245/63.jpg new file mode 100644 index 0000000000000000000000000000000000000000..cdb7932c24947cd53e753eb1091fed8db17ace0e GIT binary patch literal 8221 zcmb_g1z42pw*H3!h7>^t7-<1T!XQ+-BnCu6N?JjO5Qa`^=>`Eo1*99vp#RAohdT2tWb`VJ8nv4u}EM?Af)Sub>uXhtu|s zS60F(E^;7C;HwASd!{0Ff`DJp>u)`-?sjeoO2|%6=9G*hzQoD5j8CISx04A>escYa z^Ph5jX~e=5nP_EZ@DmKQ7^#y~{RqmRxu)#>!x{UNx#&+5kKZrTc;AX#4cDGMzMkx4 zq_ZFHia?N*nBLmpi{uKA_y&_5L|%a{R8)(|s`u_3wbSZkgpF)UcF_pmU~KOlv(~8L zEie;>_NCRm4;z8&vk+eJ*2MK03UgP{Wz@)p3c;&avkQgwN(C7MMPa==b(C7#rYda3 z6PM;6ZUi-zFDCj_9-AjtZp6%&ry~)I_4kH^l58kpk78v&7{DtW*bLV$D{v~*9NZ12 zS6vX2TjMH!Rg)&YCjS~z03mn_&O zN8I?JSgFH((`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D|`FOL)IV%h(AH&Zs_Bv9L)gG+p-)7U!(!;M5HB@!HM+%hwqQ0`m7Sc zU+~W#HXU()_bAJ>Sbt=K=2gJj^H>eZp+$4+ZH9i4g}QVP!||mAjZl%Kk@+CFaRRz? WMq~(hrt3DVJO4XDEJ+Y%_`d+MG>T>b literal 0 HcmV?d00001 diff --git a/com1614080901245/main/AndroidManifest.xml b/com1614080901245/main/AndroidManifest.xml index 8800915f3..e791928d3 100644 --- a/com1614080901245/main/AndroidManifest.xml +++ b/com1614080901245/main/AndroidManifest.xml @@ -17,9 +17,23 @@ + android:name=".com1614080901245Activity2" + android:label="@string/app_name" + android:theme="@style/AppTheme.NoActionBar" /> + + + + + + + + \ No newline at end of file diff --git a/com1614080901245/main/java/edu/hzuapps/androidlabs/com1614080901245/change.java b/com1614080901245/main/java/edu/hzuapps/androidlabs/com1614080901245/change.java new file mode 100644 index 000000000..ccb7ce3e5 --- /dev/null +++ b/com1614080901245/main/java/edu/hzuapps/androidlabs/com1614080901245/change.java @@ -0,0 +1,137 @@ +package edu.hzuapps.androidlabs.com1614080901245; + +import android.app.Activity; +import android.content.Intent; +import android.os.Bundle; +import android.support.design.widget.FloatingActionButton; +import android.support.design.widget.Snackbar; +import android.support.v7.app.AppCompatActivity; +import android.support.v7.widget.Toolbar; +import android.view.View; +import android.widget.Button; +import android.support.v7.app.AppCompatActivity; +import android.os.Bundle; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import android.app.Activity; +import android.app.ListActivity; +import android.content.Intent; +import android.os.Bundle; +import android.util.Log; +import android.view.View; +import android.widget.Button; +import android.widget.ListView; +import android.widget.SimpleAdapter; +import android.widget.Toast; +import android.support.v7.app.AppCompatActivity; +import android.os.Bundle; +import android.view.View; +import android.widget.Button; +import android.app.Activity; +import android.content.Intent; +import android.os.Environment; +import android.util.Log; +import android.widget.Button; +import android.widget.EditText; +import android.widget.TextView; +import android.widget.Toast; +import java.io.BufferedInputStream; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.IOException; + +public class change extends AppCompatActivity { + + public static final String DIRECTORY = "demo"; + public static final String FILENAME = "file_demo.txt"; + public static final String TAG = change.class.getSimpleName(); + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_change); + final Activity thisActivity = this; + ((Button) findViewById(R.id.btn_2)).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + String text = ((EditText) findViewById(R.id.edit_text)).getText().toString(); + saveTextIntoInternalStorage(text); + } + }); + + } + // 将文字保存到内部存储 + private void saveTextIntoInternalStorage(String text) { + // 获取内部存储目录 + File dir = this.getFilesDir(); + //File dir = getCacheDir(); + if (dir.isDirectory()) { +// dir.mkdir(); +// dir.mkdirs(); + } + if (dir.isFile()) { + // D:/Abc.txt , -> D:/Abc1.txt ->D:/abc.txt + } + File file = new File(dir, FILENAME); +// try { +// File = File.createTempFile(FILENAME, null, dir); +// } catch (IOException e) { +// e.printStackTrace(); +// } + if (file.exists()) { // 判断文件是否存在 + Log.i(TAG, file.getAbsolutePath()); + Log.i(TAG, file.length() + ""); // bytes*1024=kb *1024 MB + Log.i(TAG, file.isFile() + ""); + file.canRead(); + file.canWrite(); + file.canExecute(); + file.getFreeSpace(); + file.getTotalSpace(); + } + FileOutputStream fos = null; // 字节流 | char | cn : gbk 2 bytes, utf8 3 bytes + try { // 使用API打开输出流 + fos = openFileOutput(FILENAME, MODE_PRIVATE); + //FileOutputStream fos = new FileOutputStream(file); + fos.write(text.getBytes()); // 写入内容 + fos.close(); // 关闭流 + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } finally { + try { + fos.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + FileReader reader = null; // char + try { + reader = new FileReader(file.getAbsoluteFile()); + BufferedReader bReader = new BufferedReader(reader); + String line = bReader.readLine(); + Log.i(TAG, "从文件读取的内容: " + line); + bReader.close(); + reader.close(); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + // 显示结果 + showResult(file.getAbsolutePath()); + // 删除文件 + // file.delete(); + // deleteFile(FILENAME); + } + private void showResult(String result) { + ((TextView) findViewById(R.id.view1)) + .setText(result.toCharArray(), 0, result.length()); + } + +} \ No newline at end of file diff --git a/com1614080901245/main/java/edu/hzuapps/androidlabs/com1614080901245/view.java b/com1614080901245/main/java/edu/hzuapps/androidlabs/com1614080901245/view.java new file mode 100644 index 000000000..b6fed00e0 --- /dev/null +++ b/com1614080901245/main/java/edu/hzuapps/androidlabs/com1614080901245/view.java @@ -0,0 +1,81 @@ +package edu.hzuapps.androidlabs.com1614080901245; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.MalformedURLException; +import java.net.URL; +import android.app.Activity; +import android.content.Intent; +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; +import android.os.Bundle; +import android.os.Environment; +import android.os.Handler; +import android.os.Message; +import android.view.View; +import android.view.View.OnClickListener; +import android.widget.Button; +import android.widget.EditText; +import android.widget.ImageView; + +public class view extends Activity { + private EditText editText; + private Button button; + private ImageView imageView; + private Bitmap bitmap; + //手柄更新的作用 + Handler handler=new Handler(){ + public void handleMessage(Message msg) { + if(msg.what==111){ + imageView.setImageBitmap(bitmap); + } + }; + }; + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_view); + //初始化组件 + editText=(EditText) findViewById(R.id.view2); + button=(Button) findViewById(R.id.btn_3); + imageView=(ImageView) findViewById(R.id.imview); + //给下载按钮添加一个监听 + button.setOnClickListener(new OnClickListener() { + public void onClick(View arg0) { + new Thread(t).start(); + } + }); + } + //为了下载图片资源,开辟一个新的子线程 + Thread t=new Thread(){ + public void run() { + //下载图片的路径 + String iPath=editText.getText().toString(); + try { + //对资源链接 + URL url=new URL(iPath); + //打开输入流 + InputStream inputStream=url.openStream(); + //对网上资源进行下载转换位图图片 + bitmap=BitmapFactory.decodeStream(inputStream); + handler.sendEmptyMessage(111); + inputStream.close(); + //再一次打开 + inputStream=url.openStream(); + File file=new File(Environment.getExternalStorageDirectory()+"/DCIM/"); + FileOutputStream fileOutputStream=new FileOutputStream(file); + int hasRead=0; + while((hasRead=inputStream.read())!=-1){ + fileOutputStream.write(hasRead); + } + fileOutputStream.close(); + inputStream.close(); + } catch (MalformedURLException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + }; + }; +} \ No newline at end of file diff --git a/com1614080901245/main/res/layout/activity_change.xml b/com1614080901245/main/res/layout/activity_change.xml new file mode 100644 index 000000000..074f8c63c --- /dev/null +++ b/com1614080901245/main/res/layout/activity_change.xml @@ -0,0 +1,49 @@ + + + + + + +