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