@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_tips_and_advice); initialize(); if (Util.isInternetConnection(TipsAndAdvice.this)) new GetTips().execute(); }
private void initialize() { category = Util.getSharedPrefrenceValue(getApplicationContext(), Constant.SP_DEALER_CATEGORY); recList = (RecyclerView) findViewById(R.id.dealer_added_categoryList); recList.setHasFixedSize(true); final LinearLayoutManager llm = new LinearLayoutManager(this); llm.setOrientation(LinearLayoutManager.VERTICAL); recList.setLayoutManager(llm); toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); ActionBar actionBar = getSupportActionBar(); actionBar.setHomeButtonEnabled(true); actionBar.setDisplayHomeAsUpEnabled(true); objDealerProfileCategoryAdapter = new ProfileCategoryAdapter(getApplicationContext(), "10"); recList.setAdapter(objDealerProfileCategoryAdapter); }