Skip to content
Snippets Groups Projects
Commit 70a7afd1 authored by Benjamin Dengler's avatar Benjamin Dengler
Browse files

Replaced buttons with FloatingActionButton.

parent 368b1917
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -38,6 +38,7 @@ This project uses many open source libraries such as:
* [Gson](https://code.google.com/p/google-gson/)
* [joda-time-android](https://github.com/dlew/joda-time-android)
* [Crouton](https://github.com/keyboardsurfer/Crouton)
* [FloatingActionButton](https://github.com/makovkastar/FloatingActionButton)
 
## Contributing
 
Loading
Loading
Loading
Loading
@@ -39,6 +39,7 @@ dependencies {
compile 'com.squareup.retrofit:retrofit:1.7.0'
compile 'com.jakewharton:butterknife:5.1.2'
compile 'de.keyboardsurfer.android.widget:crouton:1.8.5@aar'
compile 'com.melnykov:floatingactionbutton:1.0.4'
compile 'com.android.support:support-v4:20.0.0'
compile fileTree(dir: 'libs', include: ['*.jar'])
}
Loading
Loading
Loading
Loading
@@ -6,6 +6,7 @@ import butterknife.ButterKnife;
import butterknife.InjectView;
import butterknife.OnClick;
 
import com.melnykov.fab.FloatingActionButton;
import retrofit.Callback;
import retrofit.RetrofitError;
import retrofit.client.Response;
Loading
Loading
@@ -21,7 +22,6 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.Button;
import android.widget.ListView;
 
import com.bd.gitlab.IssueActivity;
Loading
Loading
@@ -35,8 +35,8 @@ import de.keyboardsurfer.android.widget.crouton.Crouton;
import de.keyboardsurfer.android.widget.crouton.Style;
 
public class IssuesFragment extends Fragment implements OnItemClickListener, SwipeRefreshLayout.OnRefreshListener {
@InjectView(R.id.add_issue_button) Button addIssueButton;
@InjectView(R.id.add_issue_button) FloatingActionButton addIssueButton;
@InjectView(R.id.fragmentList) ListView listView;
@InjectView(R.id.swipe_layout) SwipeRefreshLayout swipeLayout;
Loading
Loading
@@ -48,6 +48,7 @@ public class IssuesFragment extends Fragment implements OnItemClickListener, Swi
ButterKnife.inject(this, view);
listView.setOnItemClickListener(this);
addIssueButton.attachToListView(listView);
 
swipeLayout.setOnRefreshListener(this);
swipeLayout.setColorSchemeResources(android.R.color.holo_blue_bright, android.R.color.holo_green_light, android.R.color.holo_orange_light, android.R.color.holo_red_light);
Loading
Loading
@@ -62,9 +63,9 @@ public class IssuesFragment extends Fragment implements OnItemClickListener, Swi
public void onDestroyView() {
super.onDestroyView();
ButterKnife.reset(this);
}
@Override
}
@Override
public void onRefresh() {
loadData();
}
Loading
Loading
@@ -87,7 +88,7 @@ public class IssuesFragment extends Fragment implements OnItemClickListener, Swi
listView.setAdapter(issueAdapter);
Repository.issueAdapter = issueAdapter;
addIssueButton.setEnabled(true);
}
Loading
Loading
@@ -106,7 +107,7 @@ public class IssuesFragment extends Fragment implements OnItemClickListener, Swi
public boolean onBackPressed() {
return false;
}
@OnClick(R.id.add_issue_button)
public void onAddIssueClick() {
FragmentTransaction ft = getFragmentManager().beginTransaction();
Loading
Loading
Loading
Loading
@@ -6,6 +6,7 @@ import butterknife.ButterKnife;
import butterknife.InjectView;
import butterknife.OnClick;
 
import com.melnykov.fab.FloatingActionButton;
import retrofit.Callback;
import retrofit.RetrofitError;
import retrofit.client.Response;
Loading
Loading
@@ -20,7 +21,6 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.Button;
import android.widget.ListView;
import android.widget.TextView;
 
Loading
Loading
@@ -35,7 +35,7 @@ import de.keyboardsurfer.android.widget.crouton.Style;
 
public class UsersFragment extends Fragment implements OnItemClickListener, SwipeRefreshLayout.OnRefreshListener {
@InjectView(R.id.add_user_button) Button addUserButton;
@InjectView(R.id.add_user_button) FloatingActionButton addUserButton;
@InjectView(R.id.fragmentList) ListView listView;
@InjectView(R.id.error_text) TextView errorText;
@InjectView(R.id.swipe_layout) SwipeRefreshLayout swipeLayout;
Loading
Loading
@@ -48,6 +48,7 @@ public class UsersFragment extends Fragment implements OnItemClickListener, Swip
ButterKnife.inject(this, view);
listView.setOnItemClickListener(this);
addUserButton.attachToListView(listView);
 
swipeLayout.setOnRefreshListener(this);
swipeLayout.setColorSchemeResources(android.R.color.holo_blue_bright, android.R.color.holo_green_light, android.R.color.holo_orange_light, android.R.color.holo_red_light);
Loading
Loading
app/src/main/res/drawable-hdpi/ic_action_add.png

181 B | W: 48px | H: 48px

app/src/main/res/drawable-hdpi/ic_action_add.png

167 B | W: 48px | H: 48px

app/src/main/res/drawable-hdpi/ic_action_add.png
app/src/main/res/drawable-hdpi/ic_action_add.png
app/src/main/res/drawable-hdpi/ic_action_add.png
app/src/main/res/drawable-hdpi/ic_action_add.png
  • 2-up
  • Swipe
  • Onion skin
app/src/main/res/drawable-mdpi/ic_action_add.png

134 B | W: 32px | H: 32px

app/src/main/res/drawable-mdpi/ic_action_add.png

129 B | W: 32px | H: 32px

app/src/main/res/drawable-mdpi/ic_action_add.png
app/src/main/res/drawable-mdpi/ic_action_add.png
app/src/main/res/drawable-mdpi/ic_action_add.png
app/src/main/res/drawable-mdpi/ic_action_add.png
  • 2-up
  • Swipe
  • Onion skin
app/src/main/res/drawable-xhdpi/ic_action_add.png

201 B | W: 64px | H: 64px

app/src/main/res/drawable-xhdpi/ic_action_add.png

189 B | W: 64px | H: 64px

app/src/main/res/drawable-xhdpi/ic_action_add.png
app/src/main/res/drawable-xhdpi/ic_action_add.png
app/src/main/res/drawable-xhdpi/ic_action_add.png
app/src/main/res/drawable-xhdpi/ic_action_add.png
  • 2-up
  • Swipe
  • Onion skin
app/src/main/res/drawable-xxhdpi/ic_action_add.png

253 B

<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.SwipeRefreshLayout
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/swipe_layout"
android:layout_width="match_parent"
android:layout_height="match_parent" >
 
<RelativeLayout
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipe_layout"
android:layout_width="match_parent"
android:layout_height="match_parent" >
 
<Button
android:id="@+id/add_issue_button"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:drawableLeft="@drawable/ic_action_add"
android:enabled="false"
android:text="@string/add_issue" />
<ListView
android:id="@+id/fragmentList"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:layout_below="@+id/add_issue_button" />
android:layout_alignParentTop="true" />
</android.support.v4.widget.SwipeRefreshLayout>
 
</RelativeLayout>
<com.melnykov.fab.FloatingActionButton
android:id="@+id/add_issue_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|right"
android:layout_margin="16dp"
android:enabled="false"
android:src="@drawable/ic_action_add" />
 
</android.support.v4.widget.SwipeRefreshLayout>
\ No newline at end of file
</FrameLayout>
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.SwipeRefreshLayout
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/swipe_layout"
android:layout_width="match_parent"
android:layout_height="match_parent" >
 
<RelativeLayout
<TextView
android:id="@+id/error_text"
android:layout_width="match_parent"
android:layout_height="match_parent" >
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:gravity="center"
android:visibility="gone"/>
 
<Button
android:id="@+id/add_user_button"
style="?android:attr/buttonBarButtonStyle"
android:enabled="false"
android:drawableLeft="@drawable/ic_action_add"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:text="@string/add_user" />
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipe_layout"
android:layout_width="match_parent"
android:layout_height="match_parent" >
 
<ListView
android:id="@+id/fragmentList"
Loading
Loading
@@ -27,14 +24,15 @@
android:layout_alignParentLeft="true"
android:layout_below="@+id/add_user_button" />
 
<TextView
android:id="@+id/error_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:gravity="center"
android:visibility="gone"/>
</android.support.v4.widget.SwipeRefreshLayout>
<com.melnykov.fab.FloatingActionButton
android:id="@+id/add_user_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|right"
android:layout_margin="16dp"
android:enabled="false"
android:src="@drawable/ic_action_add" />
 
</RelativeLayout>
</android.support.v4.widget.SwipeRefreshLayout>
\ No newline at end of file
</FrameLayout >
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment