Commit f5809d67 authored by mayu's avatar mayu

Added Event Website Button

parent 7e17b3d6
......@@ -2,9 +2,11 @@
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/IITB-App.iml" filepath="$PROJECT_DIR$/IITB-App.iml" />
<module fileurl="file://$PROJECT_DIR$/IITB-App.iml" filepath="$PROJECT_DIR$/IITB-App.iml" />
<module fileurl="file://$PROJECT_DIR$/IITBApp.iml" filepath="$PROJECT_DIR$/IITBApp.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
</modules>
</component>
</project>
\ No newline at end of file
......@@ -2,6 +2,7 @@ package in.ac.iitb.gymkhana.iitbapp.fragment;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
......@@ -49,6 +50,7 @@ public class EventFragment extends BaseFragment implements View.OnClickListener
Button interestedButton;
Button notGoingButton;
ImageButton shareEventButton;
ImageButton webEventButton;
String TAG = "EventFragment";
public EventFragment() {
......@@ -85,6 +87,7 @@ public class EventFragment extends BaseFragment implements View.OnClickListener
interestedButton = getActivity().findViewById(R.id.interested_button);
notGoingButton = getActivity().findViewById(R.id.not_going_button);
shareEventButton = getActivity().findViewById(R.id.share_event_button);
webEventButton = getActivity().findViewById(R.id.web_event_button);
Picasso.with(getContext()).load(event.getEventImageURL()).into(eventPicture);
eventTitle.setText(event.getEventName());
......@@ -127,6 +130,14 @@ public class EventFragment extends BaseFragment implements View.OnClickListener
startActivity(Intent.createChooser(i, "Share URL"));
}
});
webEventButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com"));
startActivity(browserIntent);
}
});
}
@Override
......
......@@ -55,6 +55,17 @@
android:textSize="21sp"
android:textStyle="bold"/>
<ImageButton
android:id="@+id/web_event_button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="Event Website"
android:src="@drawable/ic_web_black_48dp"
android:tint="@color/colorWhite" />
<ImageButton
android:id="@+id/share_event_button"
android:layout_width="0dp"
......
......@@ -9,7 +9,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.google.gms:google-services:3.1.0'
// NOTE: Do not place your application dependencies here; they belong
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment