-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
67 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...eleton-sample/src/main/java/com/github/tehras/loadingskeletonapp/InstantLoadActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.github.tehras.loadingskeletonapp; | ||
|
||
import android.os.Bundle; | ||
import android.view.View; | ||
|
||
import com.github.tehras.loadingskeleton.LoadingSkeleton; | ||
import com.github.tehras.loadingskeleton.helpers.LoadingSkeletonViewConverter; | ||
|
||
import org.jetbrains.annotations.Nullable; | ||
|
||
public class InstantLoadActivity extends MainActivity { | ||
|
||
|
||
@Override | ||
protected void onCreate(@Nullable Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
|
||
LoadingSkeleton shimmerView = (LoadingSkeleton) findViewById(R.id.include_2); | ||
|
||
//call this instantly | ||
shimmerView.skeletonViewConverter(new LoadingSkeletonViewConverter.Builder() | ||
.color(R.color.colorPrimary) | ||
.shimmer(true) | ||
.cornerRadius(10) | ||
.build()).start(); | ||
} | ||
|
||
@Override | ||
protected void onStart() { | ||
super.onStart(); | ||
|
||
findViewById(R.id.instant_activity).setVisibility(View.GONE); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters