Commit 74c6608e authored by fallenstardust's avatar fallenstardust

add&test newbie guide

parent 1556c113
......@@ -8,12 +8,12 @@ android {
applicationId "cn.garymb.ygomobile"
minSdkVersion 21
targetSdkVersion 29
versionCode 371300201
versionCode 371300205
versionName "3.7.13"
flavorDimensions "versionCode"
vectorDrawables.useSupportLibrary = true
ndk {
abiFilters "armeabi-v7a","x86"
abiFilters "armeabi-v7a", "x86"
}
}
compileOptions {
......@@ -72,6 +72,7 @@ repositories {
flatDir {
dirs 'libs'
}
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'junit:junit:4.12'
......@@ -114,4 +115,6 @@ dependencies {
//http请求库
implementation 'com.squareup.okhttp3:okhttp:3.12.0'
implementation 'com.bm.photoview:library:1.4.1'
//引导页库
implementation 'com.github.huburt-Hu:NewbieGuide:v2.4.4'
}
......@@ -27,6 +27,8 @@ import androidx.annotation.Nullable;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager;
import com.app.hubert.guide.NewbieGuide;
import com.app.hubert.guide.model.GuidePage;
import com.google.android.material.navigation.NavigationView;
import com.nightonke.boommenu.BoomButtons.BoomButton;
import com.nightonke.boommenu.BoomButtons.TextOutsideCircleButton;
......@@ -149,6 +151,7 @@ public abstract class HomeActivity extends BaseActivity implements NavigationVie
//萌卡
StartMycard();
checkNotch();
showNewbieGuide();
}
@Override
......@@ -668,4 +671,15 @@ public abstract class HomeActivity extends BaseActivity implements NavigationVie
Toast.makeText(this, tips, Toast.LENGTH_LONG).show();
}
}
//https://www.jianshu.com/p/99649af3b191
public void showNewbieGuide() {
NewbieGuide.with(this)//with方法可以传入Activity或者Fragment,获取引导页的依附者
.setLabel("homeguide")
.addGuidePage(GuidePage.newInstance()
.setBackgroundColor(0x60000000)
.addHighLight(findViewById(R.id.menu))
.setLayoutRes(R.layout.activity_logo))
.alwaysShow(true)//总是显示,调试时可以打开
.show();
}
}
......@@ -71,6 +71,7 @@
</LinearLayout>
<LinearLayout
android:id="@+id/menu"
android:layout_width="75dp"
android:layout_height="match_parent"
android:layout_marginEnd="0dp"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment