Android中浏览器或者应用通过scheme唤起目标应用,打开目标页面的实现,及多次唤起时目标应用的拦截页面未执行问题

 本文模拟的是appA唤起appB,打开指定的BActivity页面的情况,两个应用的页面结构如下图所示:

浏览器或者其它应用,通过scheme配置唤起目标应用,需要约定的uri,如示例代码中的

String uri = "appb://com.windfallsheng.myapplicationb/sign?type=1&targetPage=BActivity&userName=windfallsheng";

在appA中只需要根据

package com.windfallsheng.myapplicationa;

import androidx.appcompat.app.AppCompatActivity;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;

public class MainActivity extends AppCompatActivity {

    @SuppressLint("NewApi")
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    public void launchAPPB(View view) {
        String uri = "appb://com.windfallsheng.myapplicationb/sign?type=1&targetPage=BActivity&userName=windfallsheng";
        Intent intent = new Intent();
        intent.setData(Uri.parse(uri));
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        startActivity(intent);
    }
}
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#f2f2f2"
    tools:context=".MainActivity">

    <TextView
        android:id="@+id/textView"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:gravity="center"
        android:textSize="35sp"
        android:background="@drawable/selector_item_background"
        app:layout_constraintHorizontal_bias="0.5"
        app:layout_constraintVertical_bias="0.5"
        app:layout_constraintWidth_percent="0.7"
        app:layout_constraintHeight_percent="0.15"
        android:paddingRight="10dp"
        android:paddingLeft="10dp"
        android:text="唤起B应用"
        android:onClick="launchAPPB"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

在appB的拦截页面配置:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.windfallsheng.myapplicationb">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity
            android:name=".WelcomeActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <intent-filter>
                <!--接收外部跳转-->
                <action android:name="android.intent.action.VIEW" />
                <!--该页面可以被隐式调用-->
                <category android:name="android.intent.category.DEFAULT" />
                <!--应用可以通过浏览器启动-->
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="appb" />
            </intent-filter>
        </activity>
        <activity
            android:name=".MainActivity"
            android:launchMode="singleTask"></activity>
        <activity android:name=".BActivity"></activity>
        <activity android:name=".CActivity"></activity>
    </application>

</manifest>
package com.windfallsheng.myapplicationb;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.os.Handler;
import android.text.TextUtils;
import android.util.Log;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;

public class WelcomeActivity extends AppCompatActivity {

    CodeReqCountDownTimer codeReqCountDownTimer;
    String type;

    @Override
    protected void onNewIntent(Intent intent) {
        super.onNewIntent(intent);
        Log.d("appB", "WelcomeActivity#onNewIntent");
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_welcome);
        Uri data = getIntent().getData();
        Log.d("appB", "WelcomeActivity#onCreate#data=" + data);
        if (data != null) {
            String userName = data.getQueryParameter("userName");
            String targetPage = data.getQueryParameter("targetPage");
            type = data.getQueryParameter("type");
            Log.d("appB", "WelcomeActivity#onCreate#type=" + type + ", targetPage=" + targetPage + ", userName=" + userName);
        }
        TextView tv = findViewById(R.id.textView);
        codeReqCountDownTimer = new CodeReqCountDownTimer(tv, 4 * 1000, 1000);
        codeReqCountDownTimer.start();

    }

    /**
     * 时间倒计时
     */
    class CodeReqCountDownTimer extends CountDownTimer {

        private TextView tv;

        public CodeReqCountDownTimer(TextView textView, long millisInFuture, long countDownInterval) {
            super(millisInFuture, countDownInterval);
            this.tv = textView;
        }

        @Override
        public void onTick(long l) {
            String timeStr = l / 1000 + "s";
            tv.setText(timeStr);  //设置倒计时时间
        }

        @Override
        public void onFinish() {
            if (TextUtils.equals("1", type)) {
                tv.setText("即将进入B页面");
            } else {
                tv.setText("即将进入主页");
            }
            new Handler().postDelayed(new Runnable() {
                @SuppressLint("NewApi")
                @Override
                public void run() {
                    if (TextUtils.equals("1", type)) { // 经scheme唤起应用;
                        startActivity(new Intent(WelcomeActivity.this, BActivity.class));
                    } else {// 正常启动应用;
                        startActivity(new Intent(WelcomeActivity.this, MainActivity.class));
                    }
                    WelcomeActivity.this.finish();
                }
            }, 1000);
        }

    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        codeReqCountDownTimer.cancel();
        codeReqCountDownTimer = null;
    }
}

目前的配置是可以实现目标应用appB被唤起,但是有一个问题,如果appB是在被首次唤醒启动后再次唤起,或者appB是被桌面图标首先启动,则拦截界面不会启动;

 

       正常的业务需求应该是每次从浏览器唤起应用后,都会经过应用启动页,之后再跳转向目标分享页面,同时应用如果在后台运行,则不会重启应用,正如下面图中演示的情况;

appA首次唤起appB的情况,如下图: 

appA首次唤起appB后,再多次唤起的情况,如下图:

 要解决一开始的问题,实现这样的业务情况,需要在唤起的应用B中做处理:

将应用B的拦截页面的Activity启动模式改为 :

android:launchMode="singleTask"

其它的启动模式是无效的。

解决应用被三方唤起后,再通过桌面图标启动,会引起应用重启的问题的解决方法是在启动页加入如下的代码:

if (!this.isTaskRoot()) {
    Intent intent = getIntent();
    if (intent != null) {
        String action = intent.getAction();
        if (intent.hasCategory(Intent.CATEGORY_LAUNCHER) && Intent.ACTION_MAIN.equals(action)) {
            Log.d("appB", "WelcomeActivity#onCreate#finish");
            finish();
        }
    }
}

完整的代码示例如下:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.windfallsheng.myapplicationb">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity
            android:name=".WelcomeActivity"
            android:launchMode="singleTask">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <intent-filter>
                <!--接收外部跳转-->
                <action android:name="android.intent.action.VIEW" />
                <!--表示该页面可以被隐式调用,必须加上该项-->
                <category android:name="android.intent.category.DEFAULT" />
                <!--如果希望该应用可以通过浏览器的连接启动,则添加该项-->
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="appb" />
            </intent-filter>
        </activity>
        <activity
            android:name=".MainActivity"
            android:launchMode="singleTask"></activity>
        <activity android:name=".BActivity"></activity>
        <activity android:name=".CActivity"></activity>
    </application>

</manifest>
package com.windfallsheng.myapplicationb;

import android.annotation.SuppressLint;
import android.app.ActivityManager;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.os.Handler;
import android.text.TextUtils;
import android.util.Log;
import android.widget.TextView;
import java.util.List;
import androidx.appcompat.app.AppCompatActivity;

public class WelcomeActivity extends AppCompatActivity {

    CodeReqCountDownTimer codeReqCountDownTimer;
    String type;

    @Override
    protected void onNewIntent(Intent intent) {
        super.onNewIntent(intent);
        Log.d("appB", "WelcomeActivity#onNewIntent");
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_welcome);
        if (!this.isTaskRoot()) {
            Intent intent = getIntent();
            if (intent != null) {
                String action = intent.getAction();
                if (intent.hasCategory(Intent.CATEGORY_LAUNCHER) && Intent.ACTION_MAIN.equals(action)) {
                    Log.d("appB", "WelcomeActivity#onCreate#finish");
                    finish();
                }
            }
        }
        Uri data = getIntent().getData();
        Log.d("appB", "WelcomeActivity#onCreate#data=" + data);
        if (data != null) {
            String userName = data.getQueryParameter("userName");
            String targetPage = data.getQueryParameter("targetPage");
            type = data.getQueryParameter("type");
            Log.d("appB", "WelcomeActivity#onCreate#type=" + type + ", targetPage=" + targetPage+", userName=" + userName);
        }
        TextView tv = findViewById(R.id.textView);
        codeReqCountDownTimer = new CodeReqCountDownTimer(tv, 4 * 1000, 1000);
        codeReqCountDownTimer.start();

    }

    /**
     * 时间倒计时
     */
    class CodeReqCountDownTimer extends CountDownTimer {

        private TextView tv;

        public CodeReqCountDownTimer(TextView textView, long millisInFuture, long countDownInterval) {
            super(millisInFuture, countDownInterval);
            this.tv = textView;
        }

        @Override
        public void onTick(long l) {
            String timeStr = l / 1000 + "s";
            tv.setText(timeStr);  //设置倒计时时间
        }

        @Override
        public void onFinish() {
            if (TextUtils.equals("1", type)) {
                tv.setText("即将进入B页面");
            } else {
                tv.setText("即将进入主页");
            }
            new Handler().postDelayed(new Runnable() {
                @SuppressLint("NewApi")
                @Override
                public void run() {
                    if (TextUtils.equals("1", type)) { // 经scheme唤起应用;
                        ActivityManager activityManager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
                        //获取activity任务栈,获取任务栈列表
                        List<ActivityManager.AppTask> tasks = activityManager.getAppTasks();
                        tasks.stream().forEach(task -> {
                            ActivityManager.RecentTaskInfo info = task.getTaskInfo();
//            int taskId = info.taskId;
                            int activityCount = info.numActivities; //栈内Activity数量
                            String topActivity = info.topActivity.getClassName(); //栈顶Activity
                            String baseActivity = info.baseActivity.getClassName(); //栈底Activity
                            Log.d("appB", "WelcomeActivity#activityCount=" + activityCount + ", topActivity=" + topActivity + ", baseActivity=" + baseActivity);
                        });
                        if (tasks.size() == 1) {
                            int activityCount = tasks.get(0).getTaskInfo().numActivities;
                            Log.d("appB", "WelcomeActivity#activityCount=" + activityCount);
                            if (activityCount > 1) {// 目标应用已经被唤起的情况;
                                startActivity(new Intent(WelcomeActivity.this, BActivity.class));
                            } else { // 目标应用首次被唤起的情况;
                                Intent mainIntent = new Intent(WelcomeActivity.this, MainActivity.class);
                                Intent bIntent = new Intent(WelcomeActivity.this, BActivity.class);
                                //注意此处的顺序
                                startActivities(new Intent[]{mainIntent, bIntent});
                            }
                        } else {// 目标应用已经被唤起的情况;
                            startActivity(new Intent(WelcomeActivity.this, BActivity.class));
                        }
                    } else {// 正常启动应用;
                        startActivity(new Intent(WelcomeActivity.this, MainActivity.class));
                    }
                    WelcomeActivity.this.finish();
                }
            }, 1000);
        }

    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        codeReqCountDownTimer.cancel();
        codeReqCountDownTimer = null;
    }
}

启动页中的:
startActivities(new Intent[]{mainIntent, bIntent});

这个方法是为了解决浏览器首次唤起应用后,直接打开了目标分享页面,用户返回时没有返回到B应用的主页问题。

package com.windfallsheng.myapplicationb;

import androidx.appcompat.app.AppCompatActivity;

import android.annotation.SuppressLint;
import android.app.ActivityManager;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

import java.util.List;

public class MainActivity extends AppCompatActivity {

    @SuppressLint("NewApi")
    @Override
    protected void onNewIntent(Intent intent) {
        super.onNewIntent(intent);
        Log.d("appB", "MainActivity#onNewIntent");
        // 获取activity任务栈
        ActivityManager activityManager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
        //获取任务栈列表
        List<ActivityManager.AppTask> tasks = activityManager.getAppTasks();
        tasks.stream().forEach(task -> {
            ActivityManager.RecentTaskInfo info = task.getTaskInfo();
//            int taskId = info.taskId;
            int activityCount = info.numActivities; //栈内Activity数量
            String topActivity = info.topActivity.getClassName(); //栈顶Activity
            String baseActivity = info.baseActivity.getClassName(); //栈底Activity
            Log.d("appB", "MainActivity#onNewIntent#activityCount=" + activityCount + ", topActivity=" + topActivity + ", baseActivity=" + baseActivity);
        });
    }

    @SuppressLint("NewApi")
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Log.d("appB", "MainActivity#onCreate");
        // 获取activity任务栈
        ActivityManager activityManager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
        //获取任务栈列表
        List<ActivityManager.AppTask> tasks = activityManager.getAppTasks();
        tasks.stream().forEach(task -> {
            ActivityManager.RecentTaskInfo info = task.getTaskInfo();
//            int taskId = info.taskId;
            int activityCount = info.numActivities; //栈内Activity数量
            String topActivity = info.topActivity.getClassName(); //栈顶Activity
            String baseActivity = info.baseActivity.getClassName(); //栈底Activity
            Log.d("appB", "MainActivity#onCreate#activityCount=" + activityCount + ", topActivity=" + topActivity + ", baseActivity=" + baseActivity);
        });
    }

    public void goToPageB(View view) {
        startActivity(new Intent(this, BActivity.class));
    }
}
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#f2f2f2"
    tools:context=".MainActivity">

    <TextView
        android:id="@+id/textView"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:background="@drawable/selector_item_background"
        android:gravity="center"
        android:onClick="goToPageB"
        android:paddingLeft="10dp"
        android:paddingRight="10dp"
        android:text="打开B页面"
        android:textSize="35sp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintHeight_percent="0.15"
        app:layout_constraintHorizontal_bias="0.5"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.5"
        app:layout_constraintWidth_percent="0.7" />

    <TextView
        android:id="@+id/textView2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="62dp"
        android:text="Main_Activity"
        android:textSize="30sp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

 

package com.windfallsheng.myapplicationb;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;

public class BActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_b);
        Log.d("appB", "BActivity#onCreate");
    }

    public void goToPageC(View view) {
        startActivity(new Intent(this, CActivity.class));
    }
}
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#f2f2f2"
    tools:context=".BActivity">

    <TextView
        android:id="@+id/textView"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:background="@drawable/selector_item_background"
        app:layout_constraintHorizontal_bias="0.5"
        app:layout_constraintVertical_bias="0.5"
        app:layout_constraintWidth_percent="0.7"
        app:layout_constraintHeight_percent="0.15"
        android:paddingRight="10dp"
        android:paddingLeft="10dp"
        android:onClick="goToPageC"
        android:gravity="center"
        android:text="打开C页面"
        android:textSize="35sp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <TextView
        android:id="@+id/textView2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="62dp"
        android:text="B_Activity"
        android:textSize="30sp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

 

package com.windfallsheng.myapplicationb;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;

public class CActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_c);
        Log.d("appB", "CActivity#onCreate");
    }

    public void goToPageMain(View view) {
        startActivity(new Intent(this, MainActivity.class));
    }

    public void goToPageB(View view) {
        startActivity(new Intent(this, BActivity.class));
    }

    public void goToPageWelcome(View view) {
        startActivity(new Intent(this, WelcomeActivity.class));
    }
}
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#f2f2f2"
    tools:context=".CActivity">

    <TextView
        android:id="@+id/textView"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginBottom="36dp"
        android:background="@drawable/selector_item_background"
        android:gravity="center"
        android:onClick="goToPageMain"
        android:paddingLeft="10dp"
        android:paddingRight="10dp"
        android:text="打开Main页面"
        android:textSize="35sp"
        app:layout_constraintBottom_toTopOf="@+id/textView3"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHeight_percent="0.15"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/textView2"
        app:layout_constraintWidth_percent="0.7" />

    <TextView
        android:id="@+id/textView3"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginBottom="37dp"
        android:background="@drawable/selector_item_background"
        android:gravity="center"
        android:onClick="goToPageB"
        android:paddingLeft="10dp"
        android:paddingRight="10dp"
        android:text="打开B页面"
        android:textSize="35sp"
        app:layout_constraintBottom_toTopOf="@+id/textView4"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHeight_percent="0.15"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/textView"
        app:layout_constraintWidth_percent="0.7" />

    <TextView
        android:id="@+id/textView4"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginBottom="59dp"
        android:background="@drawable/selector_item_background"
        android:gravity="center"
        android:onClick="goToPageWelcome"
        android:paddingLeft="10dp"
        android:paddingRight="10dp"
        android:text="打开Welcome页面"
        android:textSize="35sp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHeight_percent="0.15"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/textView3"
        app:layout_constraintWidth_percent="0.7" />

    <TextView
        android:id="@+id/textView2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="62dp"
        android:layout_marginBottom="58dp"
        android:paddingLeft="10dp"
        android:paddingRight="10dp"
        android:text="C_Activity"
        android:textSize="30sp"
        app:layout_constraintBottom_toTopOf="@+id/textView"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHeight_percent="0.15"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintWidth_percent="0.7" />

</androidx.constraintlayout.widget.ConstraintLayout>
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">

    <item android:drawable="@drawable/shape_checked" android:state_checked="true"/>
    <item android:drawable="@drawable/shape_checked" android:state_selected="true"/>
    <item android:drawable="@drawable/shape_checked" android:state_focused="true"/>
    <item android:drawable="@drawable/shape_normal" />

</selector>

 

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <corners android:radius="10dp"></corners>
    <solid android:color="#F6F6F6" />
</shape>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <corners android:radius="10dp"></corners>
    <solid android:color="#FFF" />
</shape>

 

 

由于作者水平有限,语言描述及代码实现中难免有纰漏,望各位看官多提宝贵意见!

Hello , World !

感谢所有!

 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

windfallsheng

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值