B2 中高級 3723 分類 收藏
開始影片後,點擊或框選字幕可以立即查詢單字
字庫載入中…
回報字幕錯誤
MALE SPEAKER: AppCompat gives you
a consistent base for your Android
app built on the principles of material design.
But material design is a lot more
than adding a toolbar and some accent colors.
For everything else, there's a design library.
The design library provides many of the high-level components
you'll need to build a great app that feels
at home with material design.
So what do you get?
A text input layout for adding floating labels and errors
to edit text.
Floating action button for the primary action
in your interface.
SnackBars for quick feedback messages
with an optional action.
Material design compliant tabs and navigation
view for building your Navigation Drawer menu items.
Plus a lot of work, specifically around motion and scrolling.
All this back through API7.
Text Input Layer wraps and edits text, providing always visible
hint text, and a convenient way of showing error
text via the set error method.
Floating Action Buttons are ideal for that primary action
in your UI.
The design library's Floating Action Button
sports both a default size as well as a mini size,
useful for when the Floating Action Button needs
to match with other elements.
Snackbars are a new way to provide lightweight feedback
to your users.
Unlike toast messages, SnackBars are an interactive part
of your UI, allowing you to add an optional action
or allow the user to swipe to dismiss the SnackBar.
This makes SnackBars very useful around potentially destructive
operations.
A Click Undo Action can save a lot of headache,
while providing a far better experience than confirmation
dialogs.
Tabs have always been a common pattern on Android,
both as top level navigation for your app,
and for grouping content within your app.
The design library's tab layout supports fixed tabs
where each views width is split equally between tabs, suitable
if you only have a few important tabs,
as well supporting scrollable tabs where you
have a large number of tabs.
We've made it easy to attach your tab layout to a ViewPager,
keeping your tabs and pages content in sync.
Just make sure your pager adapter overrides
Get Page Title.
And then call Set Up With ViewPager
to tie everything together.
An alternative to using tabs as your top-level navigation
is the Navigation Drawer-- a slide out
pane which offers navigation between different parts
of your app.
Navigation View gives you a perfectly styled drawer.
You just provide the header, and then you
can add navigation items programmatically
or via a Menu Resource File.
The simplest drawer menus will have a group of checkable menu
items, using the checkable behavior
equals single attribute.
This ensures that the checked items will appear highlighted
in the Navigation View.
Support for subheaders using subviews is also available.
That takes care of a lot of the visuals of material design.
What about the motion side of material design?
Coordinator motion is critical to a great experience.
That's why the design library is introducing CoordinatorLayout.
CoordinatorLayout is a new layout
that allows children to declare a behavior, giving them
extra controls around touch events
and the ability to build dependencies between views.
A great example of this is when you use CoordinatorLayout
with the floating action button, and then show a Snackbar.
The default behavior for these components
allow the floating action button to automatically move up
as the Snackbar animates onto the screen,
ensuring that components don't overlap,
without you writing any code at all.
A major focus for CoordinatorLayout
in this initial release is around
enabling your appbar to react to your main content scrolling.
By wrapping your toolbar and other views, such as Tab
Layout, in an appbar layout, you'll
gain access to the special control flags,
allowing you to annotate each component as something that
scrolls off the screen, stays pinned
to the top of the screen, or even returns immediately,
when you downward scroll, making implementing a quick return
pattern just a few lines of XML.
No custom synchronized scrolling code needed.
You can take things even further by using a collapsing toolbar
layout.
This allows an extended hide toolbar
to grow and shrink its title text size as it collapses.
Pin elements to the top of the collapsing toolbar,
parallax images, and even add a full bleed scrim color
once it becomes collapsed.
Again, just a few lines of XML, and that's all you'll need.
Getting started with the design library is easy.
It's just a single dependency to add.
With AppCompat as the base, and the components provided
by the design library on top of it,
there's no better time to get started building great material
design apps.
We've only touched on the features in the design library.
You're can learn even more about the design library in the blog
post and on the developer site.
I'm looking forward to your great material design apps.
提示:點選文章或是影片下面的字幕單字,可以直接快速翻譯喔!

載入中…

【軟體開發】工程師教你如何設計APP! (Android Design Support Library (100 Days of Google Dev))

3723 分類 收藏
magicchiureg 發佈於 2015 年 9 月 21 日
看更多推薦影片
  1. 1. 單字查詢

    在字幕上選取單字即可即時查詢單字喔!

  2. 2. 單句重複播放

    可重複聽取一句單句,加強聽力!

  3. 3. 使用快速鍵

    使用影片快速鍵,讓學習更有效率!

  4. 4. 關閉語言字幕

    進階版練習可關閉字幕純聽英文哦!

  5. 5. 內嵌播放器

    可以將英文字幕學習播放器內嵌到部落格等地方喔

  6. 6. 展開播放器

    可隱藏右方全文及字典欄位,觀看影片更舒適!

  1. 英文聽力測驗

    挑戰字幕英文聽力測驗!

  1. 點擊展開筆記本讓你看的更舒服

  1. UrbanDictionary 俚語字典整合查詢。一般字典查詢不到你滿意的解譯,不妨使用「俚語字典」,或許會讓你有滿意的答案喔