Commit 05b88d37568984315c0bfeaed9be7dafc858a9c7

Authored by 袁思汶
1 parent 860d36c4

third

OutSide_Share/build.gradle
... ... @@ -19,8 +19,8 @@ android {
19 19  
20 20 buildTypes {
21 21 debug {
22   - resValue("string", "outshare", "网家家好友Debug")
23   - resValue("string", "outsharecircle", "网家家生活圈Debug")
  22 + resValue("string", "outshare", "外分好友测试")
  23 + resValue("string", "outsharecircle", "外分测试生活圈")
24 24 }
25 25 release {
26 26 resValue("string", "outshare", "网家家好友")
... ...
app/src/main/AndroidManifest.xml
... ... @@ -19,6 +19,34 @@
19 19 </intent-filter>
20 20 </activity>
21 21  
  22 + <activity android:name=".momentActivity"
  23 + android:configChanges="keyboardHidden|screenSize|orientation"
  24 + android:icon="@drawable/shenghuoquan"
  25 + android:label="@string/outsharecircle"
  26 + android:launchMode="singleTask"
  27 + >
  28 + <!-- 系统分享 单个文件 -->
  29 + <intent-filter>
  30 + <action android:name="android.intent.action.SEND" />
  31 +
  32 + <category android:name="android.intent.category.DEFAULT" />
  33 + <!-- 图片类型 -->
  34 + <data android:mimeType="image/*" />
  35 + <!-- 视频类型 -->
  36 + <data android:mimeType="video/*" />
  37 + <!-- 文字类型 -->
  38 + <data android:mimeType="text/plain" />
  39 + </intent-filter>
  40 + <!-- 系统分享 多个文件 -->
  41 + <intent-filter>
  42 + <action android:name="android.intent.action.SEND_MULTIPLE" />
  43 +
  44 + <category android:name="android.intent.category.DEFAULT" />
  45 + <!-- 图片类型 -->
  46 + <data android:mimeType="image/*" />
  47 + </intent-filter>
  48 +
  49 + </activity>
22 50 </application>
23 51  
24 52 </manifest>
25 53 \ No newline at end of file
... ...
app/src/main/java/com/cnlive/out_shared/MainActivity.java
... ... @@ -20,13 +20,5 @@ public class MainActivity extends AppCompatActivity {
20 20 }
21 21  
22 22 public void onClick(View view) {
23   - Bundle mBundle = new Bundle();
24   - mBundle.putString("android.intent.extra.TEXT", "今天星期一");
25   - ARouter.getInstance().build("/out/ShareMomentActivity")
26   - .withString("type", "text/")
27   - .withString("action", Intent.ACTION_SEND)
28   - .withBundle("bundle", mBundle)
29   - .withStringArrayList("mutil",new ArrayList<>())
30   - .navigation(this);
31 23 }
32 24 }
... ...
app/src/main/java/com/cnlive/out_shared/momentActivity.java 0 → 100644
  1 +package com.cnlive.out_shared;
  2 +
  3 +import androidx.appcompat.app.AppCompatActivity;
  4 +
  5 +import android.content.Intent;
  6 +import android.os.Bundle;
  7 +
  8 +import com.alibaba.android.arouter.launcher.ARouter;
  9 +
  10 +import java.util.ArrayList;
  11 +
  12 +public class momentActivity extends AppCompatActivity {
  13 +
  14 + private String type;
  15 + private Bundle extras;
  16 + private String action;
  17 +
  18 +
  19 + @Override
  20 + protected void onCreate(Bundle savedInstanceState) {
  21 + super.onCreate(savedInstanceState);
  22 + setContentView(R.layout.activity_moment);
  23 + Intent intent = getIntent();
  24 + type = intent.getType();
  25 + extras = intent.getExtras();
  26 + action = intent.getAction();
  27 + ARouter.getInstance().build("/out/ShareMomentActivity")
  28 + .withString("type", type)
  29 + .withString("action", action)
  30 + .withBundle("bundle", extras)
  31 + .withStringArrayList("mutil",new ArrayList<>())
  32 + .navigation(this);
  33 + }
  34 +}
0 35 \ No newline at end of file
... ...
app/src/main/res/layout/activity_moment.xml 0 → 100644
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3 + xmlns:app="http://schemas.android.com/apk/res-auto"
  4 + xmlns:tools="http://schemas.android.com/tools"
  5 + android:layout_width="match_parent"
  6 + android:layout_height="match_parent"
  7 + tools:context=".momentActivity">
  8 +
  9 +
  10 + <TextView
  11 + android:layout_width="wrap_content"
  12 + android:layout_height="wrap_content"
  13 + android:text="外分生活圈、好友页面"
  14 + android:layout_centerInParent="true"
  15 + android:textSize="25sp"
  16 + />
  17 +
  18 +</RelativeLayout>
0 19 \ No newline at end of file
... ...
config.gradle
... ... @@ -25,6 +25,6 @@ ext {
25 25 //Lib库前缀
26 26 packeg : "com.cnlive.outside_share",
27 27 //Lib库名称
28   - name : "out"
  28 + name : "outside_share"
29 29 ]
30 30 }
31 31 \ No newline at end of file
... ...