-
Notifications
You must be signed in to change notification settings - Fork 294
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
108 additions
and
14 deletions.
There are no files selected for viewing
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
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
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
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,39 @@ | ||
package com.moxun.tagcloud; | ||
|
||
import android.content.Context; | ||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
|
||
import com.moxun.tagcloudlib.view.TagsAdapter; | ||
|
||
/** | ||
* Created by moxun on 16/3/4. | ||
*/ | ||
public class ViewTagsAdapter extends TagsAdapter { | ||
@Override | ||
public int getCount() { | ||
return 20; | ||
} | ||
|
||
@Override | ||
public View getView(Context context, int position, ViewGroup parent) { | ||
View view = LayoutInflater.from(context).inflate(R.layout.tag_item_view, parent, false); | ||
return view; | ||
} | ||
|
||
@Override | ||
public Object getItem(int position) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public int getPopularity(int position) { | ||
return position % 5; | ||
} | ||
|
||
@Override | ||
public void onThemeColorChanged(View view, int themeColor) { | ||
view.findViewById(R.id.android_eye).setBackgroundColor(themeColor); | ||
} | ||
} |
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
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,20 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:orientation="horizontal" android:layout_width="30dp" | ||
android:layout_height="30dp" | ||
android:gravity="center_vertical"> | ||
|
||
<View | ||
android:id="@+id/android_eye" | ||
android:layout_width="13dp" | ||
android:layout_height="4dp" | ||
android:background="#ff00ff" | ||
android:layout_marginLeft="8dp" | ||
android:layout_marginTop="4.5dp"/> | ||
|
||
<ImageView | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:src="@mipmap/android"/> | ||
|
||
</FrameLayout> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<resources> | ||
<string name="app_name">TagCloud</string> | ||
<string name="app_name">TagCloudView</string> | ||
</resources> |