顯示具有 JAVA 標籤的文章。 顯示所有文章
顯示具有 JAVA 標籤的文章。 顯示所有文章

2020年8月3日 星期一

Android 使用 Notification 頂部訊息 (含影片教學與專案) [android Notification top message]

1
2
3
4
5
6
    private Context cntContext;
    private static final String NOTIFICATION_CHANNEL_ID = "0920";

    public clsNotification(Context pcntContext) {
        cntContext = pcntContext;
    }


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 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)