@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_about_us, container, false); simulateDayNight(0); ButterKnife.bind(this, view); View aboutPage = new AboutPage(getActivity()) .isRTL(false) .setImage(R.drawable.logo200x200) .setDescription(getString(R.string.about_us_description)) .addGroup("Connect with us") .addEmail("pslab-fossasia@googlegroups.com") .addWebsite("http://pslab.fossasia.org/") .addGitHub("fossasia?utf8=✓&q=pslab") .addFacebook("pslabapp") .addTwitter("pslabapp") .addYoutube("UCQprMsG-raCIMlBudm20iLQ") .create(); appBarLayout.addView(aboutPage, -1); return view; }
private void disableSearchMode() { if (searchMode) { searchMode = false; //display tabs again AppBarLayout appbar = (AppBarLayout) findViewById(R.id.appbar); appbar.removeView(tabLayout); //make sure we're not adding the tabLayout while it's already there appbar.addView(tabLayout); //display floating button mFab.setVisibility(View.VISIBLE); //hide searchbar mSearchBar.setVisibility(View.GONE); //refresh the fragment display mViewPager.setAdapter(null); mViewPager.setAdapter(mSectionsPagerAdapter); } }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_about); Toolbar toolbar = findViewById(R.id.toolbar); setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayShowHomeEnabled(true); setTitle("About"); AppBarLayout appBarLayout; appBarLayout = findViewById(R.id.appBarAnim); View aboutPage = new AboutPage(this) .isRTL(false) .setImage(R.mipmap.ic_launcher) .setDescription(getString(R.string.about_us_description)) .addGroup("Find out More") .addEmail("pepperfriday1010@gmail.com") .addGitHub("UdacityAndroidBasicsScholarship/wmn-safety") .create(); appBarLayout.addView(aboutPage,-1); }