Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit d36a372ae3a698441949313684f4e51be6dd4d79
Merge: 0595475 6ff59b9
Author: Aleks Haecky <[email protected]>
Date:   Mon Oct 30 18:31:27 2017 +0000

    Merge "Fix folder weirdness. Test apps and update to AS beta7."

commit 6ff59b9c18d08ce198c028c4a48ac2f559530912
Author: alekshaecky <[email protected]>
Date:   Mon Oct 30 10:44:58 2017 -0700

    Fix folder weirdness. Test apps and update to AS beta7.

    Change-Id: Icea1b663199c1561869f958d07defe65689e497d

commit 05954756e152d3f4a9951ed506724c6cd6cd63fa
Author: alekshaecky <[email protected]>
Date:   Thu Oct 26 18:23:04 2017 -0700

    added license text

    Change-Id: I8aa1157c48938fe4a13af242b06b75232f532fb1

commit ddb00e6e1b6ba98b209d8e7aebbad6283572a61a
Author: alekshaecky <[email protected]>
Date:   Tue Oct 24 12:02:13 2017 -0700

    Fixed CC License.

    Change-Id: Ica49488761eb9c8eea1f3f93f41b167d2defb026

commit fda784dc582091fa0201297f4b6a12ae81fda117
Author: Laura Lemay <[email protected]>
Date:   Thu Sep 28 15:52:23 2017 -0700

    Resync all final app edits

    Change-Id: I0864c3f40cf32e8866e7479d3cfceabf75e7de2d

commit c36ab5ee3664e25eb55e0e2f300ab94bf63162e8
Merge: 2596662 5ff9434
Author: Tony Bove <[email protected]>
Date:   Wed Sep 27 21:45:24 2017 +0000

    Merge "CustomEditText - Expert Review 3"

commit 2596662b2e78d884955fe52f28afec9a5d8c7a67
Merge: 56d5e90 d163714
Author: Tony Bove <[email protected]>
Date:   Wed Sep 27 21:45:14 2017 +0000

    Merge "FragmentCommunicate - Final2"

commit 56d5e901c73bbbc1f2712bd22d9627c2af060595
Merge: e556b4c 813f64e
Author: Tony Bove <[email protected]>
Date:   Wed Sep 27 21:44:58 2017 +0000

    Merge "FragmentExample2 -- Final"

commit e556b4cb258925f1e9c2a5e372fe192a69ce5983
Merge: a7f8764 4fe2cf6
Author: Tony Bove <[email protected]>
Date:   Wed Sep 27 21:44:41 2017 +0000

    Merge "FragmentExample1_challenge - Final"

commit a7f8764cc10717da5a815c6593a2e573e1477ebc
Merge: 1ad1b0c c180909
Author: Tony Bove <[email protected]>
Date:   Wed Sep 27 21:44:24 2017 +0000

    Merge "FragmentExample1 - Final"

commit 1ad1b0c8c592bbcfbc2cd42f7d043f581da08714
Merge: 9455c6e f20efbb
Author: Tony Bove <[email protected]>
Date:   Wed Sep 27 21:44:08 2017 +0000

    Merge "ScorekeepLocale - Expert Review 3"

commit 9455c6e2e6582244bcb988bffe103bcff699e418
Merge: 1508a77 e3b249d
Author: Tony Bove <[email protected]>
Date:   Wed Sep 27 21:43:57 2017 +0000

    Merge "LocaleRecyclerView - Expert Review 3"

commit f20efbbaa83f4701393103fa68865505ea5478a0
Author: Tony Bove <[email protected]>
Date:   Tue Jun 13 14:45:38 2017 -0700

    ScorekeepLocale - Expert Review 3

    Expert Review 2: Changes done. Variable names fixed, FLAG_ACTIVITY_CLEAR_TOP added.

    Expert Review 1 (7/18/2017): Changes done.

    Team Review (6/23/2017): Changes done.

    Keeps score with plus and minus buttons. Challenge solution code
    for localizing into Hebrew (RTL language) and Afrikaan, changing
    colors and text styles.

    Covered in lesson:
    https://docs.google.com/a/google.com/document/d/1r-ZsYgT72RvZeBHc6bIBLmYh7WEP1ZeHDhZVRLtA2VU/edit?usp=sharing

    Change-Id: Id81a477d29c3e1380e1872aacd958cbcf0bc66b2

commit c180909f4dc7cbaf860c1ec1516a78242b740d51
Author: Tony Bove <[email protected]>
Date:   Mon Jun 19 16:41:47 2017 -0700

    FragmentExample1 - Final

    Expert Review 3 changes made, LGTM received.
    Review 2 changes made, including:
    Removed final on TextView declaration and other minor changes.

    Expert Review 1 changes made, including:
    Supports SDK 26 (added maven) and 26-level dependencies
    Image set to centerCrop to support scaling for different screens

    Team Review completed, all changes made.

    Uses a static fragment to show radio buttons for choosing
    "yes" or "no" for a question.

    Covered in lesson:
    https://docs.google.com/a/google.com/document/d/1fN2cDL_j9ZY7QwBtE42zYcTzYma_fYakpuVFUan4e_c/edit?usp=sharing

    Change-Id: I4260cdd8bbde7df7d04ca7ee2ea90a329158e11a

commit 4fe2cf6e30a6436cd36cf5ac496407b4a1b2482a
Author: Tony Bove <[email protected]>
Date:   Mon Jun 19 16:50:19 2017 -0700

    FragmentExample1_challenge - Final

    Expert Review 3 changes made, LGTM received.
    Review 2 changes made, including all
    changes from FragmentExample1.

    Expert Review 1 changes made, including:
    Uses only one fragment.
    Adds another question and RatingsBar to the fragment.
    All comments from FragmentExample1 addressed.

    Team Review completed, all changes made.

    Adds a second static fragment to FragmentExample1 that enables
    users to respond to a second question as feedback for the article.

    Covered in lesson:
    https://docs.google.com/a/google.com/document/d/1fN2cDL_j9ZY7QwBtE42zYcTzYma_fYakpuVFUan4e_c/edit?usp=sharing

    Change-Id: Ib12a7b5839c962ba1420ded7c4cc95c9b22a18b3

commit 813f64eaf0e75faa2ee0f33e246b9a175c7170f5
Author: Tony Bove <[email protected]>
Date:   Mon Jun 19 16:55:58 2017 -0700

    FragmentExample2 -- Final

    Expert Review 3 changes made, LGTM received.
    Fix for configuration change (vertical to horizontal).
    Uses one Button for open/close.

    Added vars for Open and Close buttons and moved findviewbyid
    to onCreate() in MainActivity.

    Expert Review 1 changes made, including:
    Close fragment button now in MainActivity
    Open and Close button visibility control
    Uses best practice fragment instantiation pattern
    Includes all changes from FragmentExample1

    Team Review completed, all changes made.

    Uses a dynamic fragment to show a feedback question with
    radio buttons for "yes" or "no" answer.

    Covered in lesson:
    https://docs.google.com/a/google.com/document/d/1fN2cDL_j9ZY7QwBtE42zYcTzYma_fYakpuVFUan4e_c/edit?usp=sharing

    Change-Id: I5080bfc0b17e09a6aeec63348f19b714d2c5bd89

commit d1637140934fc1b81f25ec12c8577bea1977e25c
Author: Tony Bove <[email protected]>
Date:   Wed Jun 21 09:36:45 2017 -0700

    FragmentCommunicate - Final2

    Final change made to use string in exception message.

    Expert Review 3.1 changes made, LGTM received.
    Changed radio button pre-check from a switch case
    block to single statement.

    Review 2 changes made, including all
    changes to FragmentExample2.

    Expert Review 1 changes made, including:
    Uses best practice fragment instantiation pattern
    Added constants and renamed variables
    Moved bundle code to instantiate() in SimpleFragment

    Team Review completed, all changes made.

    Saves the radio-button choice the user makes in FragmentExample2
    so that the choice is already selected when the user opens the
    fragment again.

    Covered in:
    https://docs.google.com/a/google.com/document/d/16uq9i2Ud15QSsTB8bT4rAE65G3c6zOREyYaE-zzU-ko/edit?usp=sharing

    Change-Id: I870f829ed962b4f33a05018761c6e3da1876e55b

commit 5ff9434926a308c322e78e168efe4cadcfca76c6
Author: Tony Bove <[email protected]>
Date:   Wed Jul 5 10:56:49 2017 -0700

    CustomEditText - Expert Review 3

    Changes made after +2:
    Rename/refactored myEditText to my_edit_text
    Rename/refactored targetHit to isClearButtonClicked
    onTouch() method: fixed RTL bug with code to detect
    touch on button start and end.
    onTextChanged(): deleted check for empty string (not needed).
    Uses buildToolsVersion "25.0.3"

    Expert Review 1 changes done (7/25/2017). App now supports RTL languages.

    Team Review changes done (7/21/2017).

    Demonstrates how to make a custom text editing view that includes an X
    (Clear) button for clearing the entered text.

    Covered in:
    https://docs.google.com/a/google.com/document/d/1UQ5meUruP-E_IILxiJ0Ik2hECiBVEjZcNerNc5vdOKM/edit?usp=sharing

    Change-Id: I038b8affd67503d8ef8b272ca099dde030ca7d82

commit 1508a77fead5831b39f7fff8afce2e06ad32b6e9
Merge: 0e74015 e89a0eb
Author: Tony Bove <[email protected]>
Date:   Wed Sep 27 16:50:37 2017 +0000

    Merge "Custom Fan Controller - Merge Fix"

commit e89a0eb94ec877b4b986de9a46acad847a83288d
Author: Tony Bove <[email protected]>
Date:   Tue Sep 26 17:33:07 2017 -0700

    Custom Fan Controller - Merge Fix

    New branch with approved CustomFanController app.

    Change-Id: Icdeb8d35677965e34c44fb2763f0fa097cff3520

commit 0e7401523d7ea9ddea84ee84ac0fbcf39206a21b
Author: Tony Bove <[email protected]>
Date:   Wed Jul 5 11:05:48 2017 -0700

    CustomFanControllerChallenge - Expert Review 3

    Expert Review 2 changes done.

    Expert Review 1 changes done (7/25/2017).

    Team Review changes done (7/21/2017).

    Defines a custom attribute for CustomFanController and a Switch Colors
    button to switch to alternate colors for the dial and text.

    Covered in:
    https://docs.google.com/a/google.com/document/d/1UQ5meUruP-E_IILxiJ0Ik2hECiBVEjZcNerNc5vdOKM/edit?usp=sharing

    Change-Id: I60c03fea047b3642f6c7251301187891b2f76c64

commit e3b249dbb581ddc707ea7b57f5061d3a5edbb474
Author: Tony Bove <[email protected]>
Date:   Tue Jun 13 14:41:22 2017 -0700

    LocaleRecyclerView - Expert Review 3

    Expert Review 2: Changed statement to
    getResources().getString(R.string.word, wordListSize)

    Did not use %s after running into a problem with my French string.

    Expert Review 1 all changes made.

    Team Review (6/23/2017): Changed French translation.

    Displays a clickable word list to demonstrate RecyclerView.
    This version localized for French and Hebrew (RTL language).

    Covered in lesson:
    https://docs.google.com/a/google.com/document/d/1SyuenuK95XQPhSJ2PlfEZQRkSfCabiYV8v6hWLvbE8A/edit?usp=sharing

    Change-Id: I310138d073a8d4c9851e8c979d937c1a5fd44d2e

commit 3f78569efbfcd75e334cbe419524f2a8079501f9
Merge: 2ccf6e0 f006aac
Author: Tony Bove <[email protected]>
Date:   Tue Sep 26 23:30:20 2017 +0000

    Merge "SongDetail - Final Review"

commit 2ccf6e00ca52b77d91dbfca15e771f537721ab89
Author: Tony Bove <[email protected]>
Date:   Tue Jun 13 14:34:08 2017 -0700

    LocaleText3 - Final Review

    Expert Review 3 change done. Please review for +1 and +2.

    Expert Review 2 changes done. Please review for +1.

    All changes made from Expert Review 1 (7/17/2017).
    Fixed variables, time calculation, and try/catch exception.

    Team Review (6/23/2017): Changed FAB in MainActivity to launch HelpActivity,
    and added Javadocs and other minor fixes.

    Full version of LocaleText that converts a date, number, and currency format
    for the user's chosen locale, and includes an RTL language (Hebrew)
    as well as LTR languages.

    Covered in lesson:
    https://docs.google.com/a/google.com/document/d/1SyuenuK95XQPhSJ2PlfEZQRkSfCabiYV8v6hWLvbE8A/edit?usp=sharing

    Change-Id: Ie1e100ed3cec858de072cbdf423de108c6ebeea4

commit a5c45642c134079860a146396241696a6228f063
Author: Tony Bove <[email protected]>
Date:   Tue Jun 13 14:27:29 2017 -0700

    LocaleText2 - Final Review

    Expert Review 1+ changes done

    Fixed missing change from Expert Review 1.

    Team Review changes done.

    Changes from LocaleText3 incorporated into LocaleText2.

    Intermediate Code for LocaleText3

    Adds the Languages menu item for switching languages to LocaleText1.

    Covered in this lesson:
    https://docs.google.com/a/google.com/document/d/1SyuenuK95XQPhSJ2PlfEZQRkSfCabiYV8v6hWLvbE8A/edit?usp=sharing

    Change-Id: If99734583c2ab9e13a88a0d72e24d9c6c6e141bd

commit f006aac28742a70278bed16688a111e0cdb40018
Author: Tony Bove <[email protected]>
Date:   Wed Jun 21 10:38:12 2017 -0700

    SongDetail - Final Review

    Expert Review 1 completed, nits fixed. ReadMe and data "bootleg" fixed.

    Added addToBackStack in MainActivity to allow 2-pane user to
    reverse actions, and removed unused variable from SongDetailActivity.

    Needed to delete older Songs files.

    Using newInstance() pattern in SongDetailActivity as well as
    in MainActivity. Also improved var names.

    Using newInstance() best practice to create new fragment instance.
    Bundle put together in fragment.

    Formerly called Songs.
    Expert Review 1 of FragmentExample2 changes also completed
    in this app.

    Team Review 2 line-length adjustments completed.

    Team Review 2 completed, SongsUtil class created, all other
    changes made.

    DummyContent folder renamed to content.
    Renamed constants and variables to improve readability.

    Implements a two-pane master/detail layout for a horizontal tablet
    display, showing a song list and song details. It provides the
    song list as an activity and the song detail as a fragment.

    Based on the Songs_start starter app.

    Covered in:
    https://docs.google.com/a/google.com/document/d/16uq9i2Ud15QSsTB8bT4rAE65G3c6zOREyYaE-zzU-ko/edit?usp=sharing

    Change-Id: I7ada4f63114caa036a3763932916e3e4fc32d8e8

commit dfdaed8d0dd7ebb68766046da1276c12c5535539
Merge: 0397b59 6ef2a40
Author: Tony Bove <[email protected]>
Date:   Tue Sep 26 20:22:09 2017 +0000

    Merge "LocaleText1 - Final Review"

commit 0397b59467f4ee2019b05234e1e4dc776ffe6f7c
Merge: 2bc1b76 5211daa
Author: Aleks Haecky <[email protected]>
Date:   Mon Sep 18 21:53:21 2017 +0000

    Merge "Unmucked copy of StackedViews_fixed."

commit 5211daabf0d8f4d45cd09918cc799dc16723d112
Author: alekshaecky <[email protected]>
Date:   Mon Sep 18 14:52:22 2017 -0700

    Unmucked copy of StackedViews_fixed.

    Change-Id: I560f29e7cf019ca3762b81bff80e5ed4ef648172

commit 2bc1b7681123133adee340e17b3bad0a0ba156d1
Merge: 9df6d46 5f6a3f6
Author: Aleks Haecky <[email protected]>
Date:   Mon Sep 18 21:50:09 2017 +0000

    Merge "Unmucked copy of ClippingExample."

commit 5f6a3f6de2bf0865990bee2011fa069cf66f09e5
Author: alekshaecky <[email protected]>
Date:   Mon Sep 18 14:49:31 2017 -0700

    Unmucked copy of ClippingExample.

    Change-Id: I9d2810f6c1f1ed36eacad4f70583e80013906cab

commit 9df6d46b2f8c1251181fe67c3783e4949f7cd8db
Merge: ba61f81 fd4067d
Author: Aleks Haecky <[email protected]>
Date:   Mon Sep 18 21:47:33 2017 +0000

    Merge "Unmucked copy if MemoryOverload."

commit fd4067d81423c05b1870b389e6b7f85d347a344d
Author: alekshaecky <[email protected]>
Date:   Mon Sep 18 14:46:45 2017 -0700

    Unmucked copy if MemoryOverload.

    Change-Id: I160ced24794986010550b50ecbc685a4dc7c419f

commit ba61f817d14e51213b460f097fbe39120a047a5f
Merge: 5136494 7df89cb
Author: Aleks Haecky <[email protected]>
Date:   Mon Sep 18 21:43:03 2017 +0000

    Merge "Unmucked copy of CanvasExample."

commit 7df89cb9b5f0c0157c0387b10f7858a02fe44902
Author: alekshaecky <[email protected]>
Date:   Mon Sep 18 14:41:34 2017 -0700

    Unmucked copy of CanvasExample.

    Change-Id: I25f84f3751aa667ddce56e5528ecb24472269b37

commit 51364949873b0b0d72ccf32e226ef924ab0a3b2c
Author: alekshaecky <[email protected]>
Date:   Mon Sep 18 14:16:13 2017 -0700

    Unmucked copy of SimpleCanvas.

    Change-Id: Ia46afd06a6b242a1a5aa467ef6bcd3699c7ec9bd

commit 794c9daa52762a8e259f817ee69a49bdb79ba153
Merge: 030f36f 37b6788
Author: Laura Lemay <[email protected]>
Date:   Fri Sep 1 17:56:42 2017 +0000

    Merge "AppWidgetSample - Expert review +1"

commit 030f36ff7efe731d960842f398ab4e409110c6f3
Merge: 45abc55 f0f6ee9
Author: Laura Lemay <[email protected]>
Date:   Thu Aug 31 21:41:08 2017 +0000

    Merge "SimpleAccessibility - Expert review"

commit 45abc55f0e85a34fea56c0f595d580ee7f9b0c50
Merge: be628fa 0dcad58
Author: Laura Lemay <[email protected]>
Date:   Thu Aug 31 21:37:02 2017 +0000

    Merge "SensorListeners - Expert review"

commit be628fac040e21cfd936bd153bedf4546a6b4a69
Merge: b7c543a ec33359
Author: Laura Lemay <[email protected]>
Date:   Thu Aug 31 21:35:27 2017 +0000

    Merge "Sensor Survey - Expert review"

commit b7c543aafe6cc26174df6ccf9d4f4029b61f499a
Merge: 2a7a337 834d46e
Author: Laura Lemay <[email protected]>
Date:   Thu Aug 31 21:35:12 2017 +0000

    Merge "TiltSpot - Expert Review"

commit 37b67885ee0691fa7e285140eda41913411b91f0
Author: Laura Lemay <[email protected]>
Date:   Mon Jul 31 12:33:39 2017 -0700

    AppWidgetSample - Expert review +1

    Demonstrates how to create and update app widgets.  The main activity
    for the app is empty; all the functionality is in the widget.

    Update 8/31 Updates for Takeshi’s comments

    Change-Id: I3ba05ddf1ca42a1cbef0912604ed6bba95e96e49

commit 2a7a3371e49bd6f4c14b4fd2c006ec6f0f3a6c62
Merge: 448b498 7f0c7af
Author: Nikita Gamolsky <[email protected]>
Date:   Thu Aug 31 20:40:24 2017 +0000

    Merge "Remove MyAddressBook"

commit 7f0c7af389dd76eb00d279bec01eb129c6d6e89d
Author: Nikita Gamolsky <[email protected]>
Date:   Thu Aug 31 13:31:33 2017 -0700

    Remove MyAddressBook

    Change-Id: I73abe141cdf616516e6a0e2aa4651c5a2acf1d76

commit 448b49897dcfe5a7972529367d7b4878f1513554
Merge: 5992f02 cd9c360
Author: Aleks Haecky <[email protected]>
Date:   Thu Aug 31 19:14:42 2017 +0000

    Merge "PhysicsAnimation. Team Review.+fixes"

commit 5992f028f1f42a34c01d116aefee520bc252ff20
Merge: 078a3a5 c106095
Author: Aleks Haecky <[email protected]>
Date:   Thu Aug 31 19:14:34 2017 +0000

    Merge "PropertyAnimation (former: RippleEffectAnimation) Simpler & Better.+fixes"

commit 078a3a5c70aac89cf995be01ec9d1d61b0dcaf7d
Merge: 02424a2 9538e4c
Author: Aleks Haecky <[email protected]>
Date:   Thu Aug 31 19:14:23 2017 +0000

    Merge "WebPDemo. Expert Review.+Fixes."

commit 02424a25eba72c6238a1086b04f4d7fc61996c0f
Merge: 70009b3 0ac3524
Author: Aleks Haecky <[email protected]>
Date:   Thu Aug 31 19:14:13 2017 +0000

    Merge "LargeImages. Team Review. +Team changes. +Fixed."

commit 70009b36c1c4d13b01c5bd2f6a2feace61b6a12a
Merge: 105c946 fff3b67
Author: Aleks Haecky <[email protected]>
Date:   Thu Aug 31 19:13:05 2017 +0000

    Merge "StackedViews_with_overdraw. Expert review. +Fixes"

commit 105c9460d210cda689978b82693b783893664c10
Merge: 78ab197 dd6d88e
Author: Aleks Haecky <[email protected]>
Date:   Thu Aug 31 19:11:46 2017 +0000

    Merge "SurfaceViewExample. Flashlight app for review. +Dan's requested changes. +README. Small fixes. +Tony's fixes.+Jhansi's fixes."

commit 834d46ec8416a4974693a1685edcde935990b552
Author: Laura Lemay <[email protected]>
Date:   Wed Jul 26 15:18:43 2017 -0700

    TiltSpot - Expert Review

    Demonstrates the use of accelerometer and geomagnetic field
    sensors to determine device orientation.

    Update 8/30 onPause/Resume changed to onStart/Stop

    Change-Id: Ie6ff0c3c08ac3373591cb7cba902fd458be46e55

commit 0dcad58e9eb7cbb172a998df45561b81a1f61ef9
Author: Laura Lemay <[email protected]>
Date:   Thu Jun 15 15:41:23 2017 -0700

    SensorListeners - Expert review

    App to monitor and display changes in the value of the light and
    proximity sensors.  Demonstrates accessing sensors, registering
    sensor listeners, handling sensor data change callbacks.

    8/30 update onPause/Resume changed to onStop/Start for multi window mode

    Change-Id: I66d9988f5f253ffb6232a5bcbc5f2d0bba82ffdd

commit c106095b780825a3122bc392d28bdfef21e026a0
Author: alekshaecky <[email protected]>
Date:   Mon Jun 26 15:20:43 2017 -0700

    PropertyAnimation (former: RippleEffectAnimation) Simpler & Better.+fixes

    Change-Id: Ica26ffb09f8e934ce1bd14f04d3040c1366cdc35

commit ec3335934cbdf36968a59e51f2c248405529557e
Author: Laura Lemay <[email protected]>
Date:   Thu Jun 15 15:28:57 2017 -0700

    Sensor Survey - Expert review

    App to display a list the available sensors.

    8/11 Update - incorporate team review comments

    Change-Id: Ide83b181a4108d6c1a9671675f2da8f1d5dff402

commit 78ab1974a1b99e7aea8738ed9c1829ec8b699ee2
Author: Nikita Gamolsky <[email protected]>
Date:   Fri Aug 11 12:26:03 2017 -0700

    MyAddressBook - Sample for Taking Advantage of Kotlin Codelab

    Change-Id: Ic563c202f4d9ca11d7cb656946a9053d5e37d459

commit 9538e4c57a38cf8dddc4810c96ceb015a575076d
Author: alekshaecky <[email protected]>
Date:   Mon Jun 26 14:29:16 2017 -0700

    WebPDemo. Expert Review.+Fixes.

    Change-Id: I73f9e78d6eb357e7c8e159e8633a18c902d0a8a2

commit 0ac3524e615eaf9954536a2d0ced9aace8540e7d
Author: alekshaecky <[email protected]>
Date:   Mon Jun 26 14:10:22 2017 -0700

    LargeImages. Team Review. +Team changes. +Fixed.

    Change-Id: Ic719d67d6a5e372cc41741c9d665894949c43716

commit fff3b67a1e638fa4e1b6b64f458144b286904a88
Author: alekshaecky <[email protected]>
Date:   Fri Jun 9 19:00:53 2017 -0700

    StackedViews_with_overdraw. Expert review. +Fixes

    Change-Id: Id5d350145beeb29b6f89307f6fa2cb7249571c4e

commit f0f6ee95db18e5514a2c83a309b712521442fbb9
Author: Laura Lemay <[email protected]>
Date:   Thu Jun 22 10:01:56 2017 -0700

    SimpleAccessibility - Expert review

    Demonstrates the accessibility options in Android.  Based on the
    BasicAccessibility app from Googlesamples
    https://github.com/googlesamples/android-BasicAccessibility

    Change-Id: Icccca58f8f5690105974f7ff2830b8f1cf12ae2a

commit 6ef2a405a1b30fbf44d7f52d3e827b41275c3edb
Author: Tony Bove <[email protected]>
Date:   Tue Jun 13 14:20:52 2017 -0700

    LocaleText1 - Final Review

    Expert Review 1+ changes done

    Fixed missing change from Expert Review 1.

    Team Review changes done.

    Changes from LocaleText3 incorporated into LocaleText1.

    Intermediate Code for LocaleText3
    Demonstrates how to add languages for string resources and fix RTL layouts.

    Covered in this lesson:
    https://docs.google.com/a/google.com/document/d/1FJxTgZciWytjAGsLf8zA82MHxSwnI3M_sE-X8eG2RAM/edit?usp=sharing

    Change-Id: I318910172e6a22971f022c82a7ee4e69c7ffa7b8

commit dd6d88e9c893cbd1da0ccd6c6758af4e61227553
Author: alekshaecky <[email protected]>
Date:   Wed May 31 13:27:21 2017 -0700

    SurfaceViewExample. Flashlight app for review. +Dan's requested changes. +README. Small fixes. +Tony's fixes.+Jhansi's fixes.

    Change-Id: If95ba3852c7622794aa2530d63b4f30ea2695a0b

commit cd9c36032ffa2c2c23e8c5663704a4c7c4b27000
Author: alekshaecky <[email protected]>
Date:   Wed Jun 28 15:35:07 2017 -0700

    PhysicsAnimation. Team Review.+fixes

    Change-Id: I741f700ca74d973657274eef4a164afb8de954c9

commit 83b42825f10cea763c08b0f3e2db9a1e9d236069
Author: Laura Lemay <[email protected]>
Date:   Tue Apr 18 12:05:07 2017 -0700

    Global gitignore - this is the same file from the fundamentals course.

    Change-Id: I2de2028669565114f39bbb597b0c9db7028856cb

commit b3c7f35ff200f40b1f0b031894a1bec95554d68f
Author: Naoki Ishihara <[email protected]>
Date:   Tue Apr 4 22:29:27 2017 +0000

    Initial empty repository

Change-Id: I14ee60ac87d0a0ea53b7dcd9f9d5262064af7fc0
  • Loading branch information
alekshaecky committed Oct 30, 2017
1 parent 903601b commit 215f7d9
Show file tree
Hide file tree
Showing 112 changed files with 3,060 additions and 0 deletions.
46 changes: 46 additions & 0 deletions CanvasExample/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
CanvasExample - Solution code
=============================

Draw on your device screen using your finger.

Introduction
------------

This app uses a custom view to implement drawing on a canvas in response
to touch events. All drawing happens on the UI thread by overriding the
custom view's onDraw() method. You can use this technique when drawing
always takes less time than a screen refresh cycle on all target devices.

Pre-requisites
--------------

You need to know:
- How to open, build, and run apps with Android Studio.
- How to extract string resources and use string resources in the code.
- How to create a custom view that handles touch or click events.
- Basic understanding of the activity lifecycle.

Getting Started
---------------

1. Download and run the app.

License
-------

Copyright 2017 Google, Inc.

Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements. See the NOTICE file distributed with this work for
additional information regarding copyright ownership. The ASF licenses this
file to you under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
24 changes: 24 additions & 0 deletions CanvasExample/app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.example.canvasexample"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile 'com.android.support:appcompat-v7:25.3.1'
}
25 changes: 25 additions & 0 deletions CanvasExample/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/vhaecky/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
36 changes: 36 additions & 0 deletions CanvasExample/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2017 Google Inc.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.canvasexample">

<application android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Copyright (C) 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.example.canvasexample;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import static android.view.View.SYSTEM_UI_FLAG_FULLSCREEN;

/**
* CanvasExample shows how to create a custom view and draw on its canvas.
*/
public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

MyCanvasView myCanvasView;
// No XML file; just one custom view created programmatically.
myCanvasView = new MyCanvasView(this);
// Request the full available screen for layout.
myCanvasView.setSystemUiVisibility(SYSTEM_UI_FLAG_FULLSCREEN);
setContentView(myCanvasView);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
/*
* Copyright (C) 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.example.canvasexample;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Path;
import android.support.v4.content.res.ResourcesCompat;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;

/**
* Custom view that follows touch events to draw on a canvas.
*/

public class MyCanvasView extends View {

private Canvas mCanvas;
private Bitmap mBitmap;
private Paint mPaint;
private Path mPath;
private int mDrawColor;

MyCanvasView(Context context) {
this(context, null);
}

public MyCanvasView(Context context, AttributeSet attributeSet) {
super(context);

int backgroundColor;

mDrawColor = ResourcesCompat.getColor(getResources(),
R.color.opaque_orange, null);
backgroundColor = ResourcesCompat.getColor(getResources(),
R.color.opaque_yellow, null);

// Holds the path we are currently drawing.
mPath = new Path();
// Set up the paint with which to draw.
mPaint = new Paint();
mPaint.setColor(backgroundColor);
// Smoothes out edges of what is drawn without affecting shape.
mPaint.setAntiAlias(true);
// Dithering affects how colors with higher-precision than the device
// are down-sampled.
mPaint.setDither(true);
mPaint.setStyle(Paint.Style.STROKE); // default: FILL
mPaint.setStrokeJoin(Paint.Join.ROUND); // default: MITER
mPaint.setStrokeCap(Paint.Cap.ROUND); // default: BUTT
mPaint.setStrokeWidth(12); // default: Hairline-width (really thin)
}

/**
* Note: Called whenever the view changes size.
* Since the view starts out with no size, this is also called after
* the view has been inflated and has a valid size.
*/
@Override
protected void onSizeChanged(int width, int height,
int oldWidth, int oldHeight) {
super.onSizeChanged(width, height, oldWidth, oldHeight);
// Create bitmap, create canvas with bitmap, fill canvas with color.
mBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
mCanvas = new Canvas(mBitmap);
mCanvas.drawColor(mDrawColor);
}

@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
// First, draw the bitmap as created.
canvas.drawBitmap(mBitmap, 0, 0, mPaint);
// Then draw the path on top, styled by mPaint.
canvas.drawPath(mPath, mPaint);
}

// Variables for the latest x,y values,
// which are the starting point for the next path.
private float mX, mY;
// Don't draw every single pixel.
// If the finger has has moved less than this distance, don't draw.
private static final float TOUCH_TOLERANCE = 4;

// The following methods factor out what happens for different touch events,
// as determined by the onTouchEvent() switch statement.
// This keeps the switch statement
// concise and and easier to change what happens for each event.

private void touchStart(float x, float y) {
mPath.moveTo(x, y);
mX = x;
mY = y;
}

private void touchMove(float x, float y) {
float dx = Math.abs(x - mX);
float dy = Math.abs(y - mY);
if (dx >= TOUCH_TOLERANCE || dy >= TOUCH_TOLERANCE) {
// QuadTo() adds a quadratic bezier from the last point,
// approaching control point (x1,y1), and ending at (x2,y2).
mPath.quadTo(mX, mY, (x + mX)/2, (y + mY)/2);
mX = x;
mY = y;
}
}

private void touchUp() {
mPath.lineTo(mX, mY);
mCanvas.drawPath(mPath, mPaint);
// Reset so it doesn't get drawn again.
mPath.reset();
}

@Override
public boolean onTouchEvent(MotionEvent event) {
float x = event.getX();
float y = event.getY();

// Invalidate() is inside the case statements because there are many
// other types of motion events passed into this listener,
// and we don't want to invalidate the view for those.
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
touchStart(x, y);
// No need to invalidate because we are not drawing anything.
break;
case MotionEvent.ACTION_MOVE:
touchMove(x, y);
invalidate();
break;
case MotionEvent.ACTION_UP:
touchUp();
invalidate();
break;
default:
// do nothing
}
return true;
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions CanvasExample/app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2017 Google Inc.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>

<color name="opaque_orange">#FFFF5500</color>
<color name="opaque_yellow">#FFFFEB3B</color>
</resources>
17 changes: 17 additions & 0 deletions CanvasExample/app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!--
~ Copyright (C) 2017 Google Inc.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<resources />
19 changes: 19 additions & 0 deletions CanvasExample/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!--
~ Copyright (C) 2017 Google Inc.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<resources>
<string name="app_name">CanvasExample</string>
</resources>
Loading

0 comments on commit 215f7d9

Please sign in to comment.