diff --git a/app/src/main/java/org/ethereum/ethereum_android/AccountsDataAdapter.java b/app/src/main/java/org/ethereum/ethereum_android/AccountsDataAdapter.java new file mode 100644 index 00000000..1449265b --- /dev/null +++ b/app/src/main/java/org/ethereum/ethereum_android/AccountsDataAdapter.java @@ -0,0 +1,68 @@ +package org.ethereum.ethereum_android; + +import org.ethereum.core.AccountState; +import org.ethereum.core.Denomination; +import org.ethereum.crypto.HashUtil; +import org.spongycastle.util.Arrays; +import org.spongycastle.util.encoders.Hex; + +import java.util.List; + +/** + * Created by Adrian Tiberius on 06.05.2015. + */ +public class AccountsDataAdapter { + + List data; + + final String[] columns = new String[]{"Account", "Balance", "Is Contract"}; + + public AccountsDataAdapter(List data) { + + this.data = data; + } + + public void addDataPiece(DataClass d) { + + data.add(d); + //this.fireTableRowsInserted(Math.min(data.size() - 2, 0), data.size() - 1); + } + + public int getRowCount() { + return data.size(); + } + + public int getColumnCount() { + return 3; + } + + public String getColumnName(int column) { + return columns[column]; + } + + public boolean isCellEditable(int row, int column) { // custom isCellEditable function + return column == 0 ? true : false; + } + + public Object getValueAt(int rowIndex, int columnIndex) { + if (columnIndex == 0) { + return Hex.toHexString(data.get(rowIndex).address); + } else if (columnIndex == 1) { + if (data.get(rowIndex).accountState != null) { + return Denomination.toFriendlyString(data.get(rowIndex).accountState.getBalance()); + } + return "---"; + } else { + if (data.get(rowIndex).accountState != null) { + if (!Arrays.areEqual(data.get(rowIndex).accountState.getCodeHash(), HashUtil.EMPTY_DATA_HASH)) + return "Yes"; + } + return "No"; + } + } + + public static class DataClass { + public byte[] address; + public AccountState accountState; + } +} diff --git a/app/src/main/java/org/ethereum/ethereum_android/DataClass.java b/app/src/main/java/org/ethereum/ethereum_android/DataClass.java new file mode 100644 index 00000000..36a9e02c --- /dev/null +++ b/app/src/main/java/org/ethereum/ethereum_android/DataClass.java @@ -0,0 +1,11 @@ +package org.ethereum.ethereum_android; + +import org.ethereum.core.AccountState; + +/** + * Created by userica on 06.05.2015. + */ +public class DataClass { + public byte[] address; + public AccountState accountState; +} diff --git a/app/src/main/java/org/ethereum/ethereum_android/EthereumManager.java b/app/src/main/java/org/ethereum/ethereum_android/EthereumManager.java new file mode 100644 index 00000000..3fe170ed --- /dev/null +++ b/app/src/main/java/org/ethereum/ethereum_android/EthereumManager.java @@ -0,0 +1,73 @@ +package org.ethereum.ethereum_android; + +import org.ethereum.config.SystemProperties; +import org.ethereum.core.AccountState; +import org.ethereum.facade.Ethereum; +import org.ethereum.EthereumFactory; +import org.ethereum.facade.Repository; +import org.ethereum.listener.EthereumListenerAdapter; + + +import java.util.Set; + +public class EthereumManager { + + public static Ethereum ethereum = null; + + public static AccountsDataAdapter adapter = null; + + public static String log = ""; + + public EthereumManager(android.content.Context androidContext) { + + ethereum = EthereumFactory.getEthereum(androidContext); + this.addListener(); + } + + public void connect() { + + ethereum.connect(SystemProperties.CONFIG.activePeerIP(), + SystemProperties.CONFIG.activePeerPort(), + SystemProperties.CONFIG.activePeerNodeid()); + } + + public void loadAccounts() { + + Repository repository = ethereum.getRepository(); + Set keys = repository.getAccountsKeys(); + for (byte[] key : keys) { + AccountsDataAdapter.DataClass dc = new AccountsDataAdapter.DataClass(); + dc.address = key; + AccountState state = repository.getAccountState(dc.address); + dc.accountState = state; + + adapter.addDataPiece(dc); + } + } + + public void startPeerDiscovery() { + + ethereum.startPeerDiscovery(); + } + + public void addListener() { + + ethereum.addListener(new EthereumListenerAdapter() { + + @Override + public void trace(final String output) { + + log += output; + log += "\n\n"; + } + }); + } + + public String getLog() { + + String logMessages = EthereumManager.log; + EthereumManager.log = ""; + return logMessages; + } + +} diff --git a/app/src/main/java/org/ethereum/ethereum_android/MainActivity.java b/app/src/main/java/org/ethereum/ethereum_android/MainActivity.java index 001af33f..96b4eb4b 100644 --- a/app/src/main/java/org/ethereum/ethereum_android/MainActivity.java +++ b/app/src/main/java/org/ethereum/ethereum_android/MainActivity.java @@ -2,8 +2,10 @@ package org.ethereum.ethereum_android; import android.os.AsyncTask; import android.os.StrictMode; +import android.support.v4.widget.DrawerLayout; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; +import android.support.v7.widget.Toolbar; import android.text.method.ScrollingMovementMethod; import android.util.Log; import android.view.Menu; @@ -12,11 +14,12 @@ import android.view.View; import android.widget.Button; import android.widget.TextView; import android.view.View.OnClickListener; +import android.widget.Toast; import org.springframework.context.ApplicationContext; -public class MainActivity extends ActionBarActivity implements OnClickListener { +public class MainActivity extends ActionBarActivity implements OnClickListener, NavigationDrawerCallbacks { public static ApplicationContext context = null; private static final String TAG = "MyActivity"; @@ -26,24 +29,28 @@ public class MainActivity extends ActionBarActivity implements OnClickListener { private Button walletButton; public EthereumManager ethereumManager = null; + private NavigationDrawerFragment mNavigationDrawerFragment; + private Toolbar mToolbar; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); + mToolbar = (Toolbar) findViewById(R.id.toolbar_actionbar); + setSupportActionBar(mToolbar); + + mNavigationDrawerFragment = (NavigationDrawerFragment) + getFragmentManager().findFragmentById(R.id.fragment_drawer); + + // Set up the drawer. + mNavigationDrawerFragment.setup(R.id.fragment_drawer, (DrawerLayout) findViewById(R.id.drawer), mToolbar); + text1 = (TextView) findViewById(R.id.text1); text1.setMovementMethod(new ScrollingMovementMethod()); - consoleButton = (Button) findViewById(R.id.consoleButton); - consoleButton.setOnClickListener(this); - - walletButton = (Button) findViewById(R.id.walletButton); - walletButton.setOnClickListener(this); - StrictMode.enableDefaults(); - //context = RoboSpring.getContext("applicationContext.xml");//new ClassPathXmlApplicationContext("applicationContext.xml"/*, clazz*/); - //RoboSpring.autowire(this); + System.setProperty("sun.arch.data.model", "32"); System.setProperty("leveldb.mmap", "false"); new PostTask().execute(getApplicationContext()); @@ -75,26 +82,41 @@ public class MainActivity extends ActionBarActivity implements OnClickListener { public void onClick(View v) { switch (v.getId()) { + /* case R.id.consoleButton: { // do something for button 1 click break; } - - case R.id.walletButton: { - // do something for button 2 click - break; - } + */ //.... etc } } + @Override + public void onNavigationDrawerItemSelected(int position) { + // update the main content by replacing fragments + Toast.makeText(this, "Menu item selected -> " + position, Toast.LENGTH_SHORT).show(); + } + + @Override + public void onBackPressed() { + if (mNavigationDrawerFragment.isDrawerOpen()) + mNavigationDrawerFragment.closeDrawer(); + else + super.onBackPressed(); + } @Override public boolean onCreateOptionsMenu(Menu menu) { - // Inflate the menu; this adds items to the action bar if it is present. - getMenuInflater().inflate(R.menu.menu_main, menu); - return true; + if (!mNavigationDrawerFragment.isDrawerOpen()) { + // Only show items in the action bar relevant to this screen + // if the drawer is not showing. Otherwise, let the drawer + // decide what to show in the action bar. + getMenuInflater().inflate(R.menu.menu_main, menu); + return true; + } + return super.onCreateOptionsMenu(menu); } @Override @@ -132,14 +154,14 @@ public class MainActivity extends ActionBarActivity implements OnClickListener { Log.v(TAG, "333"); while(true) { try { - Thread.sleep(1000); + Thread.sleep(100); } catch (InterruptedException e) { e.printStackTrace(); } if (quit == 1) { return "All Done!"; } - publishProgress(1111); + //publishProgress(1111); } } diff --git a/app/src/main/java/org/ethereum/ethereum_android/NavigationDrawerAdapter.java b/app/src/main/java/org/ethereum/ethereum_android/NavigationDrawerAdapter.java new file mode 100644 index 00000000..aa884291 --- /dev/null +++ b/app/src/main/java/org/ethereum/ethereum_android/NavigationDrawerAdapter.java @@ -0,0 +1,88 @@ +package org.ethereum.ethereum_android; + + +import android.support.v7.widget.RecyclerView; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; + +import java.util.List; + + +public class NavigationDrawerAdapter extends RecyclerView.Adapter { + + private List mData; + private NavigationDrawerCallbacks mNavigationDrawerCallbacks; + private View mSelectedView; + private int mSelectedPosition; + + public NavigationDrawerAdapter(List data) { + mData = data; + } + + public NavigationDrawerCallbacks getNavigationDrawerCallbacks() { + return mNavigationDrawerCallbacks; + } + + public void setNavigationDrawerCallbacks(NavigationDrawerCallbacks navigationDrawerCallbacks) { + mNavigationDrawerCallbacks = navigationDrawerCallbacks; + } + + @Override + public NavigationDrawerAdapter.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) { + View v = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.drawer_row, viewGroup, false); + final ViewHolder viewHolder = new ViewHolder(v); + viewHolder.itemView.setClickable(true); + viewHolder.itemView.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + if (mSelectedView != null) { + mSelectedView.setSelected(false); + } + mSelectedPosition = viewHolder.getAdapterPosition(); + v.setSelected(true); + mSelectedView = v; + if (mNavigationDrawerCallbacks != null) + mNavigationDrawerCallbacks.onNavigationDrawerItemSelected(viewHolder.getAdapterPosition()); + } + } + ); + viewHolder.itemView.setBackgroundResource(R.drawable.row_selector); + return viewHolder; + } + + @Override + public void onBindViewHolder(NavigationDrawerAdapter.ViewHolder viewHolder, int i) { + viewHolder.textView.setText(mData.get(i).getText()); + viewHolder.textView.setCompoundDrawablesWithIntrinsicBounds(mData.get(i).getDrawable(), null, null, null); + if (mSelectedPosition == i) { + if (mSelectedView != null) { + mSelectedView.setSelected(false); + } + mSelectedPosition = i; + mSelectedView = viewHolder.itemView; + mSelectedView.setSelected(true); + } + } + + + public void selectPosition(int position) { + mSelectedPosition = position; + notifyItemChanged(position); + } + + @Override + public int getItemCount() { + return mData != null ? mData.size() : 0; + } + + public static class ViewHolder extends RecyclerView.ViewHolder { + public TextView textView; + + public ViewHolder(View itemView) { + super(itemView); + textView = (TextView) itemView.findViewById(R.id.item_name); + } + } +} \ No newline at end of file diff --git a/app/src/main/java/org/ethereum/ethereum_android/NavigationDrawerCallbacks.java b/app/src/main/java/org/ethereum/ethereum_android/NavigationDrawerCallbacks.java new file mode 100644 index 00000000..6f7b0825 --- /dev/null +++ b/app/src/main/java/org/ethereum/ethereum_android/NavigationDrawerCallbacks.java @@ -0,0 +1,5 @@ +package org.ethereum.ethereum_android; + +public interface NavigationDrawerCallbacks { + void onNavigationDrawerItemSelected(int position); +} diff --git a/app/src/main/java/org/ethereum/ethereum_android/NavigationDrawerFragment.java b/app/src/main/java/org/ethereum/ethereum_android/NavigationDrawerFragment.java new file mode 100644 index 00000000..d83507c8 --- /dev/null +++ b/app/src/main/java/org/ethereum/ethereum_android/NavigationDrawerFragment.java @@ -0,0 +1,219 @@ +package org.ethereum.ethereum_android; + +import android.app.Activity; +import android.app.Fragment; +import android.content.SharedPreferences; +import android.content.res.Configuration; +import android.os.Bundle; +import android.preference.PreferenceManager; +import android.support.v4.widget.DrawerLayout; +import android.support.v7.app.ActionBarDrawerToggle; +import android.support.v7.widget.LinearLayoutManager; +import android.support.v7.widget.RecyclerView; +import android.support.v7.widget.Toolbar; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import java.util.ArrayList; +import java.util.List; + +/** + * Fragment used for managing interactions for and presentation of a navigation drawer. + * See the + * design guidelines for a complete explanation of the behaviors implemented here. + */ +public class NavigationDrawerFragment extends Fragment implements NavigationDrawerCallbacks { + + /** + * Remember the position of the selected item. + */ + private static final String STATE_SELECTED_POSITION = "selected_navigation_drawer_position"; + + /** + * Per the design guidelines, you should show the drawer on launch until the user manually + * expands it. This shared preference tracks this. + */ + private static final String PREF_USER_LEARNED_DRAWER = "navigation_drawer_learned"; + + /** + * A pointer to the current callbacks instance (the Activity). + */ + private NavigationDrawerCallbacks mCallbacks; + + /** + * Helper component that ties the action bar to the navigation drawer. + */ + private ActionBarDrawerToggle mActionBarDrawerToggle; + + private DrawerLayout mDrawerLayout; + private RecyclerView mDrawerList; + private View mFragmentContainerView; + + private int mCurrentSelectedPosition = 0; + private boolean mFromSavedInstanceState; + private boolean mUserLearnedDrawer; + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + // Read in the flag indicating whether or not the user has demonstrated awareness of the + // drawer. See PREF_USER_LEARNED_DRAWER for details. + SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getActivity()); + mUserLearnedDrawer = sp.getBoolean(PREF_USER_LEARNED_DRAWER, false); + + if (savedInstanceState != null) { + mCurrentSelectedPosition = savedInstanceState.getInt(STATE_SELECTED_POSITION); + mFromSavedInstanceState = true; + } + } + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + View view = inflater.inflate(R.layout.fragment_navigation_drawer, container, false); + mDrawerList = (RecyclerView) view.findViewById(R.id.drawerList); + LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity()); + layoutManager.setOrientation(LinearLayoutManager.VERTICAL); + mDrawerList.setLayoutManager(layoutManager); + mDrawerList.setHasFixedSize(true); + + final List navigationItems = getMenu(); + NavigationDrawerAdapter adapter = new NavigationDrawerAdapter(navigationItems); + adapter.setNavigationDrawerCallbacks(this); + mDrawerList.setAdapter(adapter); + selectItem(mCurrentSelectedPosition); + return view; + } + + public boolean isDrawerOpen() { + return mDrawerLayout != null && mDrawerLayout.isDrawerOpen(mFragmentContainerView); + } + + public ActionBarDrawerToggle getActionBarDrawerToggle() { + return mActionBarDrawerToggle; + } + + public DrawerLayout getDrawerLayout() { + return mDrawerLayout; + } + + @Override + public void onNavigationDrawerItemSelected(int position) { + selectItem(position); + } + + public List getMenu() { + List items = new ArrayList(); + items.add(new NavigationItem("Console", getResources().getDrawable(R.drawable.ic_menu_check))); + items.add(new NavigationItem("Peers", getResources().getDrawable(R.drawable.ic_menu_check))); + items.add(new NavigationItem("Block Chain", getResources().getDrawable(R.drawable.ic_menu_check))); + items.add(new NavigationItem("New Transaction", getResources().getDrawable(R.drawable.ic_menu_check))); + items.add(new NavigationItem("Pending Transactions", getResources().getDrawable(R.drawable.ic_menu_check))); + items.add(new NavigationItem("Debug Info", getResources().getDrawable(R.drawable.ic_menu_check))); + return items; + } + + /** + * Users of this fragment must call this method to set up the navigation drawer interactions. + * + * @param fragmentId The android:id of this fragment in its activity's layout. + * @param drawerLayout The DrawerLayout containing this fragment's UI. + * @param toolbar The Toolbar of the activity. + */ + public void setup(int fragmentId, DrawerLayout drawerLayout, Toolbar toolbar) { + mFragmentContainerView = getActivity().findViewById(fragmentId); + mDrawerLayout = drawerLayout; + + mDrawerLayout.setStatusBarBackgroundColor(getResources().getColor(R.color.myPrimaryDarkColor)); + + mActionBarDrawerToggle = new ActionBarDrawerToggle(getActivity(), mDrawerLayout, toolbar, R.string.drawer_open, R.string.drawer_close) { + @Override + public void onDrawerClosed(View drawerView) { + super.onDrawerClosed(drawerView); + if (!isAdded()) return; + + getActivity().invalidateOptionsMenu(); // calls onPrepareOptionsMenu() + } + + @Override + public void onDrawerOpened(View drawerView) { + super.onDrawerOpened(drawerView); + if (!isAdded()) return; + if (!mUserLearnedDrawer) { + mUserLearnedDrawer = true; + SharedPreferences sp = PreferenceManager + .getDefaultSharedPreferences(getActivity()); + sp.edit().putBoolean(PREF_USER_LEARNED_DRAWER, true).apply(); + } + getActivity().invalidateOptionsMenu(); // calls onPrepareOptionsMenu() + } + }; + + // If the user hasn't 'learned' about the drawer, open it to introduce them to the drawer, + // per the navigation drawer design guidelines. + if (!mUserLearnedDrawer && !mFromSavedInstanceState) { + mDrawerLayout.openDrawer(mFragmentContainerView); + } + + // Defer code dependent on restoration of previous instance state. + mDrawerLayout.post(new Runnable() { + @Override + public void run() { + mActionBarDrawerToggle.syncState(); + } + }); + + mDrawerLayout.setDrawerListener(mActionBarDrawerToggle); + } + + private void selectItem(int position) { + mCurrentSelectedPosition = position; + if (mDrawerLayout != null) { + mDrawerLayout.closeDrawer(mFragmentContainerView); + } + if (mCallbacks != null) { + mCallbacks.onNavigationDrawerItemSelected(position); + } + ((NavigationDrawerAdapter) mDrawerList.getAdapter()).selectPosition(position); + } + + public void openDrawer() { + mDrawerLayout.openDrawer(mFragmentContainerView); + } + + public void closeDrawer() { + mDrawerLayout.closeDrawer(mFragmentContainerView); + } + + @Override + public void onAttach(Activity activity) { + super.onAttach(activity); + try { + mCallbacks = (NavigationDrawerCallbacks) activity; + } catch (ClassCastException e) { + throw new ClassCastException("Activity must implement NavigationDrawerCallbacks."); + } + } + + @Override + public void onDetach() { + super.onDetach(); + mCallbacks = null; + } + + @Override + public void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); + outState.putInt(STATE_SELECTED_POSITION, mCurrentSelectedPosition); + } + + @Override + public void onConfigurationChanged(Configuration newConfig) { + super.onConfigurationChanged(newConfig); + // Forward the new configuration the drawer toggle component. + mActionBarDrawerToggle.onConfigurationChanged(newConfig); + } + +} diff --git a/app/src/main/java/org/ethereum/ethereum_android/NavigationItem.java b/app/src/main/java/org/ethereum/ethereum_android/NavigationItem.java new file mode 100644 index 00000000..fe800417 --- /dev/null +++ b/app/src/main/java/org/ethereum/ethereum_android/NavigationItem.java @@ -0,0 +1,33 @@ +package org.ethereum.ethereum_android; + + +import android.graphics.drawable.Drawable; + +/** + * Created by poliveira on 24/10/2014. + */ +public class NavigationItem { + private String mText; + private Drawable mDrawable; + + public NavigationItem(String text, Drawable drawable) { + mText = text; + mDrawable = drawable; + } + + public String getText() { + return mText; + } + + public void setText(String text) { + mText = text; + } + + public Drawable getDrawable() { + return mDrawable; + } + + public void setDrawable(Drawable drawable) { + mDrawable = drawable; + } +} diff --git a/app/src/main/res/drawable-hdpi/drawer_shadow.9.png b/app/src/main/res/drawable-hdpi/drawer_shadow.9.png new file mode 100644 index 00000000..236bff55 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/drawer_shadow.9.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_drawer.png b/app/src/main/res/drawable-hdpi/ic_drawer.png new file mode 100644 index 00000000..c59f601c Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_drawer.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_menu_check.png b/app/src/main/res/drawable-hdpi/ic_menu_check.png new file mode 100644 index 00000000..af35ffdb Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_menu_check.png differ diff --git a/app/src/main/res/drawable-mdpi/drawer_shadow.9.png b/app/src/main/res/drawable-mdpi/drawer_shadow.9.png new file mode 100644 index 00000000..ffe3a28d Binary files /dev/null and b/app/src/main/res/drawable-mdpi/drawer_shadow.9.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_drawer.png b/app/src/main/res/drawable-mdpi/ic_drawer.png new file mode 100644 index 00000000..1ed2c56e Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_drawer.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_menu_check.png b/app/src/main/res/drawable-mdpi/ic_menu_check.png new file mode 100644 index 00000000..80e46c61 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_menu_check.png differ diff --git a/app/src/main/res/drawable-xhdpi/drawer_shadow.9.png b/app/src/main/res/drawable-xhdpi/drawer_shadow.9.png new file mode 100644 index 00000000..fabe9d96 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/drawer_shadow.9.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_drawer.png b/app/src/main/res/drawable-xhdpi/ic_drawer.png new file mode 100644 index 00000000..a5fa74de Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_drawer.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_menu_check.png b/app/src/main/res/drawable-xhdpi/ic_menu_check.png new file mode 100644 index 00000000..b71bc71b Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_menu_check.png differ diff --git a/app/src/main/res/drawable-xxhdpi/drawer_shadow.9.png b/app/src/main/res/drawable-xxhdpi/drawer_shadow.9.png new file mode 100644 index 00000000..b91e9d7f Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/drawer_shadow.9.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_drawer.png b/app/src/main/res/drawable-xxhdpi/ic_drawer.png new file mode 100644 index 00000000..9c4685d6 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_drawer.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_menu_check.png b/app/src/main/res/drawable-xxhdpi/ic_menu_check.png new file mode 100644 index 00000000..84aad60e Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_menu_check.png differ diff --git a/app/src/main/res/drawable/dummy b/app/src/main/res/drawable/dummy deleted file mode 100644 index e69de29b..00000000 diff --git a/app/src/main/res/drawable/row_selector.xml b/app/src/main/res/drawable/row_selector.xml new file mode 100644 index 00000000..9d3138e8 --- /dev/null +++ b/app/src/main/res/drawable/row_selector.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index ddeb1796..c39fd254 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,25 +1,30 @@ + android:layout_height="match_parent" tools:context=".MainActivity"> + + + + + + + + + + - - -