Skip to content

Commit 8049e62

Browse files
committed
changes
1 parent f5fc918 commit 8049e62

File tree

6 files changed

+54
-61
lines changed

6 files changed

+54
-61
lines changed

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ dependencies {
3636
implementation 'androidx.core:core-ktx:1.3.1'
3737
implementation 'androidx.appcompat:appcompat:1.2.0'
3838
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
39-
// implementation project(path: ':customcamera')
39+
implementation project(path: ':customcamera')
4040
testImplementation 'junit:junit:4.12'
4141
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
4242
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
@@ -51,5 +51,5 @@ dependencies {
5151
// implementation "androidx.camera:camera-view:1.0.0-alpha16"
5252

5353
// Custom Camera
54-
implementation 'com.github.Priyansh-Kedia:CustomCamera:1.1'
54+
// implementation 'com.github.Priyansh-Kedia:CustomCamera:1.1'
5555
}

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@
99
android:roundIcon="@mipmap/ic_launcher_round"
1010
android:supportsRtl="true"
1111
android:theme="@style/AppTheme">
12-
<activity android:name=".MainActivity">
12+
<activity android:name=".Main2Activity">
1313
<intent-filter>
1414
<action android:name="android.intent.action.MAIN" />
15-
1615
<category android:name="android.intent.category.LAUNCHER" />
1716
</intent-filter>
1817
</activity>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.kedia.cameracustom
2+
3+
import android.graphics.Bitmap
4+
import androidx.appcompat.app.AppCompatActivity
5+
import android.os.Bundle
6+
import com.kedia.customcamera.CCMultiple
7+
8+
class Main2Activity : AppCompatActivity(), CCMultiple.CustomMultiple {
9+
override fun onCreate(savedInstanceState: Bundle?) {
10+
super.onCreate(savedInstanceState)
11+
setContentView(R.layout.activity_main2)
12+
}
13+
14+
override fun onConfirmImagesClicked(imageArrayList: MutableList<Bitmap?>) {
15+
TODO("Not yet implemented")
16+
}
17+
}

app/src/main/java/com/kedia/cameracustom/MainActivity.kt

Lines changed: 0 additions & 24 deletions
This file was deleted.

app/src/main/res/layout/activity_main.xml renamed to app/src/main/res/layout/activity_main2.xml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@
44
xmlns:tools="http://schemas.android.com/tools"
55
android:layout_width="match_parent"
66
android:layout_height="match_parent"
7-
tools:context=".MainActivity">
7+
tools:context=".Main2Activity">
8+
89

910
<com.kedia.customcamera.CCMultiple
1011
android:layout_width="match_parent"
1112
android:layout_height="match_parent"
12-
app:showSnapButton="true"
13-
app:showNoPermissionToast="true"
14-
android:id="@+id/cc"
15-
app:snapButtonColor="@color/colorAccent" />
13+
android:id="@+id/cc" />
1614

1715
</androidx.constraintlayout.widget.ConstraintLayout>

customcamera/src/main/res/layout/item_image.xml

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,43 @@
44
xmlns:tools="http://schemas.android.com/tools"
55
android:layout_width="wrap_content"
66
android:layout_height="wrap_content"
7-
android:layout_marginHorizontal="5dp">
7+
android:layout_marginHorizontal="5dp"
8+
android:background="#00000000">
89

9-
<androidx.cardview.widget.CardView
10+
<androidx.constraintlayout.widget.ConstraintLayout
1011
android:layout_width="wrap_content"
1112
android:layout_height="wrap_content"
13+
android:background="#00000000"
1214
app:layout_constraintStart_toStartOf="parent"
1315
app:layout_constraintTop_toTopOf="parent">
1416

15-
<androidx.constraintlayout.widget.ConstraintLayout
16-
android:layout_width="wrap_content"
17-
android:layout_height="wrap_content">
17+
<ImageView
18+
android:id="@+id/cancelImage"
19+
android:layout_width="20dp"
20+
android:layout_height="20dp"
21+
android:elevation="1dp"
22+
android:scaleType="centerCrop"
23+
android:src="@drawable/ic_cross"
24+
android:tint="#fff"
25+
app:layout_constraintBottom_toBottomOf="@id/image"
26+
app:layout_constraintEnd_toEndOf="@id/image"
27+
app:layout_constraintHorizontal_bias="1"
28+
app:layout_constraintStart_toStartOf="@id/image"
29+
app:layout_constraintTop_toTopOf="@id/image"
30+
app:layout_constraintVertical_bias="0"
31+
tools:src="@drawable/ic_cross" />
1832

19-
<ImageView
20-
android:id="@+id/cancelImage"
21-
android:layout_width="20dp"
22-
android:layout_height="20dp"
23-
android:elevation="1dp"
24-
android:scaleType="centerCrop"
25-
android:src="@drawable/ic_cross"
26-
app:layout_constraintEnd_toEndOf="parent"
27-
app:layout_constraintTop_toTopOf="parent"
28-
tools:src="@drawable/ic_cross" />
29-
30-
<ImageView
31-
android:id="@+id/image"
32-
android:layout_width="60dp"
33-
android:layout_height="60dp"
34-
android:elevation="0dp"
35-
android:scaleType="centerCrop"
36-
app:layout_constraintStart_toStartOf="parent"
37-
app:layout_constraintTop_toTopOf="parent"
38-
tools:src="@android:drawable/ic_menu_always_landscape_portrait" />
39-
40-
</androidx.constraintlayout.widget.ConstraintLayout>
41-
</androidx.cardview.widget.CardView>
33+
<ImageView
34+
android:id="@+id/image"
35+
android:layout_width="60dp"
36+
android:layout_height="60dp"
37+
android:elevation="0dp"
38+
android:paddingTop="10dp"
39+
android:paddingEnd="10dp"
40+
android:scaleType="centerCrop"
41+
app:layout_constraintStart_toStartOf="parent"
42+
app:layout_constraintTop_toTopOf="parent"
43+
tools:src="@android:drawable/ic_menu_always_landscape_portrait" />
4244

45+
</androidx.constraintlayout.widget.ConstraintLayout>
4346
</androidx.constraintlayout.widget.ConstraintLayout>

0 commit comments

Comments
 (0)