add icons

This commit is contained in:
tibbi 2016-06-02 15:06:50 +02:00
parent 2c16e1ccef
commit ddf942062f
28 changed files with 14 additions and 10 deletions

View File

@ -17,7 +17,7 @@ import butterknife.OnClick;
public class MainActivity extends AppCompatActivity {
@BindView(R.id.viewHolder) RelativeLayout viewHolder;
@BindView(R.id.toggle_camera) View toggleCameraBtn;
@BindView(R.id.toggle_camera) ImageView toggleCameraBtn;
@BindView(R.id.toggle_flash) ImageView toggleFlashBtn;
private Preview preview;
@ -42,8 +42,10 @@ public class MainActivity extends AppCompatActivity {
public void toggleCamera() {
if (currCamera == Camera.CameraInfo.CAMERA_FACING_BACK) {
currCamera = Camera.CameraInfo.CAMERA_FACING_FRONT;
toggleCameraBtn.setImageResource(R.mipmap.camera_rear);
} else {
currCamera = Camera.CameraInfo.CAMERA_FACING_BACK;
toggleCameraBtn.setImageResource(R.mipmap.camera_front);
}
disableFlash();

View File

@ -16,26 +16,26 @@
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="@dimen/preview_btn_margin"
android:gravity="center_horizontal">
android:gravity="center_horizontal|bottom">
<ImageView
android:id="@+id/toggle_camera"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="@dimen/side_icon_size"
android:layout_height="@dimen/side_icon_size"
android:layout_weight="1"
android:src="@mipmap/ic_launcher"/>
android:src="@mipmap/camera_front"/>
<ImageView
android:id="@+id/shutter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="@dimen/main_icon_size"
android:layout_height="@dimen/main_icon_size"
android:layout_weight="1"
android:src="@mipmap/ic_launcher"/>
android:src="@mipmap/camera"/>
<ImageView
android:id="@+id/toggle_flash"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="@dimen/side_icon_size"
android:layout_height="@dimen/side_icon_size"
android:layout_weight="1"
android:src="@mipmap/flash_off"/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 758 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 386 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 875 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 745 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 875 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 516 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 B

View File

@ -1,4 +1,6 @@
<resources>
<dimen name="activity_margin">16dp</dimen>
<dimen name="preview_btn_margin">32dp</dimen>
<dimen name="side_icon_size">36dp</dimen>
<dimen name="main_icon_size">48dp</dimen>
</resources>