Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
Expand Up@@ -67,6 +67,7 @@ import com.itsaky.androidide.fragments.sidebar.EditorSidebarFragment
import com.itsaky.androidide.idetooltips.IDETooltipItem
import com.itsaky.androidide.utils.ContactDetails.EMAIL_SUPPORT
import java.lang.ref.WeakReference
import androidx.core.net.toUri


/**
Expand All@@ -77,7 +78,7 @@ import java.lang.ref.WeakReference
*/

object ContactDetails {
const val EMAIL_SUPPORT = "info@appdevforall.org"
const val EMAIL_SUPPORT = "feedback@appdevforall.org"
}

internal object EditorSidebarActions {
Expand DownExpand Up@@ -286,7 +287,7 @@ internal object EditorSidebarActions {
// Prepare the email intent for reuse
val emailIntent: () -> Unit = {
val intent = Intent(Intent.ACTION_SENDTO).apply {
data = Uri.parse("mailto:$EMAIL_SUPPORT?subject=Feedback about Code on the Go")
data = "mailto:$EMAIL_SUPPORT?subject=Feedback about Code on the Go".toUri()
}
context.startActivity(intent)
}
Expand DownExpand Up@@ -322,6 +323,10 @@ internal object EditorSidebarActions {
emailIntent()
}

// When the send email button is clicked:
binding.btnSendEmail.setOnClickListener {
emailIntent()
}
// Close button action: dismiss the dialog.
binding.btnClose.setOnClickListener {
dialog.dismiss()
Expand Down
17 changes: 15 additions & 2 deletions app/src/main/res/layout/contact_dialog.xml
Original file line numberDiff line numberDiff line change
Expand Up@@ -35,11 +35,24 @@
android:layout_width="wrap_content"
android:layout_height="44dp"
android:layout_marginTop="12dp"
android:layout_marginEnd="8dp"
android:textColor="@color/black"
app:backgroundTint="@null"
android:background="@drawable/rounded_button_bg"
android:text="@string/close"
android:text="@string/cancel"
app:layout_constraintEnd_toStartOf="@+id/btnSendEmail"
app:layout_constraintTop_toBottomOf="@id/tvDescription" />

<Button
android:id="@+id/btnSendEmail"
android:layout_width="wrap_content"
android:layout_height="44dp"
android:layout_marginTop="12dp"
android:textColor="@color/black"
app:backgroundTint="@null"
android:background="@drawable/rounded_button_bg"
android:text="@string/send_email"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvDescription" />

</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
4 changes: 3 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line numberDiff line numberDiff line change
Expand Up@@ -110,9 +110,11 @@ Connected to the target VM, address: \'localhost:46423\', transport: \'socket\'

<string name="msg_internet_access_required">Internet access is required.</string>
<string name="msg_contact_app_dev_title">Contact App Dev for All</string>
<string name="msg_contact_app_dev_description">To report issues, make suggestions, and ask questions, email us at info@appdevforall.org. Internet access is required.</string>
<string name="msg_contact_app_dev_description">To report issues, make suggestions, and ask questions, email us at feedback@appdevforall.org. Internet access is required.</string>
<string name="code_on_the_go">Code on the Go</string>
<string name="msg_no_internet_no_problem">No computer? No Internet?\nNo problem.</string>
<string name="offline_message">Offline</string>
<string name="more_label">More</string>
<string name="send_email">Send Email</string>
<string name="close">Close</string>
</resources>