Skip to content

Commit

Permalink
✨ Fix Social links in About
Browse files Browse the repository at this point in the history
  • Loading branch information
adithya321 committed Mar 7, 2017
1 parent 391d055 commit 5af7255
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 19 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ android {
applicationId "com.pimp.instincts"
minSdkVersion 21
targetSdkVersion 25
versionCode 4
versionName "1.3.0"
versionCode 5
versionName "1.3.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

Expand Down
24 changes: 18 additions & 6 deletions app/src/main/java/com/pimp/instincts/activities/AboutActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

package com.pimp.instincts.activities;

import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
Expand Down Expand Up @@ -78,13 +79,24 @@ public boolean onOptionsItemSelected(MenuItem item) {
startActivity(browserIntent1);
break;
case R.id.action_facebook:
Intent browserIntent2 = new Intent(Intent.ACTION_VIEW,
Uri.parse("https://www.facebook.com/instincts.ssn/"));
startActivity(browserIntent2);
Uri uri1 = Uri.parse("https://www.facebook.com/instincts.ssn");
try {
this.getPackageManager().getPackageInfo("com.facebook.katana", 0);
startActivity(new Intent(Intent.ACTION_VIEW,
Uri.parse("fb://facewebmodal/f?href=" + uri1)));
} catch (Exception e) {
startActivity(new Intent(Intent.ACTION_VIEW, uri1));
}
break;
case R.id.action_instagram:
Intent browserIntent3 = new Intent(Intent.ACTION_VIEW,
Uri.parse("https://www.instagram.com/ssninstincts/"));
startActivity(browserIntent3);
Uri uri2 = Uri.parse("http://instagram.com/_u/ssninstincts");
try {
Intent intent = new Intent(Intent.ACTION_VIEW, uri2);
intent.setPackage("com.instagram.android");
startActivity(intent);
} catch (ActivityNotFoundException e) {
startActivity(new Intent(Intent.ACTION_VIEW, uri2));
}
break;
}
return super.onOptionsItemSelected(item);
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/res/drawable/ic_local_pizza.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
-->

<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M12,2C8.43,2 5.23,3.54 3.01,6L12,22l8.99,-16C18.78,3.55 15.57,2 12,2zM7,7c0,-1.1 0.9,-2 2,-2s2,0.9 2,2 -0.9,2 -2,2 -2,-0.9 -2,-2zM12,15c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2z"/>
android:pathData="M12,2C8.43,2 5.23,3.54 3.01,6L12,22l8.99,-16C18.78,3.55 15.57,2 12,2zM7,7c0,-1.1 0.9,-2 2,-2s2,0.9 2,2 -0.9,2 -2,2 -2,-0.9 -2,-2zM12,15c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2z" />
</vector>
13 changes: 9 additions & 4 deletions app/src/main/res/layout/fragment_buses.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,15 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:fontFamily="sans-serif"
android:text="SSN Bus Routes"
android:textSize="20sp"
android:textStyle="bold" />
android:text="SSN Bus Routes" />

<View
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
android:background="@color/about_page_line" />

<android.support.v7.widget.CardView
android:layout_width="match_parent"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/menu/menu_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
android:id="@+id/action_instagram"
android:icon="@drawable/ic_instagram"
android:orderInCategory="300"
android:title="Facebook"
android:title="Instagram"
app:showAsAction="always" />
</menu>
2 changes: 1 addition & 1 deletion app/src/main/res/menu/menu_events.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
android:id="@+id/action_food"
android:icon="@drawable/ic_local_pizza"
android:orderInCategory="100"
android:title="Search"
android:title="Food Stalls"
app:showAsAction="always" />
</menu>

0 comments on commit 5af7255

Please sign in to comment.