-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added network connection verification
Added message when there is no network connection and user tries to use the.
- Loading branch information
Vitor Poncell
committed
Dec 16, 2019
1 parent
d5aaee8
commit 559757b
Showing
11 changed files
with
164 additions
and
16 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:viewportWidth="24.0" | ||
android:viewportHeight="24.0"> | ||
<path | ||
android:fillColor="#FF000000" | ||
android:pathData="M19.35,10.04C18.67,6.59 15.64,4 12,4c-1.48,0 -2.85,0.43 -4.01,1.17l1.46,1.46C10.21,6.23 11.08,6 12,6c3.04,0 5.5,2.46 5.5,5.5v0.5H19c1.66,0 3,1.34 3,3 0,1.13 -0.64,2.11 -1.56,2.62l1.45,1.45C23.16,18.16 24,16.68 24,15c0,-2.64 -2.05,-4.78 -4.65,-4.96zM3,5.27l2.75,2.74C2.56,8.15 0,10.77 0,14c0,3.31 2.69,6 6,6h11.73l2,2L21,20.73 4.27,4 3,5.27zM7.73,10l8,8H6c-2.21,0 -4,-1.79 -4,-4s1.79,-4 4,-4h1.73z"/> | ||
</vector> |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<dimen name="card_session_height">147dp</dimen> | ||
<dimen name="ic_no_network_size">50sp</dimen> | ||
<dimen name="no_network_text_size">20sp</dimen> | ||
<dimen name="no_network_margin">20sp</dimen> | ||
</resources> |
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
14 changes: 6 additions & 8 deletions
14
...java/br/org/cesar/discordtime/stickysessions/injectors/components/TestMeetingComponent.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,20 @@ | ||
package br.org.cesar.discordtime.stickysessions.injectors.components | ||
|
||
import br.org.cesar.discordtime.stickysessions.injectors.modules.MeetingPresenterModule | ||
import br.org.cesar.discordtime.stickysessions.injectors.modules.TestHttpModule | ||
import br.org.cesar.discordtime.stickysessions.injectors.modules.TestMeetingModule | ||
import br.org.cesar.discordtime.stickysessions.injectors.modules.TestNavigationModule | ||
import br.org.cesar.discordtime.stickysessions.injectors.modules.TestServerModule | ||
import br.org.cesar.discordtime.stickysessions.injectors.modules.TestSessionModule | ||
import br.org.cesar.discordtime.stickysessions.injectors.modules.* | ||
import br.org.cesar.discordtime.stickysessions.presentation.meeting.MeetingPresenterTest | ||
import dagger.Component | ||
import javax.inject.Singleton | ||
|
||
@Singleton | ||
@Component(modules = [ | ||
TestMeetingModule::class, | ||
MeetingPresenterModule::class, | ||
TestSessionModule::class, | ||
TestServerModule::class, | ||
TestNavigationModule::class, | ||
TestHttpModule::class | ||
TestHttpModule::class, | ||
TestNetworkModule::class | ||
]) | ||
interface TestMeetingComponent { | ||
fun inject(integrationTest: MeetingPresenterTest) | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
.../test/java/br/org/cesar/discordtime/stickysessions/injectors/modules/TestNetworkModule.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package br.org.cesar.discordtime.stickysessions.injectors.modules | ||
|
||
import br.org.cesar.discordtime.stickysessions.data.remote.wrapper.INetworkWrapper | ||
import com.nhaarman.mockito_kotlin.mock | ||
import dagger.Module | ||
import dagger.Provides | ||
import javax.inject.Singleton | ||
|
||
@Module | ||
class TestNetworkModule { | ||
|
||
@Provides | ||
@Singleton | ||
fun provideNetworkWrapper(): INetworkWrapper { | ||
return mock() | ||
} | ||
} |
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