1 2 3 4 5 6 | private Context cntContext; private static final String NOTIFICATION_CHANNEL_ID = "0920"; public clsNotification(Context pcntContext) { cntContext = pcntContext; } |
2020年8月3日 星期一
Android 使用 Notification 頂部訊息 (含影片教學與專案) [android Notification top message]
2020年7月9日 星期四
Android 使用 GestureDetectorCompat 點擊資訊 (含影片教學與專案) [android GestureDetectorCompat screen click info]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | public class MainActivity extends AppCompatActivity implements GestureDetector.OnGestureListener, GestureDetector.OnDoubleTapListener { TextView txvnInfo; GestureDetectorCompat gdcInfo; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); txvnInfo = findViewById(R.id.txvInfo); gdcInfo = new GestureDetectorCompat(this,this); gdcInfo.setOnDoubleTapListener(this); } |
2020年6月13日 星期六
android studio 畫面左切的切換效果 (含影片教學與專案) [android activity left transition effect (With Video and Project)]
Activity 1 左切出效果 (intent_left_out.xml)
1 2 3 4 5 6 7 8 9 10 | <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false"> <translate android:duration="500" android:fromXDelta="0%" android:fromYDelta="0%" android:toXDelta="100%" android:toYDelta="0%" /> </set> |
Activity 2 左切入效果 (intent_left_in.xml)
android studio 畫面右切的切換效果 (含影片教學與專案) [android activity right transition effect (With Video and Project)]
Activity 1 右切出效果 (intent_right_out.xml)
1 2 3 4 5 6 7 8 9 10 11 | <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false"> <translate android:duration="500" android:fromXDelta="0%" android:fromYDelta="0%" android:toXDelta="-100%" android:toYDelta="0%" /> </set> |
Activity 2 右切入效果 (intent_right_in.xml)
android studio 畫面淡出淡入的切換效果 (含影片教學與專案) [android activity fade transition effect (With Video and Project)]
Activity 1 淡出的切換效果 (intent_fade_out.xml)
1 2 3 4 5 6 | <?xml version="1.0" encoding="utf-8"?> <alpha xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/accelerate_interpolator" android:fromAlpha="1.0" android:toAlpha="0.0" android:fillAfter="true" android:duration="500" /> |
Activity 2 淡入的切換效果 (intent_fade_in.xml)
訂閱:
文章 (Atom)