Skip to content

Instantly share code, notes, and snippets.

View egemenmede's full-sized avatar
🏠
Working from home

Egemen MEDE egemenmede

🏠
Working from home
View GitHub Profile
@egemenmede
egemenmede / AdbCommands
Created July 21, 2021 13:31 — forked from pantasio/AdbCommands
Adb useful commands list
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
== Shell
package com.dp.retrofitbookdemo1;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class Owner {
@SerializedName("login")
@Expose
private String login;
package com.dp.retrofitbookdemo1;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class Repo {
@SerializedName("id")
@Expose
private Long id;
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
import android.support.annotation.NonNull;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
public interface ${NAME}Api {
interface ${NAME}ServiceCallback<T> extends Callback<T> {
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
import android.content.Context;
import android.support.annotation.NonNull;
import retrofit2.Call;
import retrofit2.Response;
public class ${NAME}PresenterImpl extends BasePresenter implements ${NAME}Presenter {
private Context mContext;
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
public interface ${NAME}Presenter {
//void loadData();
}
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
public interface ${NAME}View {
void showProgress();
void hideProgress();
void customToolbarView(int menuIcon, String titleText);
void showConnectionError();
}
@egemenmede
egemenmede / gist:a6d57c692f70c325d37a83551e7d0bf6
Created February 20, 2018 06:49
RecyclerView Adaptor File Template (Example: TestAdapter, MyViewHolder, CountryResponse, card_item)
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import java.util.List;
#parse("File Header.java")
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
@egemenmede
egemenmede / gist:8a30eb240df7a55460a46e224dcb962e
Created November 9, 2017 08:39
Bildirim Çubuğunu şeffaf hale getirme.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Window window = getWindow();
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
window.setStatusBarColor(Color.TRANSPARENT);
}