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 ());