Back to project page InfuseFactory.
The source code is released under:
/** * Copyright (c) 2014 Lazu Ioan-Bogdan * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from ...
If you think the Android project InfuseFactory 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.example.other.ui.listener; /*from ww w.jav a2 s . c om*/ import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.ListView; import com.example.infuseexample.R; import com.factory.infuse.annotation.Infuse; import com.factory.infuse.annotation.InfuseView; public class HideListener implements OnClickListener { private static final String TAG = "HIDE_LISTENER"; @InfuseView(R.id.listView1) private ListView mToHide; @InfuseView(R.id.buttonHide) private Button mHide; @Infuse private ListListener mListener; @Override public void onClick(View v) { Log.d(TAG, "Hiding list!"); if(mToHide.getVisibility() == View.INVISIBLE) { mHide.setText("Make invisible"); mToHide.setVisibility(View.VISIBLE); } else { mHide.setText("Make visible"); mToHide.setVisibility(View.INVISIBLE); } mListener.reactToHide(); } }