add the properties dialog to viewpager items
This commit is contained in:
parent
b3fa4bf880
commit
a5fc444ba3
|
@ -19,6 +19,7 @@ import android.widget.EditText;
|
|||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.simplemobiletools.fileproperties.dialogs.PropertiesDialog;
|
||||
import com.simplemobiletools.gallery.Constants;
|
||||
import com.simplemobiletools.gallery.MyViewPager;
|
||||
import com.simplemobiletools.gallery.R;
|
||||
|
@ -164,6 +165,9 @@ public class ViewPagerActivity extends SimpleActivity
|
|||
case R.id.menu_edit:
|
||||
openEditor();
|
||||
return true;
|
||||
case R.id.menu_properties:
|
||||
showProperties();
|
||||
return true;
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
@ -212,6 +216,10 @@ public class ViewPagerActivity extends SimpleActivity
|
|||
}
|
||||
}
|
||||
|
||||
private void showProperties() {
|
||||
new PropertiesDialog(this, getCurrentFile().getAbsolutePath(), false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
if (requestCode == EDIT_IMAGE) {
|
||||
|
|
|
@ -24,6 +24,11 @@
|
|||
android:icon="@mipmap/rename"
|
||||
android:title="@string/rename"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/menu_properties"
|
||||
android:icon="@mipmap/info"
|
||||
android:title="@string/properties"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/menu_delete"
|
||||
android:icon="@mipmap/delete"
|
||||
|
|
Loading…
Reference in New Issue