add the properties dialog to viewpager items

This commit is contained in:
tibbi 2016-11-03 23:27:09 +01:00
parent b3fa4bf880
commit a5fc444ba3
2 changed files with 13 additions and 0 deletions

View File

@ -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) {

View File

@ -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"