Skip to content

Commit 482f69e

Browse files
committed
added border for selected camera view
1 parent 4aa17ec commit 482f69e

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

app/src/main/java/it/danieleverducci/ojo/ui/SurveillanceFragment.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ public void onClick(View v) {
277277

278278
}
279279
});
280+
surfaceView.setOnFocusChangeListener((view, hasFocus) -> view.setBackgroundResource(hasFocus ? R.drawable.focus_border : 0));
280281
SurfaceHolder holder = surfaceView.getHolder();
281282

282283
holder.setKeepScreenOn(true);
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<shape xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:shape="rectangle">
3+
<stroke
4+
android:width="1dip"
5+
android:color="@color/white" />
6+
</shape>

0 commit comments

Comments
 (0)