Skip to content

Commit

Permalink
Merge pull request #86 from RamolaWeb/master
Browse files Browse the repository at this point in the history
Fix Bug as reported
  • Loading branch information
RamolaWeb authored Mar 28, 2017
2 parents 71dd7ae + c5c3436 commit 3adfa9b
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 25 deletions.
14 changes: 1 addition & 13 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,11 @@
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="@string/app_name" />
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data android:scheme="@string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
<activity android:name=".Activity.TeamEventActivity" />
<activity
android:name=".Activity.NewsFeedActivity"
android:theme="@style/AppTheme.NoActionBar"
android:label="Newsfeed">
android:label="Wall">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.nith.appteam.nimbus.Activity.WallIntroActivity" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public boolean onResourceReady(GlideDrawable resource, String model, Target<Glid
if(getIntent().getExtras().getInt(Intent.EXTRA_TEXT)==1){
progressBar.setVisibility(View.GONE);
noneText.setVisibility(View.GONE);
galleryImage.setImageResource(R.drawable.workshop);
galleryImage.setImageResource(R.drawable.slideimage2);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ protected void onCreate(Bundle savedInstanceState) {
}

workshopstb = (Toolbar) findViewById(R.id.workshops_toolbar);
workshopstb.setTitle("Special Event");
workshopstb.setTitle("Special Events");
setSupportActionBar(workshopstb);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.nith.appteam.nimbus.Activity.SlidingImageDetailActivity;
import com.nith.appteam.nimbus.CustomView.AspectRatioImageView;
import com.nith.appteam.nimbus.R;

import java.util.ArrayList;
Expand All @@ -23,7 +24,7 @@

public class SlidingImageAdapter extends PagerAdapter {
//As discussed before the first two pics will not loaded from internet reason so that during poor connection. The page doesn't looks empty.
private int[] IMAGES = new int[]{R.drawable.logo1, R.drawable.workshop};
private int[] IMAGES = new int[]{R.drawable.logo1, R.drawable.slideimage2};
private LayoutInflater inflater;
private ArrayList<String> urlList=new ArrayList<>();
private Context context;
Expand Down Expand Up @@ -53,7 +54,7 @@ public int getCount() {
public Object instantiateItem(ViewGroup view, final int position) {
View imageLayout = inflater.inflate(R.layout.sliding_image_layout, view, false);
assert imageLayout != null;
final ImageView imageView = (ImageView) imageLayout
final AspectRatioImageView imageView = (AspectRatioImageView) imageLayout
.findViewById(R.id.image);
if(position==0 || position==1)
imageView.setImageResource(IMAGES[position]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public void onBindViewHolder(viewHolder holder, int position) {
if(list!=null) {
Sponsor s = list.get(position);
if (s != null) {
holder.imageView.setScaleType(ImageView.ScaleType.FIT_XY);
holder.coreteam.setVisibility(View.GONE);
if (s.getName() != null && !s.getName().isEmpty())
holder.textView.setText(s.getName());
if (s.getImg_url() != null && !s.getImg_url().isEmpty())
Expand All @@ -60,12 +62,13 @@ public int getItemCount() {
public static class viewHolder extends RecyclerView.ViewHolder{

private ImageView imageView;
private TextView textView;
private TextView textView,coreteam;

public viewHolder(View itemView) {
super(itemView);
imageView= (ImageView) itemView.findViewById(R.id.core_team_image_view);
textView= (TextView) itemView.findViewById(R.id.core_team_designation);
coreteam = (TextView) itemView.findViewById(R.id.core_team_name);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,21 +101,28 @@ public void onCompleted(JSONObject object, GraphResponse response) {
if (object.has("name")) {
try {
name = object.getString("name");
Log.d("Login",name);
} catch (JSONException e) {
e.printStackTrace();
}
}
if (object.has("email")) {
try {
email = object.getString("email");
Log.d("email",email);
} catch (JSONException e) {
e.printStackTrace();
}
}
else {
email = " ";
}
if (object.has("id")) {
try {

String id = object.getString("id");
picUrl = "https://graph.facebook.com/" + id + "/picture?width=200&height=200";
Log.d("Login",picUrl);
} catch (JSONException e) {
e.printStackTrace();
}
Expand Down
Binary file modified app/src/main/res/drawable/logo1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/drawable/pic.jpg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/slideimage2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@
<TextView
android:textAppearance="@android:style/TextAppearance.Medium"
android:textAlignment="center"
android:text="Special Event"
android:text="Special Events"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_workshop_detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/w1"
android:scaleType="centerCrop"
android:scaleType="fitXY"
app:layout_collapseMode="parallax"
android:id="@+id/workshop_img"
/>
Expand Down
9 changes: 6 additions & 3 deletions app/src/main/res/layout/sliding_image_layout.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout
xmlns:custom="http://schemas.android.com/apk/res-auto/com.nith.appteam.nimbus.CustomView.AspectRatioImageView"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@android:color/transparent"
android:layout_width="match_parent"
Expand All @@ -9,11 +11,12 @@
app:cardCornerRadius="8dp"
android:layout_height="match_parent">

<ImageView
<com.nith.appteam.nimbus.CustomView.AspectRatioImageView
android:scaleType="fitXY"
custom:dominantMeasurement="width"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/slide_4"
android:scaleType="centerInside"
android:id="@+id/image"/>

</android.support.v7.widget.CardView>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/workshops_cardview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
android:layout_height="400px"
android:src="@drawable/w1"
android:id="@+id/workshop_image"
android:scaleType="centerCrop" />
android:scaleType="fitXY" />

<TextView
android:layout_width="match_parent"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
11. <b>Advice:</b> Attempt as many sets possible to score more points.\n\n
12. Winners will be announced after Nimbus 2017, and will be rewarded.\n\n
13. For any queries/complaints/bugs, contact us at <u>appteam.nith@gmail.com</u></string>
<string name="title_activity_sponsor">Sponsor</string>
<string name="title_activity_sponsor">Sponsors</string>

<string name="wall_info">
* Keep yourself updated with all the happenings of NIMBUS 2k17.\n\n
Expand Down

0 comments on commit 3adfa9b

Please sign in to comment.