This file contains hidden or 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 LoginActivity extends AppCompatActivity { | |
| LoginActivityPresenter presenter; | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| OkHttpClient okHttpClient = new OkHttpClient(); | |
| RestAdapter.Builder builder = new RestAdapter.Builder(); |
This file contains hidden or 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
| @Scope | |
| public @interface ActivityScope { | |
| } |
This file contains hidden or 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 = { | |
| AppModule.class, | |
| GithubApiModule.class | |
| } | |
| ) | |
| public interface AppComponent { | |
| UserComponent plus(UserModule userModule); |
This file contains hidden or 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 void showLikedSnackbar() { | |
| Snackbar.make(clContent, "Liked!", Snackbar.LENGTH_SHORT).show(); | |
| } |
This file contains hidden or 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 { | |
| @Bind(R.id.tvFlat) | |
| TextView tvFlat; | |
| @Bind(R.id.tvJson) | |
| TextView tvJson; | |
| private RawDataReader rawDataReader; | |
| private ReposListJson reposListJson; |
This file contains hidden or 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 HeavyExternalLibrary { | |
| private boolean initialized = false; | |
| public HeavyExternalLibrary() { | |
| } | |
| public void init() { | |
| try { | |
| Thread.sleep(500); |
This file contains hidden or 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 FlatBuffersParser { | |
| static { | |
| System.loadLibrary("FlatBuffersParser"); | |
| } | |
| public ByteBuffer parseJson(String json, String schema) { | |
| final byte[] bytes = parseJsonNative(json, schema); | |
| return ByteBuffer.wrap(bytes); | |
| } |
This file contains hidden or 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
| ByteBuffer bb = ByteBuffer.wrap(bytes); | |
| ReposList reposListFlat = frogermcs.io.flatbuffs.model.flat.ReposList.getRootAsReposList(bb); |
This file contains hidden or 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
| @Override | |
| public boolean animateAdd(RecyclerView.ViewHolder viewHolder) { | |
| if (viewHolder.getItemViewType() == FeedAdapter.VIEW_TYPE_DEFAULT) { | |
| if (viewHolder.getLayoutPosition() > lastAddAnimatedItem) { | |
| lastAddAnimatedItem++; | |
| runEnterAnimation((FeedAdapter.CellFeedViewHolder) viewHolder); | |
| return false; | |
| } | |
| } |