MaterialAbout
0.3.0
这是一个Android项目。作为移动开发人员,您可以使用此库在应用程序中显示有关屏幕的材料。它的构建是为了让您在向用户介绍您时更加轻松,并且还可以为 Material Android 应用程序创建关于屏幕模式。它非常简单且动态,请检查一下。
该库具有比此处显示的更多的自定义和功能。请检查示例应用程序并随时帮助处理拉取请求。您可以查看该项目中的示例应用程序。
该库需要将minSdkVersion
设置为14
或更高,就像官方支持库一样。
allprojects {
repositories {
.. .
maven { url " https://jitpack.io " }
}
}
dependencies {
compile ' com.github.jrvansuita:MaterialAbout:+ '
}
使用 AboutBuilder 创建一个 AboutView 实例。
@ Override
protected void onCreate ( Bundle savedInstanceState ) {
super . onCreate ( savedInstanceState );
AboutView view = AboutBuilder . with ( this )
. setPhoto ( R . mipmap . profile_picture )
. setCover ( R . mipmap . profile_cover )
. setName ( "Your Full Name" )
. setSubTitle ( "Mobile Developer" )
. setBrief ( "I'm warmed of mobile technologies. Ideas maker, curious and nature lover." )
. setAppIcon ( R . mipmap . ic_launcher )
. setAppName ( R . string . app_name )
. addGooglePlayStoreLink ( "8002078663318221363" )
. addGitHubLink ( "user" )
. addFacebookLink ( "user" )
. addFiveStarsAction ()
. setVersionNameAsAppSubTitle ()
. addShareAction ( R . string . app_name )
. setWrapScrollView ( true )
. setLinksAnimated ( true )
. setShowAsCard ( true )
. build ();
addContentView ( view , layoutParams );
}
AboutBuilder aboutBuilder = AboutBuilder . with ( this );
List < Item > actions = aboutBuilder . getActions ();
List < Item > links = aboutBuilder . getActions ();
AboutView view = AboutBuilder . with ( this )
...
. build ();
View lastLinkView = view . findItem ( builder . getLastLink ());
View lastActionView = view . findItem ( builder . getLastAction ());