Skip to content

Commit 3dbf862

Browse files
committed
update demo
1 parent 6c6b584 commit 3dbf862

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

app/src/main/java/com/hackplan/androidarcmenu/demo/MainActivity.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ protected void onCreate(Bundle savedInstanceState) {
1919
final Button btn1 = (Button) findViewById(R.id.btn1);
2020
final Button btn2 = (Button) findViewById(R.id.btn2);
2121
final Button btn3 = (Button) findViewById(R.id.btn3);
22+
final Button btn4 = (Button) findViewById(R.id.btn4);
23+
2224
Button menuBtn = new Button(this);
2325
menuBtn.setText("TEST");
2426
arcMenu = new ArcMenu.Builder(MainActivity.this)
@@ -38,6 +40,12 @@ protected void onCreate(Bundle savedInstanceState) {
3840
.build();
3941

4042
btn3.setOnLongClickListener(this);
43+
btn4.setOnClickListener(new View.OnClickListener() {
44+
@Override
45+
public void onClick(View v) {
46+
arcMenu.showOn(v);
47+
}
48+
});
4149
}
4250

4351
@Override

app/src/main/res/layout/activity_main.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,12 @@
3131
android:layout_height="wrap_content"
3232
android:layout_centerInParent="true"
3333
android:text="btn3"/>
34+
35+
<Button
36+
android:id="@+id/btn4"
37+
android:layout_width="wrap_content"
38+
android:layout_height="wrap_content"
39+
android:layout_above="@+id/btn3"
40+
android:layout_marginBottom="20dp"
41+
android:text="btn4"/>
3442
</RelativeLayout>

0 commit comments

Comments
 (0)