mirror of https://github.com/readrops/Readrops.git
Add custom fab
This commit is contained in:
parent
9e13b3aca0
commit
e543fa3664
|
@ -18,7 +18,7 @@
|
|||
<PersistentState>
|
||||
<option name="values">
|
||||
<map>
|
||||
<entry key="url" value="jar:file:/Applications/Android%20Studio.app/Contents/plugins/android/lib/android.jar!/images/material_design_icons/social/ic_share_black_24dp.xml" />
|
||||
<entry key="url" value="jar:file:/Applications/Android%20Studio.app/Contents/plugins/android/lib/android.jar!/images/material_design_icons/file/ic_folder_black_24dp.xml" />
|
||||
</map>
|
||||
</option>
|
||||
</PersistentState>
|
||||
|
@ -29,7 +29,7 @@
|
|||
<option name="values">
|
||||
<map>
|
||||
<entry key="color" value="ffffff" />
|
||||
<entry key="outputName" value="ic_share_white" />
|
||||
<entry key="outputName" value="ic_folder_white" />
|
||||
<entry key="sourceFile" value="$USER_HOME$" />
|
||||
</map>
|
||||
</option>
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -59,5 +59,5 @@ dependencies {
|
|||
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
|
||||
|
||||
implementation 'com.afollestad.material-dialogs:core:0.9.6.0'
|
||||
|
||||
implementation 'com.github.clans:fab:1.6.4'
|
||||
}
|
||||
|
|
|
@ -212,6 +212,10 @@ public class MainActivity extends AppCompatActivity implements SimpleCallback, S
|
|||
dialog.show();
|
||||
}
|
||||
|
||||
public void addFolder(View view) {
|
||||
|
||||
}
|
||||
|
||||
public void insertNewFeed(ParsingResult result) {
|
||||
refreshLayout.setRefreshing(true);
|
||||
viewModel.addFeed(result);
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M10,4H4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V8c0,-1.1 -0.9,-2 -2,-2h-8l-2,-2z"/>
|
||||
</vector>
|
|
@ -0,0 +1,5 @@
|
|||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M3.9,12c0,-1.71 1.39,-3.1 3.1,-3.1h4L11,7L7,7c-2.76,0 -5,2.24 -5,5s2.24,5 5,5h4v-1.9L7,15.1c-1.71,0 -3.1,-1.39 -3.1,-3.1zM8,13h8v-2L8,11v2zM17,7h-4v1.9h4c1.71,0 3.1,1.39 3.1,3.1s-1.39,3.1 -3.1,3.1h-4L13,17h4c2.76,0 5,-2.24 5,-5s-2.24,-5 -5,-5z"/>
|
||||
</vector>
|
|
@ -46,14 +46,35 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/add_action_button"
|
||||
<com.github.clans.fab.FloatingActionMenu
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="16dp"
|
||||
android:onClick="displayAddFeedDialog"
|
||||
android:src="@drawable/ic_add_white" />
|
||||
android:layout_margin="12dp"
|
||||
app:menu_colorNormal="@color/colorPrimary"
|
||||
app:menu_icon="@drawable/fab_add">
|
||||
|
||||
<com.github.clans.fab.FloatingActionButton
|
||||
android:id="@+id/add_feed_fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="displayAddFeedDialog"
|
||||
android:src="@drawable/ic_insert_link_white"
|
||||
app:fab_colorNormal="@color/colorPrimary"
|
||||
app:fab_label="@string/add_feed_item"
|
||||
app:fab_size="mini" />
|
||||
|
||||
<com.github.clans.fab.FloatingActionButton
|
||||
android:id="@+id/add_folder_fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="addFolder"
|
||||
android:src="@drawable/ic_folder_white"
|
||||
app:fab_colorNormal="@color/colorPrimary"
|
||||
app:fab_label="@string/add_folder"
|
||||
app:fab_size="mini" />
|
||||
|
||||
</com.github.clans.fab.FloatingActionMenu>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
|
|
@ -22,5 +22,6 @@
|
|||
<string name="read_time_one_minute">1 min</string>
|
||||
<string name="share">Partager l\'article</string>
|
||||
<string name="open_url">Ouvrir le lien</string>
|
||||
<string name="add_folder">Ajouter un dossier</string>
|
||||
|
||||
</resources>
|
|
@ -24,4 +24,5 @@
|
|||
<string name="interpoint" translatable="false">·</string>
|
||||
<string name="share">Share Article</string>
|
||||
<string name="open_url">Open url</string>
|
||||
<string name="add_folder">Add folder</string>
|
||||
</resources>
|
||||
|
|
Loading…
Reference in New Issue