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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
</head> | |
<body> | |
<h1>Hello World!</h1> | |
<!-- All of the Node.js APIs are available in this renderer process. --> | |
We are using Node.js <script>document.write(process.versions.node)</script>, |
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
private static volatile RESTService instance; | |
protected RESTService(Context context) { | |
super(context); | |
} | |
public static RESTService getInstance(Context context) { | |
if (instance == null) { | |
synchronized (RESTService.class) { | |
if (instance == null) instance = new RESTService(context); | |
} |
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
public class MapAnimator { | |
private static MapAnimator mapAnimator; | |
private Polyline backgroundPolyline; | |
private Polyline foregroundPolyline; | |
private PolylineOptions optionsForeground; |
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
class MyCagriPoolRecyclerViewAdapter : ListAdapter<DummyItem, RecyclerView.ViewHolder>(MyCagriPoolRecyclerViewAdapter.DIFF_CALLBACK()) { | |
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder { | |
val view: View | |
return when (viewType) { | |
1 -> { | |
view = LayoutInflater.from(parent.context).inflate(R.layout.item_cagripool, parent, false) | |
ViewHolder1(view) | |
} | |
else -> { |
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
public class App extends Application implements HasActivityInjector, HasServiceInjector { | |
@Inject | |
DispatchingAndroidInjector<Activity> dispatchingActivityInjector; | |
@Inject | |
DispatchingAndroidInjector<Service> dispatchingServiceInjector; | |
@Override | |
public void onCreate() { | |
super.onCreate(); |
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
@Singleton | |
@Component( | |
modules = { | |
MainActivityModule.class, | |
ApiManagerModule.class | |
}) | |
public interface MainActivityComponent { | |
void inject(MainActivity mainActivity); | |
// Bunu burda belirtmek zorunda değiliz. Burda belirttiğimizde DaggerMainActivityComponent.builder() ile oluşturulan |
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
public class MainActivity extends AppCompatActivity { | |
@Inject | |
ApiManager apiManager; | |
@Override | |
protected void onCreate(@Nullable Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); |
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
interface ApiService { | |
@GET("users/{username}") | |
fun getUser(@Path("username") username: String): Call<User> | |
} |
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
class ApiManager(private val apiService: ApiService) { | |
fun getUser(username: String): Call<User> { | |
return apiService.getUser(username) | |
} | |
} |