์•ˆ๋“œ๋กœ์ด๋“œ ํŠœํ† ๋ฆฌ์–ผ

์•กํ‹ฐ๋น„ํ‹ฐ ๋„์šฐ๊ธฐ

๋ฒ„ํŠผ ํด๋ฆญ ์ด๋ฒคํŠธ ์ฒ˜๋ฆฌ

<Button
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/button_send"
    android:onClick="sendMessage" />
/** Called when the user clicks the Send button */
public void sendMessage(View view) {
    // Do something in response to button
}

IntelliJ Tip

Action Bar

Feature

Set up

3.0 ์ด์ƒ

<manifest ... >
    <uses-sdk android:minSdkVersion="11" ... />
    ...
</manifest>

2.1 ์ด์ƒ

public class MainActivity extends ActionBarActivity { ... }
<activity android:theme="@style/Theme.AppCompat.Light" ... >
<manifest ... >
    <uses-sdk android:minSdkVersion="7"  android:targetSdkVersion="18" />
    ...
</manifest>

Action Button ์ถ”๊ฐ€

Actions์„ XML๋กœ ์ •ํ•˜๊ธฐ

<menu xmlns:android="http://schemas.android.com/apk/res/android" >
    <!-- Search, should appear as action button -->
    <item android:id="@+id/action_search"
          android:icon="@drawable/ic_action_search"
          android:title="@string/action_search"
          android:showAsAction="ifRoom" />
    <!-- Settings, should always be in the overflow -->
    <item android:id="@+id/action_settings"
          android:title="@string/action_settings"
          android:showAsAction="never" />
</menu>

Action Bar ์Šคํƒ€์ผ๋ง

What Else?
inflearn react api server -50% ํ• ์ธ์ฟ ํฐ: 20652-ab1f1cd4c373 buy me a coffee