主にRPA、Androidアプリ開発について投稿しています。メモ書きです。
[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。
<?xml version="1.0" encoding="utf-8"?>・・・省略・・・
<FrameLayout
android:layout_height="match_parent"
android:layout_width="match_parent"
xmlns:android="http://schemas.android.com/apk/res/android" >
<FrameLayout2つ目のFrameLayoutは、ドラッグ可能な範囲。
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:layout_gravity="center_vertical|right"
android:id="@+id/keyContainer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
</FrameLayout>
</FrameLayout>
</FrameLayout>
public static void setTenkey(View v){
if (bundle == null) {
activity.getSupportFragmentManager().beginTransaction()
.add(R.id.keyContainer, new TenkeyFragment())
.commit();
}
FrameLayout fl = findViewById(R.id.keyContainer);
DragViewListener dvListener = new DragViewListener(fl);
fl.setOnTouchListener(dvListener);