forked from maoruibin/TranslateApp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request maoruibin#47 from maoruibin/develop
Develop
- Loading branch information
Showing
61 changed files
with
494 additions
and
2,130 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 |
---|---|---|
|
@@ -27,6 27,7 @@ | |
import dagger.Component; | ||
import name.gudong.translate.GDApplication; | ||
import name.gudong.translate.mvp.model.ApiBaidu; | ||
import name.gudong.translate.mvp.model.ApiGoogle; | ||
import name.gudong.translate.mvp.model.ApiJinShan; | ||
import name.gudong.translate.mvp.model.ApiYouDao; | ||
import name.gudong.translate.mvp.model.SingleRequestService; | ||
|
@@ -37,6 38,8 @@ | |
/** | ||
* Created by GuDong on 12/27/15 16:41. | ||
* Contact with [email protected]. | ||
* | ||
* Updated by Levine on 2/21/17 add google api | ||
*/ | ||
@Singleton | ||
@Component(modules = {AppModule.class,ApiServiceModel.class}) | ||
|
@@ -54,6 57,8 @@ public interface AppComponent { | |
|
||
ApiBaidu getApiBaidu(); | ||
|
||
ApiGoogle getApiGoogle(); | ||
|
||
SingleRequestService getDwnloadService(); | ||
|
||
} |
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 |
---|---|---|
|
@@ -29,6 29,7 @@ | |
import dagger.Provides; | ||
import name.gudong.translate.BuildConfig; | ||
import name.gudong.translate.mvp.model.ApiBaidu; | ||
import name.gudong.translate.mvp.model.ApiGoogle; | ||
import name.gudong.translate.mvp.model.ApiJinShan; | ||
import name.gudong.translate.mvp.model.ApiYouDao; | ||
import name.gudong.translate.mvp.model.SingleRequestService; | ||
|
@@ -43,6 44,8 @@ | |
/** | ||
* Created by GuDong on 12/27/15 16:17. | ||
* Contact with [email protected]. | ||
* | ||
* Updated by Levine on 2/21/17 add google api | ||
*/ | ||
@Module | ||
public class ApiServiceModel { | ||
|
@@ -76,6 79,10 @@ ApiJinShan provideApiJinShan() { | |
return createService(ETranslateFrom.JIN_SHAN); | ||
} | ||
|
||
@Provides | ||
@Singleton | ||
ApiGoogle provideApiGoogle(){return createService(ETranslateFrom.GOOGLE);} | ||
|
||
private <S> S createService(ETranslateFrom type) { | ||
Retrofit.Builder builder = new Retrofit.Builder() | ||
.baseUrl(HttpUrl.parse(type.getUrl())) | ||
|
32 changes: 0 additions & 32 deletions
32
app/src/main/java/name/gudong/translate/listener/AlarmReceiver.java
This file was deleted.
Oops, something went wrong.
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
33 changes: 0 additions & 33 deletions
33
app/src/main/java/name/gudong/translate/manager/AlarmManagers.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.