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
{ | |
"result": "OK", | |
"message": "datasetをダウンロードしました", | |
"param_t1": "0.3", | |
"param_t2": "0.4", | |
"param_t3": "0.5", | |
"tsCreate": "2018-04-24 09:56:01.928678", | |
"dataSet": [ | |
{ | |
"datasetId": "1", |
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
package com.ramijemli.presentation.activity; | |
import android.Manifest; | |
import android.widget.Toast; | |
import android.support.constraint.ConstraintLayout; | |
import android.support.constraint.ConstraintSet; | |
import android.transition.AutoTransition; | |
import android.transition.TransitionManager; | |
import com.ramijemli.constraintlayout.R; |
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
public class MainActivity extends AppCompatActivity { | |
@BindView(R.id.constraint_layout) | |
ConstraintLayout mConstraintLayout; | |
@BindView(R.id.logo) | |
ImageView mLogo; | |
private ConstraintSet constraintSet; | |
private Handler handler; | |
private Runnable runnable; |
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
<android.support.constraint.ConstraintLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<Button | |
android:id="@+id/button_x" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" |
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
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<android.support.constraint.Group | |
android:id="@+id/group" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:visibility="visible" |
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
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:id="@+id/constraint_layout" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:background="#263238"> | |
<View | |
android:id="@+id/clock_background" | |
android:layout_width="166dp" |
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
public class ClockActivity extends AppCompatActivity { | |
@BindView(R.id.constraint_layout) | |
ConstraintLayout mConstraintLayout; | |
private ConstraintSet constraintSet; | |
private ValueAnimator hoursAnimation, minutesAnimation, secondsAnimation; | |
private int hoursRadius, minutesRadius, secondsRadius; | |
@Override |
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
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
ButterKnife.bind(this); | |
constraintSet = new ConstraintSet(); | |
constraintSet.clone(mConstraintLayout); | |
initAnimations(); | |
} |
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
private ValueAnimator animate(long orbitDuration) { | |
ValueAnimator anim = ValueAnimator.ofInt(0, 359); | |
anim.setDuration(orbitDuration); | |
anim.setInterpolator(new LinearInterpolator()); | |
anim.setRepeatMode(ValueAnimator.RESTART); | |
anim.setRepeatCount(ValueAnimator.INFINITE); | |
return anim; | |
} |
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
@Override | |
protected void onResume() { | |
super.onResume(); | |
if (hoursAnimation != null) { | |
if (hoursAnimation.isPaused()) { | |
hoursAnimation.resume(); | |
minutesAnimation.resume(); | |
secondsAnimation.resume(); | |
msAnimation.resume(); | |
} |
OlderNewer