프로젝트
GitHub에서 보기
alighters/CubeGrid
소개
Cube grid animation about the android.
디자인 및 미디어측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalCubeGrid
Cube grid animation about the android.
The android implementation about the 9-cube-grid
Demo

Usage
Add dependency
allprojects {
repositories {
...
mavenCentral()
}
}
dependencies {
compile 'com.lighters.cubegrid:cubegridlibray:1.2.4'
}
Step 1
<com.lighters.cubegridlibrary.view.CubeGridImageView
android:id="@+id/iv_cube_grid"
android:layout_width="100dp"
android:layout_height="100dp"
android:padding="12dp"
android:src="@drawable/ic_launcher"
app:fillColor="#f00"
app:loopCount="10"
app:roundCornerSize="6dp"/>
<com.lighters.cubegridlibrary.view.CubeGridFrameLayout
android:id="@+id/fl_cube_grid"
android:layout_width="80dp"
android:layout_marginTop="100dp"
android:layout_height="80dp"
app:fillColor="#0f0"
app:loopCount="10"
app:roundCornerSize="6dp"/>
Step 2
public class MainActivity extends AppCompatActivity {
public final static String TAG = MainActivity.class.getName();
private CubeGridImageView mCubeGridImageView;
private CubeGridFrameLayout mCubeGridFrameLayout;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
init();
}
private void init() {
mCubeGridImageView = (CubeGridImageView) findViewById(R.id.iv_cube_grid);
mCubeGridFrameLayout = (CubeGridFrameLayout) findViewById(R.id.fl_cube_grid);
mCubeGridImageView.start(mImageAnimCallback);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
mCubeGridFrameLayout.start(mFrameLayoutAnimCallback);
}
}, 100);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
mCubeGridImageView.stop();
}
}, 5000);
}
private ICubeGridAnimCallback mImageAnimCallback = new ICubeGridAnimCallback() {
@Override
public void onAnimStart() {
}
@Override
public void onAnimExecute(int curLoopCount) {
Log.d(TAG, "image loop:" + curLoopCount);
}
@Override
public void onAnimEnd() {
Toast.makeText(MainActivity.this, "ImageAnimEnd", Toast.LENGTH_SHORT).show();
}
};
private ICubeGridAnimCallback mFrameLayoutAnimCallback = new ICubeGridAnimCallback() {
@Override
public void onAnimStart() {
}
@Override
public void onAnimExecute(int curLoopCount) {
Log.d(TAG, "frame layout loop:" + curLoopCount);
}
@Override
public void onAnimEnd() {
Toast.makeText(MainActivity.this, "FrameAnimEnd", Toast.LENGTH_SHORT).show();
}
};
@Override
protected void onDestroy() {
super.onDestroy();
mCubeGridImageView.destory();
mCubeGridFrameLayout.destroy();
}
}
LICENSE
Copyright (C) 2016 david.wei (lighters)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
관련 프로젝트 살펴보기
불러오는 중…