Back to project page volumescheduler.
The source code is released under:
GNU General Public License
If you think the Android project volumescheduler listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/* * Copyright (c) 2014 RuneCasters IT Solutions. */*w ww .j a v a2s . c o m*/ * This file is part of VolumeScheduler. * * VolumeScheduler is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * VolumeScheduler is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with VolumeScheduler. If not, see <http://www.gnu.org/licenses/>. */ package au.com.runecasters.volumescheduler.app; import android.app.Activity; import android.app.Fragment; import android.os.Bundle; import android.view.*; import android.widget.Button; import au.com.runecasters.volumescheduler.R; public class AboutActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_about); if (savedInstanceState == null) { getFragmentManager().beginTransaction() .add(R.id.container, new PlaceholderFragment()) .commit(); } } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.about, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { return super.onOptionsItemSelected(item); } /** * A placeholder fragment containing a simple view. */ public static class PlaceholderFragment extends Fragment { public PlaceholderFragment() { } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_about, container, false); Button buttonLicence = (Button) rootView.findViewById(R.id.buttonLicence); buttonLicence.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { View scrollViewAbout = getActivity().findViewById(R.id.scrollViewAbout); View scrollViewLicence = getActivity().findViewById(R.id.scrollViewLicence); scrollViewAbout.setVisibility(View.GONE); scrollViewLicence.setVisibility(View.VISIBLE); } }); return rootView; } } }