Implemented watch and unwatch a repository

This commit is contained in:
M M Arif
2019-10-12 14:00:36 +05:00
parent 7f3aed9bae
commit 69745b027e
8 changed files with 288 additions and 2 deletions

View File

@ -0,0 +1,6 @@
<vector android:autoMirrored="true" android:height="24dp"
android:viewportHeight="511.999" android:viewportWidth="511.999"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FFFFFFFF" android:pathData="M508.745,246.041c-4.574,-6.257 -113.557,-153.206 -252.748,-153.206S7.818,239.784 3.249,246.035c-4.332,5.936 -4.332,13.987 0,19.923c4.569,6.257 113.557,153.206 252.748,153.206s248.174,-146.95 252.748,-153.201C513.083,260.028 513.083,251.971 508.745,246.041zM255.997,385.406c-102.529,0 -191.33,-97.533 -217.617,-129.418c26.253,-31.913 114.868,-129.395 217.617,-129.395c102.524,0 191.319,97.516 217.617,129.418C447.361,287.923 358.746,385.406 255.997,385.406z"/>
<path android:fillColor="#FFFFFFFF" android:pathData="M255.997,154.725c-55.842,0 -101.275,45.433 -101.275,101.275s45.433,101.275 101.275,101.275s101.275,-45.433 101.275,-101.275S311.839,154.725 255.997,154.725zM255.997,323.516c-37.23,0 -67.516,-30.287 -67.516,-67.516s30.287,-67.516 67.516,-67.516s67.516,30.287 67.516,67.516S293.227,323.516 255.997,323.516z"/>
</vector>

View File

@ -115,6 +115,30 @@
android:textSize="16sp"
android:padding="16dp" />
<TextView
android:id="@+id/watchRepository"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="@string/watchRepository"
android:drawableStart="@drawable/ic_unwatch"
android:drawablePadding="24dp"
android:textColor="@color/white"
android:textSize="16sp"
android:padding="16dp" />
<TextView
android:id="@+id/unWatchRepository"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="@string/unWatchRepository"
android:drawableStart="@drawable/ic_watchers"
android:drawablePadding="24dp"
android:textColor="@color/white"
android:textSize="16sp"
android:padding="16dp" />
<View style="@style/lineDividerHorizontal" />
<TextView

View File

@ -506,7 +506,11 @@
<string name="exploreTextBoxHint">Explore repositories</string>
<string name="starRepository">Star Repository</string>
<string name="unStarRepository">Unstar Repository</string>
<string name="starRepositorySuccess">Repository starred</string>
<string name="unStarRepositorySuccess">Repository unstarred</string>
<string name="starRepositorySuccess">Repository added to starred list</string>
<string name="unStarRepositorySuccess">Repository removed from starred list</string>
<string name="watchRepository">Watch Repository</string>
<string name="unWatchRepository">Unwatch Repository</string>
<string name="watchRepositorySuccess">Repository added to watch list</string>
<string name="unWatchRepositorySuccess">Repository removed from watch list</string>
</resources>