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 Temp { | |
public View showFloatingView(View contentView) | |
{ | |
final View floatingView = ((LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE)).inflate(R.layout.view_floating, null); | |
final WindowManager windowManager = (WindowManager) getSystemService(WINDOW_SERVICE); | |
final WindowManager.LayoutParams mLayoutParams = new WindowManager.LayoutParams( | |
WindowManager.LayoutParams.WRAP_CONTENT, | |
WindowManager.LayoutParams.WRAP_CONTENT, |
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 AccountHolder extends MvpViewHolder implements AccountView { | |
@InjectPresenter | |
AccountPresenter mAccountPresenter; | |
/** | |
@BindView(R.id.item_account_check_box) | |
CheckBox mCheckBox; | |
... | |
**/ |
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 ScanInteractor { | |
private final DevicesManager devicesManager; | |
public ScanInteractor() { | |
devicesManager = DevicesManager.getInstance(); | |
} | |
public Observable<ScanResultData> getDevices() { | |
return devicesManager |
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 abstract class ViewCommand<View extends MvpView> { | |
private final String mTag; | |
private final Class<? extends StateStrategy> mStateStrategyType; | |
protected ViewCommand(String tag) { | |
this(tag, MvpFacade.getDefaultStrategyClass()); | |
} | |
protected ViewCommand(String tag, Class<? extends StateStrategy> stateStrategyType) { | |
mTag = 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
public class DefaultStateStrategy implements StateStrategy { | |
@Override | |
public <View extends MvpView> void beforeApply(List<ViewCommand<View>> currentState, ViewCommand<View> incomingCommand) { | |
MvpFacade.getDefaultStrategy().beforeApply(currentState, incomingCommand); | |
} | |
@Override | |
public <View extends MvpView> void afterApply(List<ViewCommand<View>> currentState, ViewCommand<View> incomingCommand) { | |
MvpFacade.getDefaultStrategy().afterApply(currentState, incomingCommand); |
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 Watcher implements TextWatcher { | |
private static final char THOUSANDS_SEPARATOR = ' '; | |
private static final char FRACTION_SEPARATOR = ','; | |
private boolean mIsSpaceRemoved; | |
private int mRemovedSpacePosition; | |
private EditText mValueEditText; | |
private InputFilter[] mFilters; | |
public Watcher(EditText valueEditText) { |
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 PlayerActivity extends MvpAppCompatActivity implements PlayerView { | |
@InjectPresenter | |
PlayerPresenter mPlayerPresenter; | |
Player mPlayer; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); |
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 net.senneco.devfest; | |
import android.os.Bundle; | |
import android.support.annotation.StringRes; | |
import android.view.View; | |
import android.widget.ProgressBar; | |
import android.widget.TextView; | |
import com.arellomobile.mvp.MvpAppCompatActivity; | |
import com.arellomobile.mvp.presenter.InjectPresenter; |
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 net.senneco.weatherapp.mvp.presenter; | |
import com.arellomobile.mvp.InjectViewState; | |
import com.arellomobile.mvp.MvpPresenter; | |
import net.senneco.weatherapp.app.WeatherApp; | |
import net.senneco.weatherapp.mvp.common.WeatherAppSchedulers; | |
import net.senneco.weatherapp.mvp.model.data.City; | |
import net.senneco.weatherapp.mvp.model.repository.Repository; | |
import net.senneco.weatherapp.mvp.view.CitiesView; |
NewerOlder