Hey habe nochmal eine Frage bzw. können auch noch mehr werden
Und zwar möchte ich einen Delete Button erst sichbar machen nachdem ich einen anderen Button geklickt habe oder auch einfach den Delete Button in eine neue Activity übernehmen dann muss ich nicht mit der sichtbarkeit bzw. meinen Scrips spielen.
Hier mein Quellcode (ich poste einfach mal alles)
eintrag_layout.xml
Code
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<TextView
android:id="@+id/eintragTextView"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text=""
android:textSize="20dip" />
<ImageButton
android:id="@+id/editButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="bearbeiten"
android:onClick="doEdit"
android:src="@android:drawable/ic_menu_edit" />
<ImageButton
android:id="@+id/deleteButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="löschen"
android:onClick="doDelete"
android:src="@android:drawable/ic_menu_zoom"
android:visibility="visible" />
</LinearLayout>
Display More
menu.xml
Code
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="@tools:sample/date/ddmmyy">
<item
android:id="@+id/selectButton"
android:icon="@android:drawable/ic_menu_revert"
android:title="@string/liste_start"
app:showAsAction="always" />
<item
android:id="@+id/hinzufuegenButton"
android:icon="@android:drawable/ic_menu_add"
android:title="@string/neuer_eintrag"
app:showAsAction="always" />
</menu>
Display More
styles.xml
Code
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>
Display More
stings.xml
Code
<resources>
<string name="app_name">ParseApp</string>
<string name="basis_url">http://10.222.100.128/</string>
<string name="hinzufuegenButton">Aktualisieren</string>
<string name="neuerEintrag">Neuer Eintrag</string>
<string name="neuer_eintrag">Neuer Eintrag</string>
<string name="liste_start">Start</string>
</resources>