@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_filter) {
FragmentManager fm = getSupportFragmentManager();
if (userType.equals("İş Arayan"))
filterDialogTitle = "İş İlanları Filtre";
else if (userType.equals("Hizmet Arayan"))
filterDialogTitle = "Hizmet İlanları Filtre";
FilterDialogFragment editNameDialogFragment = FilterDialogFragment.newInstance(filterDialogTitle);
editNameDialogFragment.show(fm, "fragment_edit_name");
return true;
}
return super.onOptionsItemSelected(item);
}
मैं टुकड़ा में जोड़ा में बुला onOptionsItemSelected, लेकिन मैं टी कहा जाता है, अगर मैं MainActivity में जोड़ने के लिए, यह काम करता है, लेकिन मैं टुकड़ा में फोन चाहते हैं 'नहीं था। मैं यह कैसे कर सकता हूँ ?जोड़ें टुकड़ा