Back to project page android-wav-mixer.
The source code is released under:
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Copyright (C) 2014 Nathan Sizemore <nathanrsizemore@gmail.com> Everyone is permitted to copy and distribute verbatim or modified ...
If you think the Android project android-wav-mixer listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.nathansizemore.beatmaker.fragments; /*from w ww . j a va2s .c o m*/ import android.app.Activity; import android.app.Fragment; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.RelativeLayout; import com.example.beatmaker.R; import com.nathansizemore.beatmaker.fragments.interfaces.AttractScreenTouch; public class MainAttract extends Fragment { private RelativeLayout container; private AttractScreenTouch sendEvent; public MainAttract() { } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_attract, container, false); setOnClicks(rootView); return rootView; } @Override public void onAttach(Activity activity) { super.onAttach(activity); try { sendEvent = (AttractScreenTouch)activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement AttractScreenTouch"); } } private void setOnClicks(View view) { container = (RelativeLayout)(view.findViewById(R.id.attract_view)); container.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { sendEvent.onTouch(); } }); } }