blob: aa1a8c65d229477446a8fd5154038c8535d723bf [file] [log] [blame]
page.title=Samples
page.tags="preview", "samples", "android"
page.image=images/cards/card-n-samples_2x.png
@jd:body
<p>
Các mã mu sau được dành cho Android N. Để
ti xung mã mu cho Android Studio, hãy chn tùy chn trong menu <b>File &gt; Import
Samples</b>.
</p>
<p class="note">
<strong>Chú ý:</strong>Các d án có th ti xung này được thiết kế
để s dng vi Gradle và Android Studio.
</p>
<h3 id="mw">Dùng th đa ca sổ</h3>
<img src="{@docRoot}preview/images/sample-multiwindow.png" style="float: left; padding-right: 0.5em" height="250" width="156" />
<p>
Ví d này minh ha cách tn dng giao din người dùng
đa ca s vi ng dng ca bn.
</p>
<p>
<a href="https://github.com/googlesamples/android-MultiWindowPlayground">
Ti mã trên GitHub</a>
</p>
<div style="clear: both;"></div>
<h3 id="an">Thông báo đang Hot động</h3>
<img src="{@docRoot}preview/images/sample-activenotifications.png" style="float: left; padding-right: 0.5em" height="250" width="141" />
<p>
Đây là ví d đã có sn, minh ha mt dch v đơn gin để gi
thông báo bng cách s dng NotificationCompat. Mi cuc hi thoi chưa đọc t mt người dùng
s được gi dưới dng mt thông báo riêng.
</p>
<p>
Ví d này đã được cp nht để tn dng các tính năng thông báo mi
có trong Android N.
</p>
<p>
<a href="https://github.com/googlesamples/android-ActiveNotifications">
Ti mã trên GitHub</a>
</p>
<div style="clear: both;"></div>
<h3 id="ms">Dch v Nhn tin</h3>
<img src="{@docRoot}preview/images/sample-messagingservice.png" style="float: left; padding-right: 0.5em" height="250" width="150" />
<p>
Đây là mt ví d đã có sn, minh ha cách s dng
NotificationManager để cho biết có bao nhiêu thông báo mt ng dng hin
đang hin thị.
</p>
<p>
Ví d này đã được cp nht để tn dng các tính năng thông báo mi
có trong Android N.
</p>
<p>
<a href="https://github.com/googlesamples/android-MessagingService">
Ti mã trên GitHub</a>
</p>
<div style="clear: both;"></div>
<h3 id="fbe">Khi động Trc tiếp</h3>
<img src="{@docRoot}preview/images/sample-directboot.png" style="float: left; padding-right: 0.5em" height="250" width="141" />
<p>
Ví d này minh ha cách lưu tr và truy cp d liu trên b lưu tr
mã hóa thiết bị, luôn kh dng khi thiết b được khi động.
</p>
<p>
<a href="https://github.com/googlesamples/android-DirectBoot">
Ti mã trên GitHub</a>
</p>
<div style="clear: both;"></div>
<h3 id="sda">Truy cp Thư mc theo Phm vi</h3>
<img src="{@docRoot}preview/images/sample-scopeddirectoryaccess.png" style="float: left; padding-right: 0.5em" height="250" width="141" />
<p>
Ví d này minh ha cách đọc và ghi d liu t các thư mc
c th trong khi cn ít quyn hơn.
</p>
<p>
<a href="https://github.com/googlesamples/android-ScopedDirectoryAccess">
Ti mã trên GitHub</a>
</p>