This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyActivity implements MyDialogFragment.Listener { | |
// ... | |
@Override | |
public void onMyEvent() { | |
// do something here | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyActivity extends implements MyFragment.MyFragmentListener { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE); | |
setContentView(R.layout.activity_with_fragment); | |
MyFragment myFragment = new MyFragment(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyDialogFragment extends DialogFragment { | |
@Override | |
public void onCreate(final Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setStyle(STYLE_NO_TITLE, 0); | |
} | |
@Override | |
public void setupDialog(final Dialog dialog, int style) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyActivity { | |
private RecyclerView recyclerView; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_my); | |
recyclerView = (RecyclerView) findViewById(R.id.recycler_view_categories); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyActivity implements MyAdapter.MyAdapterListener { | |
... | |
@Override | |
public void onMyAdapterButtonClicked(Message message) { | |
// Some stuff | |
} | |
} |