-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
12 changed files
with
136 additions
and
38 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
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 |
---|---|---|
@@ -1,23 +1,26 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.skydoves.androidveildemo"> | ||
xmlns:tools="http://schemas.android.com/tools" | ||
package="com.skydoves.androidveildemo"> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:theme="@style/AppTheme"> | ||
<activity android:name=".MainActivity"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<activity | ||
android:name=".DetailActivity" | ||
android:theme="@style/DetailTheme" /> | ||
</application> | ||
<application | ||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:theme="@style/AppTheme" | ||
tools:ignore="GoogleAppIndexingWarning"> | ||
<activity android:name=".MainActivity"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<activity | ||
android:name=".DetailActivity" | ||
android:theme="@style/DetailTheme" /> | ||
<activity android:name=".SecondActivity" /> | ||
</application> | ||
</manifest> |
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
45 changes: 45 additions & 0 deletions
45
app/src/main/java/com/skydoves/androidveildemo/SecondActivity.kt
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,45 @@ | ||
package com.skydoves.androidveildemo | ||
|
||
import android.annotation.SuppressLint | ||
import android.content.Intent | ||
import android.os.Bundle | ||
import android.widget.Toast | ||
import androidx.appcompat.app.AppCompatActivity | ||
import androidx.recyclerview.widget.GridLayoutManager | ||
import com.skydoves.androidveil.VeiledItemOnClickListener | ||
import com.skydoves.androidveildemo.profile.ListItemUtils | ||
import com.skydoves.androidveildemo.profile.Profile | ||
import com.skydoves.androidveildemo.profile.ProfileAdapter | ||
import com.skydoves.androidveildemo.profile.ProfileViewHolder | ||
import kotlinx.android.synthetic.main.activity_second.* | ||
|
||
class SecondActivity : AppCompatActivity(), VeiledItemOnClickListener, | ||
ProfileViewHolder.Delegate { | ||
|
||
private val adapter by lazy { ProfileAdapter(this) } | ||
|
||
@SuppressLint("CheckResult") | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContentView(R.layout.activity_second) | ||
|
||
// sets VeilRecyclerView's properties | ||
veilFrameView.setVeilLayout(R.layout.item_preview, this) | ||
veilFrameView.setAdapter(adapter) | ||
veilFrameView.setLayoutManager(GridLayoutManager(this, 2)) | ||
veilFrameView.addVeiledItems(12) | ||
|
||
// add profile times to adapter | ||
adapter.addProfiles(ListItemUtils.getProfiles(this)) | ||
} | ||
|
||
/** OnItemClickListener by Veiled Item */ | ||
override fun onItemClicked(pos: Int) { | ||
Toast.makeText(this, getString(R.string.msg_loading), Toast.LENGTH_SHORT).show() | ||
} | ||
|
||
/** OnItemClickListener by User Item */ | ||
override fun onItemClickListener(profile: Profile) { | ||
startActivity(Intent(this, DetailActivity::class.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
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,27 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:id="@+id/linearLayout" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical" | ||
android:background="@color/background"> | ||
|
||
<androidx.appcompat.widget.Toolbar | ||
android:id="@+id/detail_toolbar" | ||
android:layout_width="match_parent" | ||
android:layout_height="?attr/actionBarSize" | ||
android:background="@color/colorPrimary" | ||
app:title="@string/app_name" /> | ||
|
||
<com.skydoves.androidveil.VeilRecyclerFrameView | ||
android:id="@+id/veilFrameView" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
app:veilFrame_baseColor="@color/shimmerBase0" | ||
app:veilFrame_highlightColor="@color/shimmerHighlight1" | ||
app:veilFrame_layout="@layout/item_profile" | ||
app:veilFrame_radius="4dp" | ||
app:veilFrame_shimmerEnable="true" | ||
app:veilFrame_veiled="true" /> | ||
</LinearLayout> |
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,24 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:background="?attr/selectableItemBackground" | ||
android:orientation="vertical" | ||
android:padding="20dp"> | ||
|
||
<ImageView | ||
android:layout_width="match_parent" | ||
android:layout_height="140dp" /> | ||
|
||
<TextView | ||
android:layout_width="match_parent" | ||
android:layout_height="12dp" | ||
android:layout_marginTop="20dp" /> | ||
|
||
<TextView | ||
android:layout_width="match_parent" | ||
android:layout_height="12dp" | ||
android:layout_marginTop="8dp" | ||
android:layout_marginEnd="40dp" | ||
android:layout_marginRight="40dp" /> | ||
</LinearLayout> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<color name="colorPrimary">#3d95c9</color> | ||
<color name="colorPrimaryDark">#2485be</color> | ||
<color name="colorAccent">#3d95c9</color> | ||
<color name="background">#303030</color> | ||
<color name="background800">#424242</color> | ||
<color name="background900">#212121</color> | ||
<color name="HintText">#87ffffff</color> | ||
<color name="preview">#b0abb0</color> | ||
<color name="shimmerBase0">#c2c2c2</color> | ||
<color name="shimmerHighlight0">#ffffff</color> | ||
<color name="colorPrimary">#3d95c9</color> | ||
<color name="colorPrimaryDark">#2485be</color> | ||
<color name="colorAccent">#3d95c9</color> | ||
<color name="background">#303030</color> | ||
<color name="background800">#424242</color> | ||
<color name="background900">#212121</color> | ||
<color name="HintText">#87ffffff</color> | ||
<color name="preview">#b0abb0</color> | ||
<color name="shimmerBase0">#c2c2c2</color> | ||
<color name="shimmerHighlight0">#ffffff</color> | ||
<color name="shimmerHighlight1">#DFDEDE</color> | ||
</resources> |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<resources> | ||
<string name="app_name">AndroidVeilDemo</string> | ||
<string name="app_name">AndroidVeilDemo</string> | ||
</resources> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.