Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:fitsSystemWindows="true"
- android:id="@+id/maintoolbar">
- <android.support.design.widget.AppBarLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:theme="@style/AppBarOverlay">
- <android.support.v7.widget.Toolbar
- android:id="@+id/toolbar"
- android:layout_width="match_parent"
- android:layout_height="?attr/actionBarSize"
- android:background="@color/colorPrimary"
- app:popupTheme="@style/PopupOverlay"
- app:title="H20 Droid App " />
- </android.support.design.widget.AppBarLayout>
- <FrameLayout
- android:id="@+id/frame"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- app:layout_behavior="@string/appbar_scrolling_view_behavior"></FrameLayout>
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:id="@+id/buttonlayout">
- <include
- layout="@layout/buttons"/>
- </LinearLayout>
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:id="@+id/newlayout"
- android:visibility="gone">
- <include
- layout="@layout/buttons" />
- </LinearLayout>
- cb6.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
- @Override
- public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
- if (cb6.isChecked()) {
- editor.putBoolean("alt_layout",true);
- editor.putBoolean("checkbox6state", true);
- editor.commit();
- Log.i("Alt_Layout: ", "Activated");
- }else{
- editor.putBoolean("alt_layout",false);
- editor.putBoolean("checkbox6state", false);
- editor.commit();
- Log.i("Alt_Layout: ","Deactivated");
- }
- }
- });
- Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
- sharedpreferences = PreferenceManager.getDefaultSharedPreferences(this);
- boolean layout_alt = sharedpreferences.getBoolean("alt_layout",false);
- if (layout_alt==true){
- LinearLayout llnew= (LinearLayout)findViewById(R.id.newlayout);
- LinearLayout llnorm = (LinearLayout)findViewById(R.id.buttonlayout);
- llnew.setVisibility(View.VISIBLE);
- llnorm.setVisibility(View.GONE);
- }
Add Comment
Please, Sign In to add comment