0
當用戶觸摸網格佈局時,如何獲得敲擊聲音?當用戶觸摸網格佈局時,如何獲得敲擊聲音?
<GridLayout row="3" colSpan="2" columns="15*,75*,10*" height="12%" rows="*,*" class="card-large box" (tap)="onTap()">
<Label text="" class="fa centered icon-category" col="0" rowspan="2"></Label>
<Label text="MyText" class="category-name" verticalAlignment="bottom" col="1" row="0"></Label>
<Label text="numbers" verticalAlignment="top" col="1" row="1"></Label>
<Label text="" class="fa centered icon-arrow" col="2" rowspan="2"></Label>
</GridLayout>
UPDATE:我可以accesing Android原生API得到的聲音,這裏是代碼:
讓decorView:任何= app.android.startActivity.getWindow()getDecorView() decorView .playSoundEffect(android.view.SoundEffectConstants.CLICK)
,但我想知道爲什麼攻一個Android佈局不火的聲音效果,..