Skip to content

Commit

Permalink
fix: Fixed issues related to livefeed and splash screen (anweshaiitp#66)
Browse files Browse the repository at this point in the history
* Fixed issues related to livefeed and splash screen

* Update LiveFeedApi.java

* Added organizer of pronite
  • Loading branch information
somenath1435 authored Feb 1, 2020
1 parent 8753d22 commit 31f9e20
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 70 deletions.
15 changes: 11 additions & 4 deletions app/src/main/java/info/anwesha/iitp/livefeed/LiveFeedAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,17 @@ public void onBindViewHolder(@NonNull LiveFeedAdapter.ViewHolder holder, int pos
NewsList newsList = newsLists.get(position);
holder.news.setText(newsList.getNews());

Glide.with(context)
.load(newsList.getImg())
.thumbnail(Glide.with(context).load(R.raw.load))
.into(holder.img);
if (newsList.getImg().equals("")) {
Glide.with(context)
.load(R.drawable.logo)
.thumbnail(Glide.with(context).load(R.raw.load))
.into(holder.img);
} else {
Glide.with(context)
.load(newsList.getImg())
.thumbnail(Glide.with(context).load(R.raw.load))
.into(holder.img);
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
Toast.makeText(getContext(), "Check your internet connection", Toast.LENGTH_LONG).show();
else {
RecyclerView recyclerView = view.findViewById(R.id.recycler_livefeed);
recyclerView.setLayoutManager(new GridLayoutManager(getContext(), 2));
recyclerView.setLayoutManager(new GridLayoutManager(getContext(), 1));

adapter = new LiveFeedAdapter(getContext());
recyclerView.setAdapter(adapter);
Expand All @@ -60,7 +60,7 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
void getLiveFeedData() {
progressDialog = new ProgressDialog(getContext());
progressDialog.setCancelable(false);
progressDialog.setMessage("Geting Live Feeds");
progressDialog.setMessage("Getting Live Feeds");
progressDialog.show();

LiveFeedApi liveFeedApi = RetrofitClientInstance.getRetrofitInstance().create(LiveFeedApi.class);
Expand Down
11 changes: 6 additions & 5 deletions app/src/main/java/info/anwesha/iitp/pronite/ProniteFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.cardview.widget.CardView;
import androidx.fragment.app.Fragment;
import androidx.preference.PreferenceManager;

Expand Down Expand Up @@ -49,7 +50,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {

//ImageView poster = view.findViewById(R.id.poster);
//CardView contact = view.findViewById(R.id.card_event_details_qua);
CardView contact = view.findViewById(R.id.card_event_details_qua);
//Button register = view.findViewById(R.id.button_register);
ImageButton map = view.findViewById(R.id.button_map);

Expand All @@ -72,10 +73,10 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
startActivity(intent);
});

// contact.setOnClickListener(view1 -> {
// Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:+918058501770"));
// startActivity(intent);
// });
contact.setOnClickListener(view1 -> {
Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:+919521205729"));
startActivity(intent);
});

// register.setOnClickListener(view15 -> {
//
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/info/anwesha/iitp/team/TeamFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
allMembers.add(new info.anwesha.iitp.team.TeamItem("D K Gurjar", "Coordinator - Registrations And Security", "9352052504", "https://www.dontUseFacebook.com", R.drawable.dk));
allMembers.add(new info.anwesha.iitp.team.TeamItem("Neeraj Paraliya", "Coordinator - Registrations And Security", "0", "https://www.facebook.com/profile.php?id=100013775678152", R.drawable.neeraj));
allMembers.add(new info.anwesha.iitp.team.TeamItem("Anuj Shastri", "Coordinator - Registrations And Security", "0", "https://www.facebook.com/anuj.shastri.3910", R.drawable.anuj_shastri));


adapter.setTeamItemList(allMembers);

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_splash.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
tools:context=".SplashActivity">

<pl.droidsonroids.gif.GifImageView
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/splash"/>
Expand Down
5 changes: 2 additions & 3 deletions app/src/main/res/layout/card_livefeed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/cv_sponsors"
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_height="wrap_content"
android:layout_margin="8dp"
app:cardBackgroundColor="@color/transparent"
app:cardCornerRadius="8dp"
Expand All @@ -19,8 +19,7 @@
<ImageView
android:id="@+id/livefeed_image"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:outlineProvider="paddedBounds"
tools:src="@drawable/bihartourism" />

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_live_feed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:spanCount="2"
app:spanCount="1"
tools:listitem="@layout/card_livefeed" />
</LinearLayout>
106 changes: 53 additions & 53 deletions app/src/main/res/layout/fragment_pronite.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@

<ImageView
android:id="@+id/poster"
android:src="@drawable/kk"
android:layout_width="match_parent"
android:layout_height="250dp" />
android:layout_height="250dp"
android:src="@drawable/kk" />

<TextView
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:textColor="@color/team_text"
android:gravity="center"
android:padding="12dp"
android:textStyle="bold"
android:text="KK"
android:textColor="@color/team_text"
android:textSize="20sp"
android:text="KK" />
android:textStyle="bold" />

</LinearLayout>

Expand Down Expand Up @@ -84,41 +84,13 @@ Anwesha'20 brings to you, performing first time in Patna!!The one and only, magi
android:orientation="vertical"
android:padding="8dp">

<TextView
android:id="@+id/date"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
android:text="Date : 09-02-2020"
android:textColor="@color/team_text"
android:textSize="18sp" />

<TextView
android:id="@+id/time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
android:text="Timing : 9:00 PM - 11:00 PM"
android:textColor="@color/team_text"
android:textSize="18sp" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">


<TextView
android:id="@+id/venue"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="8dp"
android:text="Location : Main Stage"
android:textColor="@color/team_text"
android:textSize="18sp" />

<ImageButton
android:id="@+id/button_map"
android:layout_width="40dp"
Expand All @@ -129,8 +101,36 @@ Anwesha'20 brings to you, performing first time in Patna!!The one and only, magi
android:src="@drawable/ic_map"
android:tint="@color/team_text" />

<TextView
android:id="@+id/venue"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="8dp"
android:text="Location : Main Stage"
android:textColor="@color/team_text"
android:textSize="18sp" />

</LinearLayout>

<TextView
android:id="@+id/time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
android:text="Timing : 9:00 PM - 11:00 PM"
android:textColor="@color/team_text"
android:textSize="18sp" />

<TextView
android:id="@+id/date"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
android:text="Date : 09-02-2020"
android:textColor="@color/team_text"
android:textSize="18sp" />

</LinearLayout>
</androidx.cardview.widget.CardView>

Expand All @@ -142,22 +142,12 @@ Anwesha'20 brings to you, performing first time in Patna!!The one and only, magi
app:cardBackgroundColor="@color/team_page_background"
app:cardCornerRadius="8dp">

<!--<LinearLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="8dp">

<TextView
android:id="@+id/organisers"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="8dp"
android:text="Organiser : Priyansh Singh Rao"
android:textColor="@color/team_text"
android:textSize="18sp" />
<ImageView
android:id="@+id/organiser_phone"
android:layout_width="40dp"
Expand All @@ -167,18 +157,28 @@ Anwesha'20 brings to you, performing first time in Patna!!The one and only, magi
android:src="@drawable/ic_local_phone_black_24dp"
android:tint="@color/team_text" />

</LinearLayout>-->
<TextView
android:id="@+id/organisers"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="8dp"
android:text="Organiser : Himanshu Gupta"
android:textColor="@color/team_text"
android:textSize="18sp" />

</LinearLayout>

</androidx.cardview.widget.CardView>

<!-- <com.google.android.material.button.MaterialButton-->
<!-- android:id="@+id/button_register"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_gravity="center"-->
<!-- android:padding="16dp"-->
<!-- android:text="Included with Celesta registration"-->
<!-- app:backgroundTint="@color/event_detail_card_background" />-->
<!-- <com.google.android.material.button.MaterialButton-->
<!-- android:id="@+id/button_register"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_gravity="center"-->
<!-- android:padding="16dp"-->
<!-- android:text="Included with Celesta registration"-->
<!-- app:backgroundTint="@color/event_detail_card_background" />-->

</LinearLayout>

Expand Down

0 comments on commit 31f9e20

Please sign in to comment.