Giter Site home page Giter Site logo

android-fundamentals-apps-v2's Introduction

Android Developer Fundamentals (Version 2)

Caution: This course is out of date and no longer maintained. Instead, please refer to the Android Basics with Compose course for the latest recommended practices. If you are looking for content on Views, you can check out the Android Basics in Kotlin course.

This repository contains samples, starter code, and solutions for Version 2 of the Android Developer Fundamentals course (August 2018).

Introduction

Each of the samples in this repository is associated with a practical exercise from the Android Developer Fundamentals course. While each sample stands and runs on its own, they are designed to be used together with the course.

The Android Developer Fundamentals course is an instructor-led training experience and is targeted towards beginning Android developers with a background in software development or computer science.

Pre-requisites

The samples, along with the course, assume basic competence in software design and development, as well as some background in computer science.

Specifically, to get started you need:

  • Familiarity with the general software development process for object-oriented applications using an IDE (Integrated Development Environment).
  • At least 1-3 years of experience with object-oriented programming and the Java programming language.

For the more advanced samples, it helps to know about:

  • SQLite databases and the SQLite query language.
  • Software architectural patterns that separate data from the user interface, such as MVP, MVC, or MVA.
  • Threading

You don't need to know anything about Android to get started.

Getting Started

  1. Install Android Studio, if you don't already have it.
  2. Download the sample.
  3. Import the sample into Android Studio.
  4. Build and run the sample.

android-fundamentals-apps-v2's People

Contributors

geneandgoogle avatar jkcoolmom avatar jlulovics avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-fundamentals-apps-v2's Issues

Wrong Explanation for 'gravity' attribute

In 'Android fundamentals 01.2 Part A: Your first interactive UI', task 4

"gravity: The gravity attribute specifies how a View is aligned within its parent View or ViewGroup. In this step, you center the TextView to be centered vertically within the parent ConstraintLayout."

I think this explanation is wrong. This should be the explanation for "layout_gravity".

Android Kotlin Fundamentals codelab:

Hi,

Just a small typo problem.
In here: Android fundamentals 01.2 Part B: The layout editor
sector 7, there is twice "android:layout_width="0dp"" and it supposed to be "android:layout_height="0dp""

image

thank you!

Android Kotlin Fundamentals codelab:

Describe the problem
A clear and concise description of what the problem is.
On Android fundamentals 01.2 Part A: Your first interactive UI in slide 6 under the description for the textSize field, it says

Use dp units when you specify font sizes ...

However it should say "Use sp units..."

In which lesson and step of the codelab can this issue be found?
Lesson number + step number.

Android fundamentals 01.2 Part A: Your first interactive UI + Step 6
How to reproduce?

What are the exact steps to reproduce the problem?
See above.

Versions

  1. What version of Android Studio are you using?
    N/A
  2. What API level are you targeting?
    N/A
    Additional information
    Add any other context about the problem here.

codelab: android-fundamentals

Android Kotlin Fundamentals codelab:

Describe the problem
Would be nice to have a green clone or download button for the SimpleCalc repository, since having GitHub knowledge isn't part of the requirements. I can see as a beginner, if they don't have the GitHub experience to pull the code, they'll have to manually go through all the files and copy and paste into their own machines - hassle.

Two ways to fix it:

If user has a github account -> they can fork and there is a green clone or download button.
If user doesn't have a github account -> add the green clone or download button to https://github.com/google-developer-training/android-fundamentals-starter-apps-v2/tree/master/SimpleCalc
or just do both.

In which lesson and step of the codelab can this issue be found?
Android fundamentals 03.1: The debugger + Step 1.1 Download and Open the SimpleCalc Project
Download SimpleCalc and unzip the file.

Android Kotlin Fundamentals codelab: Duplicate android:layout_width="0dp" when it should be android:layout_height="0dp"

Describe the problem
Duplicate android:layout_width="0dp" when it should be android:layout_height="0dp"

In which lesson and step of the codelab can this issue be found?
Android fundamentals 01.2 Part B: The layout editor on Step 5 where it says:
7. Find the show_count TextView element, and change the following attributes:

Original
Change to
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"

How to reproduce?
None

PhoneNumberSpinnerEspresso Error performing 'single click' on view

Hi, I am learning how to use Espresso. and I figure out that I have a failing test.

Iam following the instruction of: https://codelabs.developers.google.com/codelabs/android-training-espresso-for-ui-testing/index.html?index=..%2F..android-training#4

android-fundamentals-apps-v2/PhoneNumberSpinnerEspresso/app/src/androidTest/java/com/example/android/phonenumberspinner/SpinnerSelectionTest.java

When I run onView(withId(R.id.label_spinner)).perform(click());
I am getting an exception:

android.support.test.espresso.PerformException: Error performing 'single click' on view 'with id: com.example.android.phonenumberspinner:id/label_spinner'.
at android.support.test.espresso.PerformException$Builder.build(PerformException.java:84)
at android.support.test.espresso.base.DefaultFailureHandler.getUserFriendlyError(DefaultFailureHandler.java:81)
at android.support.test.espresso.base.DefaultFailureHandler.handle(DefaultFailureHandler.java:52)
at android.support.test.espresso.ViewInteraction.waitForAndHandleInteractionResults(ViewInteraction.java:312)
at android.support.test.espresso.ViewInteraction.desugaredPerform(ViewInteraction.java:167)
at android.support.test.espresso.ViewInteraction.perform(ViewInteraction.java:110)
at com.example.android.phonenumberspinner.SpinnerSelectionTest.iterateSpinnerItems(SpinnerSelectionTest.java:70)
at java.lang.reflect.Method.invoke(Native Method)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at android.support.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:433)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:58)
at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:375)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1879)
Caused by: java.lang.RuntimeException: Action will not be performed because the target view does not match one or more of the following constraints:
at least 90 percent of the view's area is displayed to the user.
Target view: "AppCompatSpinner{id=2131296340, res-name=label_spinner, visibility=VISIBLE, width=133, height=36, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.support.constraint.ConstraintLayout$LayoutParams@bd5945c, tag=null, root-is-layout-requested=false, has-input-connection=false, x=368.0, y=36.0, child-count=1}"
at android.support.test.espresso.ViewInteraction.doPerform(ViewInteraction.java:238)
at android.support.test.espresso.ViewInteraction.access$100(ViewInteraction.java:62)
at android.support.test.espresso.ViewInteraction$1.call(ViewInteraction.java:149)
at android.support.test.espresso.ViewInteraction$1.call(ViewInteraction.java:146)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

Thanks in advance.

Android Fundamentals codelab: 10.1 Task 11.1 - ViewModelProviders is deprecated

Describe the problem
In Android fundamentals codelab 10.1, Task 11.1, the codelab shows us creating the ViewModel like this:
mWordViewModel = ViewModelProviders.of(this).get(WordViewModel.class);

However, ViewModelProviders is deprecated.

Instead it should be accessed like this:
MyViewModel model = new ViewModelProvider(this).get(MyViewModel.class);

However, since the codelab is using AndroidViewModel, it seems the correct way is actually like this:
mWordViewModel = ViewModelProvider.AndroidViewModelFactory.getInstance(getApplication()).create(WordViewModel.class);

https://codelabs.developers.google.com/codelabs/android-training-livedata-viewmodel/index.html?index=..%2F..%2Fandroid-training#12

In which lesson and step of the codelab can this issue be found?
Android fundamentals 10.1 Task 11.1

codelab: android-fundamentals

Android Kotlin Fundamentals codelab: Update the instruction.

Describe the problem
Update the instruction. The instructions for 1.1 don't apply no more. The Google APIs Explorer website has been updated.

In which lesson and step of the codelab can this issue be found?
Android fundamentals 07.2: AsyncTask and AsyncTaskLoader +
1.1 Send a Books API Request
Go to the Google APIs Explorer at https://developers.google.com/apis-explorer/.
Click Services in the left nav, and then Books API.

https://codelabs.developers.google.com/codelabs/android-training-asynctask-asynctaskloader/index.html?index=..%2F..android-training#2

Android Fundamentals codelab: 10.1 Task 5 Step 5 links to deprecated RoomDatabase

Describe the problem
The link to documentation for RoomDatabase in Task 5 Step 5 takes you to the deprecated version of RoomDatabase. The link should be updated to this one:
https://developer.android.com/reference/androidx/room/RoomDatabase.html

In which lesson and step of the codelab can this issue be found?
Android fundamentals 10.1 Part A: Room, LiveData, and ViewModel Task 5 Step 5.
https://codelabs.developers.google.com/codelabs/android-training-livedata-viewmodel/index.html?index=..%2F..%2Fandroid-training#6

codelab: android-fundamentals

Race Conditions in Learning Code people might use as examples.

From code lab 7.2 -- WhoWroteIt

Is it my ignorance or is this code going to crash intermittently based on race conditions.

} catch (Exception e) {
    mTitleText.get().setText(R.string.no_response);
    mAuthorText.get().setText("");
    e.printStackTrace();
}

In the above code mTitleText and mAuthorText are WeakReference instances and the use of the reference is used without checking if the object has been collected. I have much more experience in C, C++, C#, Javascript and languages other than Java. So there might be something I am missing here. But according to the documentation, this will return null and it is not inside of a larger try block. If it will not crash, then I have to wonder why a weak reference is required at all.

As a side note, I had posted other issues in the documentation relating to the source in this project. Those two issues were:

Naming conventions were not followed and variables with the scope level of a method were using class level member naming syntax. mVarName. When working through this in the tutorial, this was confusing and led me to place the code in the class instead of the function as I did not read the instructions well and assumed the code went in the class based on convention.
The documentation confuses the concept of an instance versus a reference (or handle). When getting a handle to a view with findViewById(...). Once again if you are looking at the complete code, this is obvious. But when reading instructions that say now create an instance of a TextView, it is initially confusing. Even worse, new developers who do not know the difference may learn an invalid vocabulary leading them to poor communication with other developers.

Android Kotlin Fundamentals codelab:

Describe the problem
A clear and concise description of what the problem is.
The tutorial shows a screenshot indicating the minimum API version should be 15 in step 3, but step 6 requires the use of textAlignment, which only shows up in version 17 or above.

In which lesson and step of the codelab can this issue be found?
Lesson number + step number.
Android fundamentals 01.2 Part A: Your first interactive UI
Steps 3 and 6

How to reproduce?
What are the exact steps to reproduce the problem?
Build a project with minimum API level 15
View the attributes on a textView
Observe the lack of textAlignment
Update build.gradle to minimum API level 17
Sync with gradle files
Observe textAlignment now appears in the attributes on a textView

Versions

  1. What version of Android Studio are you using?
    3.53
  2. What API level are you targeting?
    A minimum of 15 was targeted in the tutorial but text alignment appears to only work in 17 and above.
    Additional information
    Add any other context about the problem here.

codelab: android-fundamentals

in android studio 3.5.3 there is not content_main.xml file?!!

Describe the problem
A clear and concise description of what the problem is.

In which lesson and step of the codelab can this issue be found?
Lesson number + step number.

How to reproduce?
What are the exact steps to reproduce the problem?

Versions

  1. What version of Android Studio are you using?
  2. What API level are you targeting?

Additional information
Add any other context about the problem here.

codelab: android-fundamentals

Android Fundamentals codelab: 10.1 - Use 24 as the min sdk?

Describe the problem
In Task 1 where we create the sample app it says to set the min sdk to 14. But then in Task 9 when I try to run the app, I get an error saying "Default interface methods are only supported starting with Android N (--min-api 24)"
So, seems this needs to be updated or a work around offered in the codelab for handling previous versions.

https://codelabs.developers.google.com/codelabs/android-training-livedata-viewmodel/index.html?index=..%2F..%2Fandroid-training#2

In which lesson and step of the codelab can this issue be found?
Lesson 10.1, Task 1 says to use min sdk 14, but when you run the app in Task 9 you get the error.

codelab: android-fundamentals

Android Kotlin Fundamentals codelab:

Describe the problem
A typo "slate" instead of state

In which lesson and step of the codelab can this issue be found?
Android fundamentals 10.1 Part A: Room, LiveData, and ViewModel
12. Task 10: Populate the database- First paragraph last line.

How to reproduce?
What are the exact steps to reproduce the problem?

Versions

  1. What version of Android Studio are you using?
  2. What API level are you targeting?

Additional information
Add any other context about the problem here.

codelab: android-fundamentals

Android Kotlin Fundamentals codelab:

Describe the problem
It's written android:layout_width="0dp" instead of android:layoutheight="0dp"_

In which lesson and step of the codelab can this issue be found?
Lesson 5, Step 2.2

How to reproduce?
Just edit the text, I guess(?)

Versions

  1. What version of Android Studio are you using? (Not relevant)
  2. What API level are you targeting? (Not relevant)

Additional information
Add any other context about the problem here.
(Nothing else to declare)

codelab: android-fundamentals
image

Android Kotlin Fundamentals codelab:

Describe the problem
A clear and concise description of what the problem is.
The instructions on android "Android fundamentals 01.2 Part B: The layout editor" Task 2.2 ask for the layout_width to be changed twice in succession for the
In which lesson and step of the codelab can this issue be found?
Lesson number + step number.
"Android fundamentals 01.2 Part B: The layout editor" Task 2.2
How to reproduce?
What are the exact steps to reproduce the problem?
Examine the documentation
Versions

  1. What version of Android Studio are you using?
  2. What API level are you targeting?

Additional information
Add any other context about the problem here.
Not a code issue but a possible documentation mistake?
codelab: android-fundamentals

Android Kotlin Fundamentals codelab:

Describe the problem
The problem is a typo error

In which lesson and step of the codelab can this issue be found?
Lesson number : "Android fundamentals 01.2 Part B: The layout editor"
step number : 5 > 2.2 > level 7
How to reproduce?
change the text "width" under the original descriptions to "height"

codelab: android-fundamentals

Wrong code snippet in the codelabs (Task 1)

Hi,
I don't know where report this small typo, hope this is the right place.
In the codelab 5.1: Drawables, styles, and themes (Unit 2: User experience) there is a wrong code snippet.
I refer to:
"Create two TextView member variables to hold references to the TextView elements." and the code below is:
// Member variables for holding the score
private int mScore1;
private int mScore2;

instead of

Private TextView mScoreText1;
Private TextView mScoreText2;

Android Java Fundamentals codelab:

Typo in 01.2 Part B, task 2 step 7:
both original code snippets include android:layout_width, while the second one should actually be android:layout_height

codelab: android-fundamentals

Android Fundamentals codelab: 10.1 Task 4.1 Video link is deprecated

Describe the problem
The video linked to at the bottom of Task 4 is deprecated. The new video is here: https://www.youtube.com/watch?v=OMcDk2_4LSk&index=8&list=PLWz5rJ2EKKc9mxIBd0DRw9gwXuQshgmn2

In which lesson and step of the codelab can this issue be found?
Android fundamentals 10.1 Part A: Room, LiveData, and ViewModel, Task 4.1
https://codelabs.developers.google.com/codelabs/android-training-livedata-viewmodel/index.html?index=..%2F..%2Fandroid-training#5

codelab: android-fundamentals

Android Java Fundamentals codelab:

Describe the problem
The last code example (summary of the previous examples) the id edittext_loc is missing, instead the id edittext_uri is duplicated.

In which lesson and step of the codelab can this issue be found?
2.3 Implicit Intents - Task 1

How to reproduce?
Check the webpage

Versions
N/A

Additional information
nope

codelab: android-fundamentals

Fix the error

#1 Error on Tutorial:
Android fundamentals 07.1: AsyncTask
5. Delete the app:layout_constraintRight_toRightOf and app:layout_constraintTop_toTopOf attributes. ==> this is wrong.

#2 Source code error:
When the device is rotated after clicking the button the text is "Napping..." forever. Please wakeup and show the correct text message.

Android Kotlin Fundamentals codelab:

Android fundamentals 05.1: Drawables, styles, and themes:
Task 1.5 Initialize the TextView elements and score count variables:

Hello there !

The code for the score holding is written twice and the one for the textview isn't written.

The code is like this :

Follow these steps:

  1. Create two integer member variables representing the score of each team.

// Member variables for holding the score
private int mScore1;
private int mScore2;
2. Create two TextView member variables to hold references to the TextView elements.

// Member variables for holding the score
private int mScore1;
private int mScore2;

But it should be like this :

  1. Create two integer member variables representing the score of each team.

// Member variables for holding the score
private int mScore1;
private int mScore2;
2. Create two TextView member variables to hold references to the TextView elements.

// Member variables for the two score TextView elements
private TextView mScoreText1;
private TextView mScoreText2;

Regards.

Android Kotlin Fundamentals codelab:

Describe the problem
Wasn't clear or concise what to add in, until you look at the solution.

In which lesson and step of the codelab can this issue be found?
Lesson number + step number.
Android fundamentals 02.3: Implicit Intents + Step 5.1 Create the project and layout + 6. Leave the ... but add the following attributes:

Additional information
Clear confusion by saying, add the following TextView inside the ConstraintLayout of activity_main.xml

codelab: android-fundamentals

Android Java Fundamentals codelab:

Describe the problem
the Guidance for graders says
Check that the app has the following features:
...
The implementation of onCreate() tests for the existence of the outState Bundle. If that Bundle exists, the counter value is restored and saved to the TextView.

it should say savedInstanceState bundle

In which lesson and step of the codelab can this issue be found?
Lesson 02.2 Activity Lifecycle and State
Homework step

How to reproduce?
Just visit the web page

Versions
N/A

Additional information
none

codelab: android-fundamentals

in android 3.5.3 when i try build project it say ERROR: Failed to resolve: cardview Affected Modules: app

Describe the problem
A clear and concise description of what the problem is.

In which lesson and step of the codelab can this issue be found?
Lesson number + step number.

How to reproduce?
What are the exact steps to reproduce the problem?

Versions

  1. What version of Android Studio are you using?
  2. What API level are you targeting?

Additional information
Add any other context about the problem here.

codelab: android-fundamentals

Android Kotlin Fundamentals codelab: Lesson 05.1 wrong code shown

Describe the problem
In Task 1.5, step 2, the code given is mistakenly the same code for step 1.

It reads:
// Member variables for holding the score
private int mScore1;
private int mScore2;

It should probably say something like:
// Member variables for holding the TextViews
private TextView mScoreText1;
private TextView mScoreText2;

In which lesson and step of the codelab can this issue be found?
Lesson 05.1, Task 1.5, Step 2

How to reproduce?
N/A

Versions
N/A

Additional information

codelab: android-fundamentals

Android Kotlin Fundamentals codelab:

workManager class is actually WorkManager. The W should be capital.
A clear and concise description of what the problem is.

In which lesson and step of the codelab can this issue be found?
Android fundamentals 08.3: JobScheduler -> Homework -> Lesson 1

How to reproduce?
What are the exact steps to reproduce the problem?

Versions

  1. What version of Android Studio are you using?
  2. What API level are you targeting?

Additional information
Add any other context about the problem here.

codelab: android-fundamentals

Android Kotlin Fundamentals codelab:

Describe the problem

  1. The cart icon was not linked with floatingActionButton

In which lesson and step of the codelab can this issue be found?
Android fundamentals 04.1: Clickable images (Task 3)

codelab: android-fundamentals

Android Kotlin Fundamentals codelab: Should match_constraint be match_parent?

Describe the problem
Should match_constraint be match_parent? Don't see match_constraint in the latest android studio.

In which lesson and step of the codelab can this issue be found?
Android fundamentals 03.3: Support libraries + Change the layout_width attribute in the Attributes pane for the Button to match_constraint.

Android Kotlin Fundamentals codelab:

Describe the problem
How do we (learners) download the project! This link SimpleCalc does not point to a repository we can clone.

In which lesson and step of the codelab can this issue be found?
Android fundamentals 03.1: The debugger.

How to reproduce?
Visit the link

codelab: android-fundamentals

Add style lint for naming conventions

According to the style guide, prefixing variables with m should only be done for "Non-public, non-static field names".

However, I found at least two cases in the same file where it is being used for local variables:

I'm not sure if a style lint can be added. The m confused me as a new android developer, and having it used inconsistently is even more confusing.

Android Fundamentals codelab: 10.1 Task 8.4

Describe the problem
In Android Fundamentals codelab: 10.1 Task 8.4 it says to set the fab image source with the following line:
android:src="@drawable/ic_add_black_24dp"

Nothing showed up when I did this, I had to change it to:
app:src="@drawable/ic_add_black_24dp"

In which lesson and step of the codelab can this issue be found?
This is in the java fundamentals v2, Section 10.1 Task 8.4
https://codelabs.developers.google.com/codelabs/android-training-livedata-viewmodel/index.html?index=..%2F..%2Fandroid-training#9

codelab: android-fundamentals

Android Kotlin Fundamentals codelab:

Describe the problem
You aren't ever going to be able to explain the difference between up and back. Never. If it's not totally clear to me what the difference is as a user and thus needs little or no explaining as a developer then the problem is not that I don't understand the difference, the problem is that the UI paradigm is BROKEN. Wake up! That dog just won't hunt. Never has. Never will. Back is back. When there's an up button AT BEST the user knows that they can go back and it won't exit the app, but when up and back do different things it just confuses the user. Please stop trying to explain the difference to developers. If I use an Android phone all day every day and you have to explain it, it's broken. Just say that you messed up and make a recommendation about what to do about it. My suggestion is that up indicates that if you go back or tap up you will still be in the app, but they will do the same thing. Usually that's the case and when it's not I just get pissed at the app because I couldn't tell that they would be different when I did the back gesture.

In which lesson and step of the codelab can this issue be found?
Android fundamentals 04.4: User navigation Step 3.

How to reproduce?
What are the exact steps to reproduce the problem?

Try to explain the difference to a regular Android user that's not a developer.

Versions

  1. What version of Android Studio are you using?
  2. What API level are you targeting?

Additional information
Add any other context about the problem here.

codelab: android-fundamentals

Android Kotlin Fundamentals codelab:

Describe the problem
NightMode is not working if you use the theme Theme.Appcompat.Light.DarkActionBar
it should be changed to Theme.Appcompat.DayNight

In which lesson and step of the codelab can this issue be found?
Android fundamentals 05.1: Drawables, styles, and themes
Step6: Task 4: Themes and final touches

codelab: android-fundamentals

Android Kotlin Fundamentals codelab: 10.1 Task 1.2

Describe the problem
This page needs to be updated for how to correctly include lifecycle components. "The APIs in lifecycle-extensions have been deprecated. Instead, add dependencies for the specific Lifecycle artifacts you need."

In which lesson and step of the codelab can this issue be found?
10.1 Task 1.2

How to reproduce?
Documentation needs to be updated.

codelab: android-fundamentals

Crash in NotificationScheduler example

In the NotificationScheduler (8.3) example if the user clicks "Cancel jobs" and then clicks "Schedule job" the app crashes as cancelJobs() nulls mScheduler while scheduleJob uses mScheduler without checking its validity.

fix the error

In TwoActivities project inside MainActivity.class there has some private object reference which are never assigned..
And so when those reference called findViewById() method ,there has some runtime exception which say as follow

-------- beginning of crash
2019-04-05 17:50:34.708 2892-2892/com.example.twoactivities E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.twoactivities, PID: 2892
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.twoactivities/com.example.twoactivities.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.widget.TextView.findViewById(int)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2925)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3060)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1818)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6762)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.widget.TextView.findViewById(int)' on a null object reference
at com.example.twoactivities.MainActivity.onCreate(MainActivity.java:25)
at android.app.Activity.performCreate(Activity.java:7136)
at android.app.Activity.performCreate(Activity.java:7127)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1272)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2905)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3060) 
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) 
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) 
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1818) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:193) 
at android.app.ActivityThread.main(ActivityThread.java:6762) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 
2019-04-05 17:50:34.722 2892-2892/? I/Process: Sending signal. PID: 2892 SIG: 9

Android Kotlin Fundamentals codelab:

Describe the problem
The codelab doesn't jell with Android Studio v3.6.1 - the Basic Activity template creates "fragments" which the codelab doesn't mention.

In which lesson and step of the codelab can this issue be found?
0.4.1 Clickable Images

How to reproduce?
Use Android Studio 3.6.1 and start the codelab to see the difference.

Versions

  1. What version of Android Studio are you using? 3.6.1
  2. What API level are you targeting? 24

Additional information
Nothing else.

codelab: android-fundamentals

[DroidCafeChallenge] A result that requires uniformity

The code in the repository and the resulting image in codelab are the same, The code for codelabs is different.

  1. the code in the repository

    String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE);

  2. the resulting image in codelab
    스크린샷 2019-04-28 오후 6 51 38

It's not a major thing, but it would be nice if we could see a unified result.

Android Fundamentals codelab:

PagerAdapter is abstract; cannot be instantiated

final PagerAdapter adapter = new PagerAdapter
(getSupportFragmentManager(), tabLayout.getTabCount());
viewPager.setAdapter(adapter);

Android Kotlin Fundamentals codelab: Update debugger icon

Describe the problem
Running the latest android studio up to date.

In which lesson and step of the codelab can this issue be found?
4. Task 2: Run SimpleCalc in the debugger
+
2.1 Start and run your app in debug mode
In Android Studio, select Run > Debug app or click the Debug icon select Run > Debug app or click the Debug icon [ICON HERE] in the toolbar. [IMAGEINFO]: ic_debug.png, Debug icon in the toolbar.

Update the debugger [ICON HERE] in tutorial to prevent confusion.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.