-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Android - Made About layout and improve codes
- Loading branch information
1 parent
4d03d23
commit b194941
Showing
11 changed files
with
195 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
SlidesRemote/app/src/main/java/com/houarizegai/slidesremote/activities/AboutActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package com.houarizegai.slidesremote.activities; | ||
|
||
import android.content.ClipData; | ||
import android.content.ClipboardManager; | ||
import android.content.Context; | ||
import android.content.Intent; | ||
import android.net.Uri; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
|
||
import androidx.appcompat.app.AppCompatActivity; | ||
|
||
import com.houarizegai.slidesremote.R; | ||
|
||
public class AboutActivity extends AppCompatActivity { | ||
|
||
private ClipboardManager clipboard; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_about); | ||
|
||
clipboard = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE); | ||
} | ||
|
||
public void onCopyEmail(View view) { | ||
String email = getString(R.string.company_email); | ||
|
||
ClipData clip = ClipData.newPlainText("Email", email); | ||
clipboard.setPrimaryClip(clip); | ||
} | ||
|
||
public void onCopyPhone(View view) { | ||
String phone = getString(R.string.company_phone); | ||
|
||
ClipData clip = ClipData.newPlainText("Phone", phone); | ||
clipboard.setPrimaryClip(clip); | ||
} | ||
|
||
public void onVisitWebsite(View view) { | ||
String website = getString(R.string.company_website); | ||
|
||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(website)); | ||
startActivity(browserIntent); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<vector android:height="28dp" android:tint="#EEEEEE" | ||
android:viewportHeight="24.0" android:viewportWidth="24.0" | ||
android:width="28dp" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<path android:fillColor="#FF000000" android:pathData="M16,1L4,1c-1.1,0 -2,0.9 -2,2v14h2L4,3h12L16,1zM19,5L8,5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h11c1.1,0 2,-0.9 2,-2L21,7c0,-1.1 -0.9,-2 -2,-2zM19,21L8,21L8,7h11v14z"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<vector android:height="32dp" android:tint="@color/colorSecondary" | ||
android:viewportHeight="24.0" android:viewportWidth="24.0" | ||
android:width="32dp" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<path android:fillColor="#FF000000" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-6h2v6zM13,9h-2L11,7h2v2z"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<vector android:height="32dp" android:tint="#EEE" | ||
android:viewportHeight="24.0" android:viewportWidth="24.0" | ||
android:width="32dp" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<path android:fillColor="#FF000000" android:pathData="M19,19H5V5h7V3H5c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2v-7h-2v7zM14,3v2h3.59l-9.83,9.83 1.41,1.41L19,6.41V10h2V3h-7z"/> | ||
</vector> |
This file was deleted.
Oops, something went wrong.
108 changes: 108 additions & 0 deletions
108
SlidesRemote/app/src/main/res/layout/activity_about.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical" | ||
android:gravity="center" | ||
android:background="@color/colorPrimary" | ||
tools:context=".activities.AboutActivity"> | ||
<LinearLayout | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:orientation="horizontal" | ||
android:gravity="center"> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/company_name" | ||
android:textSize="30sp" | ||
android:textColor="@color/colorSecondary" /> | ||
|
||
<ImageView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:src="@drawable/ic_open_in_new" | ||
android:onClick="onVisitWebsite" | ||
android:layout_marginLeft="15dp"/> | ||
|
||
</LinearLayout> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="10dp" | ||
android:text="@string/company_description" | ||
android:textSize="22sp" | ||
android:textColor="#EEE"/> | ||
|
||
<LinearLayout | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:orientation="vertical" | ||
android:layout_marginTop="20dp"> | ||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="horizontal"> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_weight="1" | ||
android:text="Email: " | ||
android:textColor="#EEEE" | ||
android:textSize="22dp" /> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_weight="1" | ||
android:text="@string/company_email" | ||
android:textColor="#EEEE" | ||
android:textSize="22dp" /> | ||
|
||
<ImageView | ||
android:layout_width="wrap_content" | ||
android:layout_height="match_parent" | ||
android:layout_marginLeft="5dp" | ||
android:onClick="onCopyEmail" | ||
android:src="@drawable/ic_content_copy" /> | ||
</LinearLayout> | ||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="horizontal" | ||
android:layout_gravity="center" | ||
android:layout_marginTop="5dp"> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_weight="1" | ||
android:text="Phone: " | ||
android:textColor="#EEEE" | ||
android:textSize="22dp" /> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_weight="1" | ||
android:text="@string/company_phone" | ||
android:textColor="#EEEE" | ||
android:textSize="22dp" /> | ||
|
||
<ImageView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginLeft="5dp" | ||
android:onClick="onCopyPhone" | ||
android:src="@drawable/ic_content_copy" /> | ||
</LinearLayout> | ||
</LinearLayout> | ||
|
||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
<resources> | ||
<string name="app_name">Slides Remote</string> | ||
<string name="remote_control_activity_name">Remote Control</string> | ||
<string name="company_name">SoftbrainsDZ</string> | ||
<string name="company_description">Multi-Platform Development Company</string> | ||
<string name="company_email">engzegai@gmail.com</string> | ||
<string name="company_phone">+213 (0) 797603258</string> | ||
<string name="company_website">https://softbrainsdz.github.io</string> | ||
</resources> |