Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App Crashing at Splashscreen issue solved #124

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 26
compileSdkVersion 28
defaultConfig {
applicationId "com.udacity.googleindiascholarships"
minSdkVersion 19
targetSdkVersion 26
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand All @@ -20,34 +20,34 @@ android {

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.google.android.gms:play-services-auth:11.8.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.google.android.gms:play-services-auth:11.8.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.android.support:preference-v7:26.1.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.google.android.gms:play-services-auth:16.0.0'
implementation 'com.google.firebase:firebase-auth:16.0.3'
implementation 'com.google.firebase:firebase-core:16.0.3'
implementation 'com.google.android.gms:play-services-auth:16.0.0'
implementation 'com.google.firebase:firebase-auth:16.0.3'
implementation 'com.android.support:preference-v7:28.0.0'
implementation 'com.firebaseui:firebase-ui-database:3.2.2'



implementation 'com.firebase:firebase-client-android:2.5.2'

implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.google.firebase:firebase-database:16.0.2'
implementation 'org.jsoup:jsoup:1.8.3' // required
implementation 'com.leocardz:link-preview:2.0.0@aar'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.google.firebase:firebase-storage:11.8.0'
implementation 'com.google.firebase:firebase-storage:16.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
apply plugin: 'com.google.gms.google-services'
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<activity
android:name=".ui.LoginActivity"
android:label="@string/title_activity_login"
android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
android:theme="@style/AppTheme.NoActionBar" />

<meta-data
android:name="preloaded_fonts"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public void uploadFile(){
public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
Toast.makeText(ChallengeUserInputDetails.this,"Upload Succesfull",Toast.LENGTH_LONG).show();

Upload upload = new Upload(mName.getText().toString().trim(),taskSnapshot.getDownloadUrl().toString());
Upload upload = new Upload(mName.getText().toString().trim(),taskSnapshot.getUploadSessionUri().toString());
String uploadId = mDatabaseReference.push().getKey();
mDatabaseReference.child(uploadId).setValue(upload);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ protected void onCreate(Bundle savedInstanceState) {
mProjectName.setText(project_name);
mProjectDescription.setText(project_description);
mProjectStatus.setText(project_status);
Picasso.with(this).load(project_logo_url).into(mPorjectLogoImageView);
Picasso.with(this).load(project_logo_url).into(mainLogoImageView);
Picasso.get().load(project_logo_url).into(mPorjectLogoImageView);
Picasso.get().load(project_logo_url).into(mainLogoImageView);
// mProjectColapsingToolbarLayout.set
githubUri = Uri.parse(project_github_url);
mGithubLinkButton.setOnClickListener(new View.OnClickListener() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void onBindViewHolder(final ContactCardViewHolder holder, int position) {
final ContactModerator listItem = mListItems.get(position);

// holder.contactImageView.setImageResource(listItem.getPlaceHolderImage());
Picasso.with(mContext).load(listItem.getMod_profile()).into(holder.contactImageView);
Picasso.get().load(listItem.getMod_profile()).into(holder.contactImageView);

}

Expand Down Expand Up @@ -97,7 +97,7 @@ public void onClick(DialogInterface dialogInterface, int i) {
CircleImageView githubLink = itemView.findViewById(R.id.contact_github);
TextView emailGis = itemView.findViewById(R.id.gisMailId);

Picasso.with(mContext).load(mListItems.get(position).getMod_profile()).into(profileImage);
Picasso.get().load(mListItems.get(position).getMod_profile()).into(profileImage);
contact_name.setText(mListItems.get(position).getMod_name());
contact_title.setText(mListItems.get(position).getMod_title());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void onBindViewHolder(final ProjectsCardViewHolder holder, int position)
final Project listItem = mListItems.get(position);
holder.projectNameTextView.setText(listItem.getProject_name());
//holder.projectImageView.setImageResource(listItem.getPlaceHolderImage());
Picasso.with(mContext).load(listItem.getProject_logo_url()).into(holder.projectImageView);
Picasso.get().load(listItem.getProject_logo_url()).into(holder.projectImageView);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.ViewTreeObserver;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.TextView;

Expand Down Expand Up @@ -36,6 +37,7 @@ public class SplashScreenActivity extends AppCompatActivity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_splash_screen);

mAppLogoView = findViewById(R.id.iv_app_icon);
Expand All @@ -53,9 +55,9 @@ private void startAnimation() {
mAppNameView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
AnimatorSet mAnimatorSet = new AnimatorSet();
mAnimatorSet.playTogether(
ObjectAnimator.ofFloat(mAppNameView, "alpha", 0, 1, 1, 1),
ObjectAnimator.ofFloat(mAppNameView, "scaleX", 0.3f, 1.05f, 0.9f, 1),
ObjectAnimator.ofFloat(mAppNameView, "scaleY", 0.3f, 1.05f, 0.9f, 1));
ObjectAnimator.ofFloat(mAppNameView, "alpha", 0, 1, 1, 1),
ObjectAnimator.ofFloat(mAppNameView, "scaleX", 0.3f, 1.05f, 0.9f, 1),
ObjectAnimator.ofFloat(mAppNameView, "scaleY", 0.3f, 1.05f, 0.9f, 1));
mAnimatorSet.setDuration(2000);
mAnimatorSet.start();
}
Expand All @@ -66,9 +68,9 @@ private void startAnimation() {
mAppLogoView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
AnimatorSet mAnimatorSet = new AnimatorSet();
mAnimatorSet.playTogether(
ObjectAnimator.ofFloat(mAppLogoView, "alpha", 0, 1, 1, 1),
ObjectAnimator.ofFloat(mAppLogoView, "scaleX", 0.3f, 1.05f, 0.9f, 1),
ObjectAnimator.ofFloat(mAppLogoView, "scaleY", 0.3f, 1.05f, 0.9f, 1));
ObjectAnimator.ofFloat(mAppLogoView, "alpha", 0, 1, 1, 1),
ObjectAnimator.ofFloat(mAppLogoView, "scaleX", 0.3f, 1.05f, 0.9f, 1),
ObjectAnimator.ofFloat(mAppLogoView, "scaleY", 0.3f, 1.05f, 0.9f, 1));
mAnimatorSet.setDuration(2000);
mAnimatorSet.start();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public AnnouncementsViewHolder onCreateViewHolder(ViewGroup parent, int viewType

@Override
public void onBindViewHolder(AnnouncementsViewHolder holder, int position) {
Picasso.with(mContext).load(R.drawable.akshit).
Picasso.get().load(R.drawable.akshit).
into(holder.announcementsThumbnail);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public BlogsViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {

@Override
public void onBindViewHolder(final BlogsViewHolder holder, int position) {
Picasso.with(mContext).load(blogImageURL).into(holder.thumbnailImage);
Picasso.get().load(blogImageURL).into(holder.thumbnailImage);
holder.share.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void onPos(SourceContent sourceContent, boolean b) {
previewTitle.setVisibility(View.VISIBLE);
linkSharedBy.setVisibility(View.VISIBLE);
if(size>0)
Picasso.with(context).load(sourceContent.getImages().get(random.nextInt(size))).into(previewImage);
Picasso.get().load(sourceContent.getImages().get(random.nextInt(size))).into(previewImage);
previewThumbnail.setVisibility(View.VISIBLE);
previewImage.setVisibility(View.VISIBLE);
openBtn.setVisibility(View.VISIBLE);
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
<item name="android:statusBarColor">@color/colorPrimary</item>
</style>

<style name="AppTheme.NoActionBar">
Expand Down