Skip to content

Commit

Permalink
feat: show incoming call activity as dialog instead of full screen
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmadhusudhan committed Jan 11, 2024
1 parent 2d69e86 commit fd0e65b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId = "com.shreekaram.calllogger"
minSdk = 28
targetSdk = 34
versionCode = 5
versionName = "1.4"
versionCode = 6
versionName = "1.5"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down
7 changes: 6 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@
</intent-filter>
</activity>

<activity android:name=".IncomingCallActivity" />
<activity
android:name=".IncomingCallActivity"
android:launchMode="singleInstance"
android:theme="@android:style/Theme.Holo.Dialog"
android:excludeFromRecents="true"
/>

<service
android:name=".AppNotificationService"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ protected void onCreate(Bundle savedInstanceState) {
WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL);
Log.d("IncomingCallActivity: onCreate: ", "flagy");
setContentView(R.layout.activity_incoming_call);
this.setFinishOnTouchOutside(false);
Log.d("IncomingCallActivity: onCreate: ", "flagz");
String number = getIntent().getStringExtra("incomingNumber");
@SuppressLint({"MissingInflatedId", "LocalSuppress"})
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/res/layout/activity_incoming_call.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/white"
android:gravity="center"
>
<TextView
android:layout_width="match_parent"
Expand Down

0 comments on commit fd0e65b

Please sign in to comment.