This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.clayallsopp.isawesome" | |
android:versionCode="1" | |
android:versionName="1.0"> | |
<application android:icon="@drawable/icon" android:label="@string/app_name"> | |
<activity android:name=".OfflineListActivity" | |
android:label="@string/app_name"> | |
<intent-filter> | |
<action android:name="android.intent.action.MAIN" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
<application | |
android:icon="@drawable/icon" | |
android:label="@string/app_name" | |
android:theme="@android:style/Theme.Light"> | |
... | |
</application> | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
android:orientation="horizontal" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent"> | |
... | |
</RelativeLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
<TextView | |
android:layout_width="wrap_content" | |
android:layout_height="fill_parent" | |
android:textStyle="bold" | |
android:gravity="center_vertical" | |
android:layout_alignParentLeft="true" | |
android:layout_centerVertical="true" | |
android:paddingLeft="10px" | |
android:id="@+id/term" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import android.content.Context; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.ArrayAdapter; | |
import android.widget.ImageView; | |
import android.widget.TextView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
@Override | |
public View getView(int position, View convertView, ViewGroup parent) { | |
View row = convertView; | |
if (row == null) { | |
LayoutInflater inflater = LayoutInflater.from(this.getContext()); | |
row = inflater.inflate(R.layout.list_item_with_disclosure,null); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.main); | |
setListAdapter(new BrocabAdapter(this,android.R.layout.simple_list_item_1,brocabList)); | |
} | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
row.setOnClickListener((OnClickListener)this.getContext()); | |
row.setTag(position); | |
return row; | |
} | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class OfflineListActivity extends ListActivity implements OnClickListener { | |
... | |
@Override | |
public void onClick(View v) { | |
AlertDialog alertDialog = new AlertDialog.Builder(this).create(); | |
alertDialog.setTitle("BRO"); | |
alertDialog.setMessage("Check it: " + brocabs[(Integer) v.getTag()]); | |
alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL,"OK",new DialogInterface.OnClickListener() { | |
public void onClick(DialogInterface dialog, int which) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<string name="hello">Hello World, MainTabBarActivity!</string> | |
<string name="app_name">Brocabulary</string> | |
</resources> |