This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<FrameLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:id="@+id/discoverFragmentContainer" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context="com.mobymagic.shazamclone.discover.DiscoverActivity" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mobymagic.shazamclone.discover | |
import android.support.test.espresso.Espresso.onView | |
import android.support.test.espresso.assertion.ViewAssertions.matches | |
import android.support.test.espresso.matcher.ViewMatchers.isDisplayed | |
import android.support.test.espresso.matcher.ViewMatchers.withId | |
import android.support.test.filters.LargeTest | |
import android.support.test.rule.ActivityTestRule | |
import android.support.test.runner.AndroidJUnit4 | |
import com.mobymagic.shazamclone.R |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mobymagic.shazamclone.discover | |
import android.os.Bundle | |
import android.support.v4.app.Fragment | |
import android.view.LayoutInflater | |
import android.view.View | |
import android.view.ViewGroup | |
import com.mobymagic.shazamclone.R |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:id="@+id/discoverFragmentView" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context="com.mobymagic.shazamclone.discover.DiscoverFragment"> | |
<!-- TODO: Update blank fragment layout --> | |
<TextView | |
android:layout_width="match_parent" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun onCreate(savedInstanceState: Bundle?) { | |
... | |
FragmentUtils.addIfNotExist(supportFragmentManager, R.id.discoverFragmentContainer, | |
DiscoverFragment(), "DiscoverFragment") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mobymagic.shazamclone.utils | |
import android.support.v4.app.Fragment | |
import android.support.v4.app.FragmentManager | |
object FragmentUtils { | |
fun addIfNotExist(fm: FragmentManager, containerRes: Int, fragment: Fragment, tag: String) { | |
val existingFragmentWithTag = fm.findFragmentByTag(tag) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:id="@+id/discoverFragmentView" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:background="?attr/colorPrimary" | |
tools:context="com.mobymagic.shazamclone.discover.DiscoverFragment"> | |
<!-- SpinKit is just a progress view. We want it to show below every other view in this layout. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mobymagic.shazamclone.discover | |
import android.support.test.espresso.Espresso.onView | |
import android.support.test.espresso.action.ViewActions.click | |
import android.support.test.espresso.assertion.ViewAssertions.matches | |
import android.support.test.espresso.matcher.ViewMatchers.isDisplayed | |
import android.support.test.espresso.matcher.ViewMatchers.withId | |
import android.support.test.filters.LargeTest | |
import android.support.test.rule.ActivityTestRule | |
import android.support.test.runner.AndroidJUnit4 | |
import com.mobymagic.shazamclone.R |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<FrameLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:id="@+id/songDetailFragmentContainer" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context="com.mobymagic.shazamclone.songdetail.SongDetailActivity" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:id="@+id/historyFragmentContainer" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context="com.mobymagic.shazamclone.history.HistoryActivity"/> |