-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Tabs] replace text by icons for kids.
picker and palette icons has been kept for the fab since it's represent well the action behind. Color and Palette words of the tabs have been replaced by icons which represent what kids are going to find in the list : rounds for colors and squares for palettes.
- Loading branch information
1 parent
d118d62
commit 3435104
Showing
15 changed files
with
90 additions
and
9 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
...ker/app/src/adult/java/fr/tvbarthel/apps/cameracolorpicker/adapters/MainPagerAdapter.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package fr.tvbarthel.apps.cameracolorpicker.adapters; | ||
|
||
import android.support.v4.view.PagerAdapter; | ||
|
||
/** | ||
* Adpater used to display the tab of the | ||
* {@link fr.tvbarthel.apps.cameracolorpicker.activities.MainActivity} | ||
* <p/> | ||
* No specific behaviour. | ||
*/ | ||
public abstract class MainPagerAdapter extends PagerAdapter { | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<drawable name="ic_fab_color_picker_action">@drawable/ic_image_colorize</drawable> | ||
<drawable name="ic_fab_palette_creation_action">@drawable/ic_image_palette</drawable> | ||
</resources> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions
37
...cker/app/src/kids/java/fr/tvbarthel/apps/cameracolorpicker/adapters/MainPagerAdapter.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package fr.tvbarthel.apps.cameracolorpicker.adapters; | ||
|
||
import android.content.Context; | ||
import android.support.v4.content.ContextCompat; | ||
import android.support.v4.view.PagerAdapter; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
import android.widget.ImageView; | ||
|
||
import com.astuetz.PagerSlidingTabStrip; | ||
|
||
import fr.tvbarthel.apps.cameracolorpicker.R; | ||
|
||
/** | ||
* Adpater used to display the tab of the | ||
* {@link fr.tvbarthel.apps.cameracolorpicker.activities.MainActivity} | ||
*/ | ||
public abstract class MainPagerAdapter extends PagerAdapter implements PagerSlidingTabStrip.CustomTabProvider { | ||
@Override | ||
public View getCustomTabView(ViewGroup parent, int position) { | ||
Context context = parent.getContext(); | ||
ImageView imageView = new ImageView(context); | ||
imageView.setScaleType(ImageView.ScaleType.CENTER_INSIDE); | ||
imageView.setContentDescription(getPageTitle(position)); | ||
switch (position) { | ||
case 0: | ||
imageView.setImageDrawable(ContextCompat.getDrawable(context, R.drawable.ic_round_white)); | ||
break; | ||
case 1: | ||
imageView.setImageDrawable(ContextCompat.getDrawable(context, R.drawable.ic_square_white)); | ||
break; | ||
default: | ||
throw new IllegalStateException("Can't instantiate tab view for position : " + position); | ||
} | ||
return imageView; | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
CameraColorPicker/app/src/kids/res/drawable/ic_round_white.xml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:shape="oval"> | ||
<solid android:color="#aaffffff" /> | ||
<size | ||
android:width="30dp" | ||
android:height="30dp" /> | ||
</shape> |
8 changes: 8 additions & 0 deletions
8
CameraColorPicker/app/src/kids/res/drawable/ic_square_white.xml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:shape="rectangle"> | ||
<solid android:color="#aaffffff" /> | ||
<size | ||
android:width="25dp" | ||
android:height="25dp" /> | ||
</shape> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<string name="app_name">Kids Camera Color Picker</string> | ||
<string name="activity_main_error_not_enough_colors"></string> | ||
</resources> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<drawable name="ic_fab_color_picker_action">@drawable/ic_image_colorize</drawable> | ||
<drawable name="ic_fab_palette_creation_action">@drawable/ic_image_palette</drawable> | ||
</resources> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<string name="app_name">Kids Camera Color Picker</string> | ||
<string name="activity_main_error_not_enough_colors"></string> | ||
</resources> |
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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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