Skip to content

Commit

Permalink
Merge pull request #65 from Suryansh1720001/link_Source_Code
Browse files Browse the repository at this point in the history
Access the Code data
  • Loading branch information
NehaVns authored Feb 11, 2024
2 parents ac2e1b7 + 6012963 commit b0a34fd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/src/main/java/com/weather/weatherapp/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ class MainActivity : AppCompatActivity() {
R.id.ic_feedback -> feedback()
R.id.ic_share -> share()
R.id.ic_privacy -> privacy()
R.id.ic_share_Code -> openLink("https://github.com/NehaVns/Weather-Forecasting")
R.id.ic_open -> Open_souce()
}
closeDrawer()
Expand All @@ -149,6 +150,12 @@ class MainActivity : AppCompatActivity() {
}


private fun openLink(url: String) {
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
startActivity(intent)
}


private fun privacy(){
val intent = Intent(this@MainActivity, privacy_policy_page::class.java)
startActivity(intent)
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_code.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M9.4,16.6L4.8,12l4.6,-4.6L8,6l-6,6 6,6 1.4,-1.4zM14.6,16.6l4.6,-4.6 -4.6,-4.6L16,6l6,6 -6,6 -1.4,-1.4z"/>
</vector>
3 changes: 3 additions & 0 deletions app/src/main/res/menu/side_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@


<item
android:id="@+id/ic_share_Code"
android:icon="@drawable/ic_code"
android:title="Share Code" />
android:id="@+id/ic_open"
android:icon="@drawable/ic_book"
android:title="Open Source Library" />
Expand Down

0 comments on commit b0a34fd

Please sign in to comment.