Search in sources :

Example 1 with CountriesAdapter

use of com.hannesdorfmann.mosby3.sample.mvp.CountriesAdapter in project mosby by sockeqwe.

the class CountriesActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.countries_list);
    ButterKnife.bind(this);
    // Setup contentView == SwipeRefreshView
    contentView.setOnRefreshListener(this);
    // Setup recycler view
    adapter = new CountriesAdapter(this);
    recyclerView.setLayoutManager(new LinearLayoutManager(this));
    recyclerView.setAdapter(adapter);
    loadData(false);
}
Also used : CountriesAdapter(com.hannesdorfmann.mosby3.sample.mvp.CountriesAdapter) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager)

Example 2 with CountriesAdapter

use of com.hannesdorfmann.mosby3.sample.mvp.CountriesAdapter in project mosby by sockeqwe.

the class CountriesFragment method onViewCreated.

@Override
public void onViewCreated(View view, @Nullable Bundle savedInstance) {
    super.onViewCreated(view, savedInstance);
    unbinder = ButterKnife.bind(this, view);
    // Setup contentView == SwipeRefreshView
    contentView.setOnRefreshListener(this);
    // Setup recycler view
    adapter = new CountriesAdapter(getActivity());
    recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
    recyclerView.setAdapter(adapter);
    loadData(false);
}
Also used : CountriesAdapter(com.hannesdorfmann.mosby3.sample.mvp.CountriesAdapter) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager)

Example 3 with CountriesAdapter

use of com.hannesdorfmann.mosby3.sample.mvp.CountriesAdapter in project mosby by sockeqwe.

the class NotRetainingCountriesFragment method onViewCreated.

@Override
public void onViewCreated(View view, @Nullable Bundle savedInstance) {
    super.onViewCreated(view, savedInstance);
    unbinder = ButterKnife.bind(this, view);
    // Setup contentView == SwipeRefreshView
    contentView.setOnRefreshListener(this);
    // Setup recycler view
    adapter = new CountriesAdapter(getActivity());
    recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
    recyclerView.setAdapter(adapter);
}
Also used : CountriesAdapter(com.hannesdorfmann.mosby3.sample.mvp.CountriesAdapter) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager)

Example 4 with CountriesAdapter

use of com.hannesdorfmann.mosby3.sample.mvp.CountriesAdapter in project mosby by sockeqwe.

the class CountriesLayout method onFinishInflate.

@Override
protected void onFinishInflate() {
    super.onFinishInflate();
    ButterKnife.bind(this, this);
    contentView.setOnRefreshListener(this);
    adapter = new CountriesAdapter(getContext());
    recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
    recyclerView.setAdapter(adapter);
}
Also used : CountriesAdapter(com.hannesdorfmann.mosby3.sample.mvp.CountriesAdapter) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager)

Example 5 with CountriesAdapter

use of com.hannesdorfmann.mosby3.sample.mvp.CountriesAdapter in project mosby by sockeqwe.

the class NotRetainingCountriesActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.countries_list);
    ButterKnife.bind(this);
    // Setup contentView == SwipeRefreshView
    contentView.setOnRefreshListener(this);
    // Setup recycler view
    adapter = new CountriesAdapter(this);
    recyclerView.setLayoutManager(new LinearLayoutManager(this));
    recyclerView.setAdapter(adapter);
}
Also used : CountriesAdapter(com.hannesdorfmann.mosby3.sample.mvp.CountriesAdapter) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager)

Aggregations

LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)6 CountriesAdapter (com.hannesdorfmann.mosby3.sample.mvp.CountriesAdapter)6