add numFrameLabel contains the currentPicture and max picture
authorDralagen <dralagen@dralagen.fr>
Tue, 7 Apr 2015 22:06:04 +0000 (00:06 +0200)
committerDralagen <dralagen@dralagen.fr>
Tue, 7 Apr 2015 22:06:04 +0000 (00:06 +0200)
app/src/main/java/org/alma/rotoscope/DrawingActivity.java
app/src/main/res/layout/activity_drawing.xml

index bbc64ae..9343cfc 100644 (file)
@@ -21,6 +21,7 @@ import android.support.v4.content.FileProvider;
 import android.util.Log;
 import android.view.MotionEvent;
 import android.view.View;
+import android.widget.TextView;
 import org.alma.rotoscope.colorpicker.ColorPickerDialog;
 import org.jcodec.api.SequenceEncoder;
 import org.jcodec.common.model.ColorSpace;
@@ -307,6 +308,8 @@ public class DrawingActivity extends Activity implements View.OnTouchListener {
       drawingArea.setBackground(new BitmapDrawable(getResources(), currentFrame));
     }
 
+    ((TextView)findViewById(R.id.numFrameLabel)).setText(currentPicture + 1 + "/" + layers.size());
+
     findViewById(R.id.PreviousButton).setVisibility((currentPicture != 0) ? View.VISIBLE : View.INVISIBLE);
     findViewById(R.id.NextButton).setVisibility((currentPicture < layers.size() - 1) ? View.VISIBLE : View.INVISIBLE);
   }
index 7e81d20..bf665c9 100644 (file)
             android:src="@drawable/ic_action_next_item" android:contentDescription="@string/button_nextButton"
                  android:layout_marginTop="0dp" android:layout_alignParentRight="true" android:clickable="true"
                android:scaleType="fitXY"/>
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:textAppearance="?android:attr/textAppearanceMedium"
+        android:id="@+id/numFrameLabel" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true"/>
   </RelativeLayout>
   <LinearLayout
       android:orientation="vertical"