Commit bebbeaf2f0d2f5624ffa0b0797c0b84d75f7d787
合并
| 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <project version="4"> | 2 | <project version="4"> |
| 3 | - <component name="Encoding"> | 3 | + <component name="Encoding" native2AsciiForPropertiesFiles="true" defaultCharsetForPropertiesFiles="UTF-8"> |
| 4 | <file url="PROJECT" charset="UTF-8" /> | 4 | <file url="PROJECT" charset="UTF-8" /> |
| 5 | </component> | 5 | </component> |
| 6 | </project> | 6 | </project> |
| 7 | \ No newline at end of file | 7 | \ No newline at end of file |
| @@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
| 2 | <profile version="1.0"> | 2 | <profile version="1.0"> |
| 3 | <option name="myName" value="Project Default" /> | 3 | <option name="myName" value="Project Default" /> |
| 4 | <inspection_tool class="AndroidLintNewApi" enabled="false" level="ERROR" enabled_by_default="false" /> | 4 | <inspection_tool class="AndroidLintNewApi" enabled="false" level="ERROR" enabled_by_default="false" /> |
| 5 | + <inspection_tool class="AndroidLintSetTextI18n" enabled="false" level="WARNING" enabled_by_default="false" /> | ||
| 5 | <inspection_tool class="LoggerInitializedWithForeignClass" enabled="false" level="WARNING" enabled_by_default="false"> | 6 | <inspection_tool class="LoggerInitializedWithForeignClass" enabled="false" level="WARNING" enabled_by_default="false"> |
| 6 | <option name="loggerClassName" value="org.apache.log4j.Logger,org.slf4j.LoggerFactory,org.apache.commons.logging.LogFactory,java.util.logging.Logger" /> | 7 | <option name="loggerClassName" value="org.apache.log4j.Logger,org.slf4j.LoggerFactory,org.apache.commons.logging.LogFactory,java.util.logging.Logger" /> |
| 7 | <option name="loggerFactoryMethodName" value="getLogger,getLogger,getLog,getLogger" /> | 8 | <option name="loggerFactoryMethodName" value="getLogger,getLogger,getLog,getLogger" /> |
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | -<project version="4"> | ||
| 3 | - <component name="MarkdownProjectSettings"> | ||
| 4 | - <PreviewSettings splitEditorLayout="SPLIT" splitEditorPreview="PREVIEW" useGrayscaleRendering="false" zoomFactor="1.0" maxImageWidth="0" showGitHubPageIfSynced="false" allowBrowsingInPreview="false" synchronizePreviewPosition="true" highlightPreviewType="NONE" highlightFadeOut="5" highlightOnTyping="true" synchronizeSourcePosition="true" verticallyAlignSourceAndPreviewSyncPosition="true" showSearchHighlightsInPreview="true" showSelectionInPreview="true"> | ||
| 5 | - <PanelProvider> | ||
| 6 | - <provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.panel" providerName="Default - Swing" /> | ||
| 7 | - </PanelProvider> | ||
| 8 | - </PreviewSettings> | ||
| 9 | - <ParserSettings gitHubSyntaxChange="false"> | ||
| 10 | - <PegdownExtensions> | ||
| 11 | - <option name="ABBREVIATIONS" value="false" /> | ||
| 12 | - <option name="ANCHORLINKS" value="true" /> | ||
| 13 | - <option name="ASIDE" value="false" /> | ||
| 14 | - <option name="ATXHEADERSPACE" value="true" /> | ||
| 15 | - <option name="AUTOLINKS" value="true" /> | ||
| 16 | - <option name="DEFINITIONS" value="false" /> | ||
| 17 | - <option name="DEFINITION_BREAK_DOUBLE_BLANK_LINE" value="false" /> | ||
| 18 | - <option name="FENCED_CODE_BLOCKS" value="true" /> | ||
| 19 | - <option name="FOOTNOTES" value="false" /> | ||
| 20 | - <option name="HARDWRAPS" value="false" /> | ||
| 21 | - <option name="INSERTED" value="false" /> | ||
| 22 | - <option name="QUOTES" value="false" /> | ||
| 23 | - <option name="RELAXEDHRULES" value="true" /> | ||
| 24 | - <option name="SMARTS" value="false" /> | ||
| 25 | - <option name="STRIKETHROUGH" value="true" /> | ||
| 26 | - <option name="SUBSCRIPT" value="false" /> | ||
| 27 | - <option name="SUPERSCRIPT" value="false" /> | ||
| 28 | - <option name="SUPPRESS_HTML_BLOCKS" value="false" /> | ||
| 29 | - <option name="SUPPRESS_INLINE_HTML" value="false" /> | ||
| 30 | - <option name="TABLES" value="true" /> | ||
| 31 | - <option name="TASKLISTITEMS" value="true" /> | ||
| 32 | - <option name="TOC" value="false" /> | ||
| 33 | - <option name="WIKILINKS" value="true" /> | ||
| 34 | - </PegdownExtensions> | ||
| 35 | - <ParserOptions> | ||
| 36 | - <option name="COMMONMARK_LISTS" value="false" /> | ||
| 37 | - <option name="DUMMY" value="false" /> | ||
| 38 | - <option name="EMOJI_SHORTCUTS" value="true" /> | ||
| 39 | - <option name="FLEXMARK_FRONT_MATTER" value="false" /> | ||
| 40 | - <option name="GFM_LOOSE_BLANK_LINE_AFTER_ITEM_PARA" value="true" /> | ||
| 41 | - <option name="GFM_TABLE_RENDERING" value="true" /> | ||
| 42 | - <option name="GITBOOK_URL_ENCODING" value="false" /> | ||
| 43 | - <option name="GITHUB_EMOJI_URL" value="false" /> | ||
| 44 | - <option name="GITHUB_LISTS" value="true" /> | ||
| 45 | - <option name="GITHUB_WIKI_LINKS" value="true" /> | ||
| 46 | - <option name="JEKYLL_FRONT_MATTER" value="false" /> | ||
| 47 | - <option name="SIM_TOC_BLANK_LINE_SPACER" value="true" /> | ||
| 48 | - </ParserOptions> | ||
| 49 | - </ParserSettings> | ||
| 50 | - <HtmlSettings headerTopEnabled="false" headerBottomEnabled="false" bodyTopEnabled="false" bodyBottomEnabled="false" embedUrlContent="false" addPageHeader="true"> | ||
| 51 | - <GeneratorProvider> | ||
| 52 | - <provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.generator" providerName="Default Swing HTML Generator" /> | ||
| 53 | - </GeneratorProvider> | ||
| 54 | - <headerTop /> | ||
| 55 | - <headerBottom /> | ||
| 56 | - <bodyTop /> | ||
| 57 | - <bodyBottom /> | ||
| 58 | - </HtmlSettings> | ||
| 59 | - <CssSettings previewScheme="UI_SCHEME" cssUri="" isCssUriEnabled="false" isCssTextEnabled="false" isDynamicPageWidth="true"> | ||
| 60 | - <StylesheetProvider> | ||
| 61 | - <provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.css" providerName="Default Swing Stylesheet" /> | ||
| 62 | - </StylesheetProvider> | ||
| 63 | - <ScriptProviders /> | ||
| 64 | - <cssText /> | ||
| 65 | - </CssSettings> | ||
| 66 | - <HtmlExportSettings updateOnSave="false" parentDir="$ProjectFileDir$" targetDir="$ProjectFileDir$" cssDir="" scriptDir="" plainHtml="false" imageDir="" copyLinkedImages="false" imageUniquifyType="0" targetExt="" useTargetExt="false" noCssNoScripts="false" linkToExportedHtml="true" exportOnSettingsChange="true" regenerateOnProjectOpen="false" /> | ||
| 67 | - <LinkMapSettings> | ||
| 68 | - <textMaps /> | ||
| 69 | - </LinkMapSettings> | ||
| 70 | - </component> | ||
| 71 | -</project> | ||
| 72 | \ No newline at end of file | 0 | \ No newline at end of file |
| @@ -3,7 +3,6 @@ | @@ -3,7 +3,6 @@ | ||
| 3 | <component name="ProjectModuleManager"> | 3 | <component name="ProjectModuleManager"> |
| 4 | <modules> | 4 | <modules> |
| 5 | <module fileurl="file://$PROJECT_DIR$/CNLiveApp.iml" filepath="$PROJECT_DIR$/CNLiveApp.iml" /> | 5 | <module fileurl="file://$PROJECT_DIR$/CNLiveApp.iml" filepath="$PROJECT_DIR$/CNLiveApp.iml" /> |
| 6 | - <module fileurl="file://$PROJECT_DIR$/CNLiveApp5.iml" filepath="$PROJECT_DIR$/CNLiveApp5.iml" /> | ||
| 7 | <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" /> | 6 | <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" /> |
| 8 | <module fileurl="file://$PROJECT_DIR$/user/user.iml" filepath="$PROJECT_DIR$/user/user.iml" /> | 7 | <module fileurl="file://$PROJECT_DIR$/user/user.iml" filepath="$PROJECT_DIR$/user/user.iml" /> |
| 9 | </modules> | 8 | </modules> |
| 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <project version="4"> | 2 | <project version="4"> |
| 3 | <component name="VcsDirectoryMappings"> | 3 | <component name="VcsDirectoryMappings"> |
| 4 | - <mapping directory="$PROJECT_DIR$" vcs="Git" /> | 4 | + <mapping directory="" vcs="Git" /> |
| 5 | </component> | 5 | </component> |
| 6 | </project> | 6 | </project> |
| 7 | \ No newline at end of file | 7 | \ No newline at end of file |
| @@ -53,6 +53,7 @@ | @@ -53,6 +53,7 @@ | ||
| 53 | android:launchMode="singleTop" | 53 | android:launchMode="singleTop" |
| 54 | android:screenOrientation="portrait" | 54 | android:screenOrientation="portrait" |
| 55 | android:windowSoftInputMode="adjustResize" /> | 55 | android:windowSoftInputMode="adjustResize" /> |
| 56 | + | ||
| 56 | <activity android:name=".user.activity.LoginActivity"/> | 57 | <activity android:name=".user.activity.LoginActivity"/> |
| 57 | 58 | ||
| 58 | <receiver | 59 | <receiver |
| @@ -9,13 +9,14 @@ import android.view.LayoutInflater; | @@ -9,13 +9,14 @@ import android.view.LayoutInflater; | ||
| 9 | import android.view.View; | 9 | import android.view.View; |
| 10 | import android.view.ViewGroup; | 10 | import android.view.ViewGroup; |
| 11 | 11 | ||
| 12 | +import com.bumptech.glide.Glide; | ||
| 12 | import com.cnlive.gundam.R; | 13 | import com.cnlive.gundam.R; |
| 13 | import com.cnlive.gundam.databinding.UserFragmentBinding; | 14 | import com.cnlive.gundam.databinding.UserFragmentBinding; |
| 14 | import com.cnlive.gundam.user.activity.CommentActivity; | 15 | import com.cnlive.gundam.user.activity.CommentActivity; |
| 15 | import com.cnlive.gundam.user.activity.LoginActivity; | 16 | import com.cnlive.gundam.user.activity.LoginActivity; |
| 16 | import com.cnlive.gundam.user.activity.UserPersonalActivity; | 17 | import com.cnlive.gundam.user.activity.UserPersonalActivity; |
| 17 | import com.cnlive.gundam.user.auth.UserService; | 18 | import com.cnlive.gundam.user.auth.UserService; |
| 18 | - | 19 | +import com.cnlive.gundam.user.model.User; |
| 19 | 20 | ||
| 20 | 21 | ||
| 21 | /** | 22 | /** |
| @@ -29,7 +30,6 @@ public class ConfigFragment extends Fragment implements View.OnClickListener { | @@ -29,7 +30,6 @@ public class ConfigFragment extends Fragment implements View.OnClickListener { | ||
| 29 | @Override | 30 | @Override |
| 30 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { | 31 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { |
| 31 | binding = DataBindingUtil.inflate(inflater, R.layout.user_fragment, container, false); | 32 | binding = DataBindingUtil.inflate(inflater, R.layout.user_fragment, container, false); |
| 32 | - | ||
| 33 | return binding.getRoot(); | 33 | return binding.getRoot(); |
| 34 | } | 34 | } |
| 35 | 35 | ||
| @@ -40,24 +40,14 @@ public class ConfigFragment extends Fragment implements View.OnClickListener { | @@ -40,24 +40,14 @@ public class ConfigFragment extends Fragment implements View.OnClickListener { | ||
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | 42 | ||
| 43 | - /* public static Fragment newInstance() { | ||
| 44 | - UserFragment fragment = new UserFragment(); | ||
| 45 | - return fragment; | ||
| 46 | - }*/ | ||
| 47 | - | ||
| 48 | @Override | 43 | @Override |
| 49 | public void onActivityCreated(Bundle savedInstanceState) { | 44 | public void onActivityCreated(Bundle savedInstanceState) { |
| 50 | super.onActivityCreated(savedInstanceState); | 45 | super.onActivityCreated(savedInstanceState); |
| 51 | 46 | ||
| 52 | - | ||
| 53 | - /*initToolBar(); | ||
| 54 | - init(); | ||
| 55 | - MyHeadItem.getContent(getActivity());*/ | ||
| 56 | } | 47 | } |
| 57 | 48 | ||
| 58 | private void initUI() { | 49 | private void initUI() { |
| 59 | binding.configHeader.setOnClickListener(this); | 50 | binding.configHeader.setOnClickListener(this); |
| 60 | - binding.live.setOnClickListener(this); | ||
| 61 | binding.message.setOnClickListener(this); | 51 | binding.message.setOnClickListener(this); |
| 62 | } | 52 | } |
| 63 | 53 | ||
| @@ -65,10 +55,11 @@ public class ConfigFragment extends Fragment implements View.OnClickListener { | @@ -65,10 +55,11 @@ public class ConfigFragment extends Fragment implements View.OnClickListener { | ||
| 65 | @Override | 55 | @Override |
| 66 | public void onClick(View view) { | 56 | public void onClick(View view) { |
| 67 | switch (view.getId()) { | 57 | switch (view.getId()) { |
| 68 | - | ||
| 69 | - | ||
| 70 | case R.id.config_header: | 58 | case R.id.config_header: |
| 71 | int uid = UserService.getInstance(getActivity()).getActiveAccountInfo().getUid(); | 59 | int uid = UserService.getInstance(getActivity()).getActiveAccountInfo().getUid(); |
| 60 | + if (uid != 0) | ||
| 61 | + startActivity(new Intent(getActivity(), UserPersonalActivity.class)); | ||
| 62 | + else | ||
| 72 | if (uid != 0) { | 63 | if (uid != 0) { |
| 73 | //进入个人中心页面 | 64 | //进入个人中心页面 |
| 74 | Intent intent = new Intent(getActivity(), UserPersonalActivity.class); | 65 | Intent intent = new Intent(getActivity(), UserPersonalActivity.class); |
| @@ -77,18 +68,25 @@ public class ConfigFragment extends Fragment implements View.OnClickListener { | @@ -77,18 +68,25 @@ public class ConfigFragment extends Fragment implements View.OnClickListener { | ||
| 77 | } else { | 68 | } else { |
| 78 | //进入登录页面 | 69 | //进入登录页面 |
| 79 | startActivity(new Intent(getActivity(), LoginActivity.class)); | 70 | startActivity(new Intent(getActivity(), LoginActivity.class)); |
| 80 | - } | ||
| 81 | - | ||
| 82 | break; | 71 | break; |
| 83 | - case R.id.live: | ||
| 84 | 72 | ||
| 85 | - break; | ||
| 86 | case R.id.message: | 73 | case R.id.message: |
| 87 | startActivity(new Intent(getActivity(), CommentActivity.class)); | 74 | startActivity(new Intent(getActivity(), CommentActivity.class)); |
| 88 | - | ||
| 89 | break; | 75 | break; |
| 90 | 76 | ||
| 91 | } | 77 | } |
| 92 | 78 | ||
| 93 | } | 79 | } |
| 80 | + | ||
| 81 | + @Override | ||
| 82 | + public void onResume() { | ||
| 83 | + super.onResume(); | ||
| 84 | + if (UserService.getInstance(getActivity()).getActiveAccountInfo().getUid() != 0) notifyUI(); | ||
| 85 | + } | ||
| 86 | + | ||
| 87 | + private void notifyUI() { | ||
| 88 | + User activeAccountInfo = UserService.getInstance(getActivity()).getActiveAccountInfo(); | ||
| 89 | + Glide.with(getActivity()).load(activeAccountInfo.getFaceurl()).into(binding.headImg); | ||
| 90 | + binding.tvNickname.setText(activeAccountInfo.getNickname()); | ||
| 91 | + } | ||
| 94 | } | 92 | } |
| @@ -34,9 +34,7 @@ public class LoginActivity extends AppCompatActivity { | @@ -34,9 +34,7 @@ public class LoginActivity extends AppCompatActivity { | ||
| 34 | // TODO Auto-generated method stub | 34 | // TODO Auto-generated method stub |
| 35 | if(ev.getAction()== MotionEvent.ACTION_DOWN){ | 35 | if(ev.getAction()== MotionEvent.ACTION_DOWN){ |
| 36 | 36 | ||
| 37 | - // 获得当前得到焦点的View,一般情况下就是EditText(特殊情况就是轨迹求或者实体案件会移动焦点) | ||
| 38 | View v=getCurrentFocus(); | 37 | View v=getCurrentFocus(); |
| 39 | - | ||
| 40 | if(DevilUtil.isShouldHideInput(v,ev)){ | 38 | if(DevilUtil.isShouldHideInput(v,ev)){ |
| 41 | InputMethodManager im=(InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); | 39 | InputMethodManager im=(InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); |
| 42 | DevilUtil.hideSoftInput(v.getWindowToken(),im); | 40 | DevilUtil.hideSoftInput(v.getWindowToken(),im); |
| @@ -67,7 +67,7 @@ public class FeedbackFragment extends Fragment implements View.OnClickListener { | @@ -67,7 +67,7 @@ public class FeedbackFragment extends Fragment implements View.OnClickListener { | ||
| 67 | public void onClick(View v) { | 67 | public void onClick(View v) { |
| 68 | int i = v.getId(); | 68 | int i = v.getId(); |
| 69 | if (i == R.id.back_selector) {//返回上一页面 | 69 | if (i == R.id.back_selector) {//返回上一页面 |
| 70 | - getFragmentManager().popBackStack(); | 70 | + getActivity().finish(); |
| 71 | 71 | ||
| 72 | } else if (i == R.id.feedback) { | 72 | } else if (i == R.id.feedback) { |
| 73 | /** | 73 | /** |
| @@ -94,7 +94,7 @@ public class FeedbackFragment extends Fragment implements View.OnClickListener { | @@ -94,7 +94,7 @@ public class FeedbackFragment extends Fragment implements View.OnClickListener { | ||
| 94 | switch (what) { | 94 | switch (what) { |
| 95 | case IUserService.SUCCESS: | 95 | case IUserService.SUCCESS: |
| 96 | ToastUtil.show(getActivity(), "反馈成功"); | 96 | ToastUtil.show(getActivity(), "反馈成功"); |
| 97 | - getFragmentManager().popBackStack(); | 97 | + getActivity().finish(); |
| 98 | break; | 98 | break; |
| 99 | case IUserService.ERROR_PARAM: | 99 | case IUserService.ERROR_PARAM: |
| 100 | ToastUtil.show(getActivity(), IUserService.message_error_param); | 100 | ToastUtil.show(getActivity(), IUserService.message_error_param); |
| @@ -34,7 +34,6 @@ public class LoginFragment extends Fragment implements View.OnClickListener { | @@ -34,7 +34,6 @@ public class LoginFragment extends Fragment implements View.OnClickListener { | ||
| 34 | public static DataEntity data; | 34 | public static DataEntity data; |
| 35 | 35 | ||
| 36 | private Account account;//密码登录的account | 36 | private Account account;//密码登录的account |
| 37 | - private Account account1;//第三方登录的account | ||
| 38 | 37 | ||
| 39 | //跳转页面的对话框 | 38 | //跳转页面的对话框 |
| 40 | private ProgressDialog dialog; | 39 | private ProgressDialog dialog; |
| @@ -155,8 +154,9 @@ public class LoginFragment extends Fragment implements View.OnClickListener { | @@ -155,8 +154,9 @@ public class LoginFragment extends Fragment implements View.OnClickListener { | ||
| 155 | closeDialog(); | 154 | closeDialog(); |
| 156 | UserData userData = (UserData) obj; | 155 | UserData userData = (UserData) obj; |
| 157 | data = userData.getData(); | 156 | data = userData.getData(); |
| 157 | + | ||
| 158 | UserService userService = UserService.getInstance(getActivity()); | 158 | UserService userService = UserService.getInstance(getActivity()); |
| 159 | - userService.setUserInfo(account, data); | 159 | + userService.setUserInfo(account,data); |
| 160 | //userService.isAutoLogin(); | 160 | //userService.isAutoLogin(); |
| 161 | userService.autoLogin(binding.edtLoginNumber.toString(), binding.edtInputPassward.getText().toString(), data); | 161 | userService.autoLogin(binding.edtLoginNumber.toString(), binding.edtInputPassward.getText().toString(), data); |
| 162 | 162 |
| 1 | -package com.cnlive.gundam.user.model; | ||
| 2 | - | ||
| 3 | - | ||
| 4 | -import java.io.Serializable; | ||
| 5 | - | ||
| 6 | -/** | ||
| 7 | - * Created by Lynn on 5/25/2017. | ||
| 8 | - */ | ||
| 9 | - | ||
| 10 | -public class ActiveInfo implements Serializable { | ||
| 11 | - private int totalCount; | ||
| 12 | - private int nextCursor; | ||
| 13 | - private int preCursor; | ||
| 14 | - private String activityId; | ||
| 15 | - private String activityName; | ||
| 16 | - private int activityStatus; | ||
| 17 | - private int isHorizontalScreen; | ||
| 18 | - private String channelId; | ||
| 19 | - private String createTime; | ||
| 20 | - private String startTime; | ||
| 21 | - private String endTime; | ||
| 22 | - private String coverImgUrl; | ||
| 23 | - private String activityCategory; | ||
| 24 | - private Object extensions; | ||
| 25 | - private String rates; | ||
| 26 | - | ||
| 27 | - public ActiveInfo() { | ||
| 28 | - } | ||
| 29 | - | ||
| 30 | - public ActiveInfo(int totalCount, int nextCursor, int preCursor, String activityId, String activityName, int activityStatus, int isHorizontalScreen, String channelId, String createTime, String startTime, String endTime, String coverImgUrl, String activityCategory, Object extensions, String rates) { | ||
| 31 | - this.totalCount = totalCount; | ||
| 32 | - this.nextCursor = nextCursor; | ||
| 33 | - this.preCursor = preCursor; | ||
| 34 | - this.activityId = activityId; | ||
| 35 | - this.activityName = activityName; | ||
| 36 | - this.activityStatus = activityStatus; | ||
| 37 | - this.isHorizontalScreen = isHorizontalScreen; | ||
| 38 | - this.channelId = channelId; | ||
| 39 | - this.createTime = createTime; | ||
| 40 | - this.startTime = startTime; | ||
| 41 | - this.endTime = endTime; | ||
| 42 | - this.coverImgUrl = coverImgUrl; | ||
| 43 | - this.activityCategory = activityCategory; | ||
| 44 | - this.extensions = extensions; | ||
| 45 | - this.rates = rates; | ||
| 46 | - } | ||
| 47 | - | ||
| 48 | - public int getTotalCount() { | ||
| 49 | - return totalCount; | ||
| 50 | - } | ||
| 51 | - | ||
| 52 | - public void setTotalCount(int totalCount) { | ||
| 53 | - this.totalCount = totalCount; | ||
| 54 | - } | ||
| 55 | - | ||
| 56 | - public int getNextCursor() { | ||
| 57 | - return nextCursor; | ||
| 58 | - } | ||
| 59 | - | ||
| 60 | - public void setNextCursor(int nextCursor) { | ||
| 61 | - this.nextCursor = nextCursor; | ||
| 62 | - } | ||
| 63 | - | ||
| 64 | - public int getPreCursor() { | ||
| 65 | - return preCursor; | ||
| 66 | - } | ||
| 67 | - | ||
| 68 | - public void setPreCursor(int preCursor) { | ||
| 69 | - this.preCursor = preCursor; | ||
| 70 | - } | ||
| 71 | - | ||
| 72 | - public String getActivityId() { | ||
| 73 | - return activityId; | ||
| 74 | - } | ||
| 75 | - | ||
| 76 | - public void setActivityId(String activityId) { | ||
| 77 | - this.activityId = activityId; | ||
| 78 | - } | ||
| 79 | - | ||
| 80 | - public String getActivityName() { | ||
| 81 | - return activityName; | ||
| 82 | - } | ||
| 83 | - | ||
| 84 | - public void setActivityName(String activityName) { | ||
| 85 | - this.activityName = activityName; | ||
| 86 | - } | ||
| 87 | - | ||
| 88 | - public int getActivityStatus() { | ||
| 89 | - return activityStatus; | ||
| 90 | - } | ||
| 91 | - | ||
| 92 | - public void setActivityStatus(int activityStatus) { | ||
| 93 | - this.activityStatus = activityStatus; | ||
| 94 | - } | ||
| 95 | - | ||
| 96 | - public int getIsHorizontalScreen() { | ||
| 97 | - return isHorizontalScreen; | ||
| 98 | - } | ||
| 99 | - | ||
| 100 | - public void setIsHorizontalScreen(int isHorizontalScreen) { | ||
| 101 | - this.isHorizontalScreen = isHorizontalScreen; | ||
| 102 | - } | ||
| 103 | - | ||
| 104 | - public String getChannelId() { | ||
| 105 | - return channelId; | ||
| 106 | - } | ||
| 107 | - | ||
| 108 | - public void setChannelId(String channelId) { | ||
| 109 | - this.channelId = channelId; | ||
| 110 | - } | ||
| 111 | - | ||
| 112 | - public String getCreateTime() { | ||
| 113 | - return createTime; | ||
| 114 | - } | ||
| 115 | - | ||
| 116 | - public void setCreateTime(String createTime) { | ||
| 117 | - this.createTime = createTime; | ||
| 118 | - } | ||
| 119 | - | ||
| 120 | - public String getStartTime() { | ||
| 121 | - return startTime; | ||
| 122 | - } | ||
| 123 | - | ||
| 124 | - public void setStartTime(String startTime) { | ||
| 125 | - this.startTime = startTime; | ||
| 126 | - } | ||
| 127 | - | ||
| 128 | - public String getEndTime() { | ||
| 129 | - return endTime; | ||
| 130 | - } | ||
| 131 | - | ||
| 132 | - public void setEndTime(String endTime) { | ||
| 133 | - this.endTime = endTime; | ||
| 134 | - } | ||
| 135 | - | ||
| 136 | - public String getCoverImgUrl() { | ||
| 137 | - return coverImgUrl; | ||
| 138 | - } | ||
| 139 | - | ||
| 140 | - public void setCoverImgUrl(String coverImgUrl) { | ||
| 141 | - this.coverImgUrl = coverImgUrl; | ||
| 142 | - } | ||
| 143 | - | ||
| 144 | - public String getActivityCategory() { | ||
| 145 | - return activityCategory; | ||
| 146 | - } | ||
| 147 | - | ||
| 148 | - public void setActivityCategory(String activityCategory) { | ||
| 149 | - this.activityCategory = activityCategory; | ||
| 150 | - } | ||
| 151 | - | ||
| 152 | - public Object getExtensions() { | ||
| 153 | - return extensions; | ||
| 154 | - } | ||
| 155 | - | ||
| 156 | - public void setExtensions(Object extensions) { | ||
| 157 | - this.extensions = extensions; | ||
| 158 | - } | ||
| 159 | - | ||
| 160 | - public String getRates() { | ||
| 161 | - return rates; | ||
| 162 | - } | ||
| 163 | - | ||
| 164 | - public void setRates(String rates) { | ||
| 165 | - this.rates = rates; | ||
| 166 | - } | ||
| 167 | - | ||
| 168 | - @Override | ||
| 169 | - public String toString() { | ||
| 170 | - return "ActiveInfo{" + | ||
| 171 | - "totalCount=" + totalCount + | ||
| 172 | - ", nextCursor=" + nextCursor + | ||
| 173 | - ", preCursor=" + preCursor + | ||
| 174 | - ", activityId='" + activityId + '\'' + | ||
| 175 | - ", activityName='" + activityName + '\'' + | ||
| 176 | - ", activityStatus=" + activityStatus + | ||
| 177 | - ", isHorizontalScreen=" + isHorizontalScreen + | ||
| 178 | - ", channelId='" + channelId + '\'' + | ||
| 179 | - ", createTime='" + createTime + '\'' + | ||
| 180 | - ", startTime='" + startTime + '\'' + | ||
| 181 | - ", endTime='" + endTime + '\'' + | ||
| 182 | - ", coverImgUrl='" + coverImgUrl + '\'' + | ||
| 183 | - ", activityCategory='" + activityCategory + '\'' + | ||
| 184 | - ", extensions='" + extensions + '\'' + | ||
| 185 | - ", rates='" + rates + '\'' + | ||
| 186 | - '}'; | ||
| 187 | - } | ||
| 188 | -} |
| 1 | -package com.cnlive.gundam.user.model; | ||
| 2 | - | ||
| 3 | - | ||
| 4 | -import com.cnlive.gundam.user.model.base.ErrorMessage; | ||
| 5 | - | ||
| 6 | -import java.io.Serializable; | ||
| 7 | - | ||
| 8 | -/** | ||
| 9 | - * Created by Lynn on 5/26/2017. | ||
| 10 | - */ | ||
| 11 | - | ||
| 12 | -public class ChannelInfoModel extends ErrorMessage { | ||
| 13 | - private ChannelInfo data; | ||
| 14 | - | ||
| 15 | - public ChannelInfoModel() { | ||
| 16 | - } | ||
| 17 | - | ||
| 18 | - public ChannelInfoModel(ChannelInfo data) { | ||
| 19 | - this.data = data; | ||
| 20 | - } | ||
| 21 | - | ||
| 22 | - public ChannelInfo getData() { | ||
| 23 | - return data; | ||
| 24 | - } | ||
| 25 | - | ||
| 26 | - public void setData(ChannelInfo data) { | ||
| 27 | - this.data = data; | ||
| 28 | - } | ||
| 29 | - | ||
| 30 | - public class ChannelInfo implements Serializable { | ||
| 31 | - private String coverImgUrl; | ||
| 32 | - private String channelId; | ||
| 33 | - private String channelName; | ||
| 34 | - private int status; | ||
| 35 | - | ||
| 36 | - public ChannelInfo() { | ||
| 37 | - } | ||
| 38 | - | ||
| 39 | - public ChannelInfo(String coverImgUrl, String channelId, String channelName, int status) { | ||
| 40 | - this.coverImgUrl = coverImgUrl; | ||
| 41 | - this.channelId = channelId; | ||
| 42 | - this.channelName = channelName; | ||
| 43 | - this.status = status; | ||
| 44 | - } | ||
| 45 | - | ||
| 46 | - public String getCoverImgUrl() { | ||
| 47 | - return coverImgUrl; | ||
| 48 | - } | ||
| 49 | - | ||
| 50 | - public void setCoverImgUrl(String coverImgUrl) { | ||
| 51 | - this.coverImgUrl = coverImgUrl; | ||
| 52 | - } | ||
| 53 | - | ||
| 54 | - public String getChannelId() { | ||
| 55 | - return channelId; | ||
| 56 | - } | ||
| 57 | - | ||
| 58 | - public void setChannelId(String channelId) { | ||
| 59 | - this.channelId = channelId; | ||
| 60 | - } | ||
| 61 | - | ||
| 62 | - public String getChannelName() { | ||
| 63 | - return channelName; | ||
| 64 | - } | ||
| 65 | - | ||
| 66 | - public void setChannelName(String channelName) { | ||
| 67 | - this.channelName = channelName; | ||
| 68 | - } | ||
| 69 | - | ||
| 70 | - public int getStatus() { | ||
| 71 | - return status; | ||
| 72 | - } | ||
| 73 | - | ||
| 74 | - public void setStatus(int status) { | ||
| 75 | - this.status = status; | ||
| 76 | - } | ||
| 77 | - | ||
| 78 | - @Override | ||
| 79 | - public String toString() { | ||
| 80 | - return "ChannelInfo{" + | ||
| 81 | - "coverImgUrl='" + coverImgUrl + '\'' + | ||
| 82 | - ", channelId='" + channelId + '\'' + | ||
| 83 | - ", channelName='" + channelName + '\'' + | ||
| 84 | - ", status=" + status + | ||
| 85 | - '}'; | ||
| 86 | - } | ||
| 87 | - } | ||
| 88 | - | ||
| 89 | - @Override | ||
| 90 | - public String toString() { | ||
| 91 | - return "ChannelInfoModel{" + | ||
| 92 | - "data=" + data + | ||
| 93 | - '}'; | ||
| 94 | - } | ||
| 95 | -} |
| 1 | +package com.cnlive.gundam.user.view; | ||
| 2 | + | ||
| 3 | +import android.annotation.SuppressLint; | ||
| 4 | +import android.content.Context; | ||
| 5 | +import android.content.res.TypedArray; | ||
| 6 | +import android.graphics.Bitmap; | ||
| 7 | +import android.graphics.BitmapShader; | ||
| 8 | +import android.graphics.Canvas; | ||
| 9 | +import android.graphics.Color; | ||
| 10 | +import android.graphics.Matrix; | ||
| 11 | +import android.graphics.Paint; | ||
| 12 | +import android.graphics.RectF; | ||
| 13 | +import android.graphics.Shader; | ||
| 14 | +import android.graphics.drawable.BitmapDrawable; | ||
| 15 | +import android.graphics.drawable.ColorDrawable; | ||
| 16 | +import android.graphics.drawable.Drawable; | ||
| 17 | +import android.util.AttributeSet; | ||
| 18 | +import android.widget.ImageView; | ||
| 19 | + | ||
| 20 | +import com.cnlive.gundam.R; | ||
| 21 | + | ||
| 22 | + | ||
| 23 | +/** | ||
| 24 | + * @author 陈硕 | ||
| 25 | + * @time 2016/11/7 10:27 | ||
| 26 | + * @desc ${TODD} | ||
| 27 | + */ | ||
| 28 | +@SuppressLint("AppCompatCustomView") | ||
| 29 | +public class CircleImageView extends ImageView { | ||
| 30 | + | ||
| 31 | + | ||
| 32 | + private static final ImageView.ScaleType SCALE_TYPE = ImageView.ScaleType.CENTER_CROP; | ||
| 33 | + | ||
| 34 | + private static final Bitmap.Config BITMAP_CONFIG = Bitmap.Config.ARGB_8888; | ||
| 35 | + private static final int COLORDRAWABLE_DIMENSION = 1; | ||
| 36 | + | ||
| 37 | + private static final int DEFAULT_BORDER_WIDTH = 0; | ||
| 38 | + private static final int DEFAULT_BORDER_COLOR = Color.BLACK; | ||
| 39 | + | ||
| 40 | + private final RectF mDrawableRect = new RectF(); | ||
| 41 | + private final RectF mBorderRect = new RectF(); | ||
| 42 | + | ||
| 43 | + private final Matrix mShaderMatrix = new Matrix(); | ||
| 44 | + private final Paint mBitmapPaint = new Paint(); | ||
| 45 | + private final Paint mBorderPaint = new Paint(); | ||
| 46 | + | ||
| 47 | + private int mBorderColor = DEFAULT_BORDER_COLOR; | ||
| 48 | + private int mBorderWidth = DEFAULT_BORDER_WIDTH; | ||
| 49 | + | ||
| 50 | + private Bitmap mBitmap; | ||
| 51 | + private BitmapShader mBitmapShader; | ||
| 52 | + private int mBitmapWidth; | ||
| 53 | + private int mBitmapHeight; | ||
| 54 | + | ||
| 55 | + private float mDrawableRadius; | ||
| 56 | + private float mBorderRadius; | ||
| 57 | + | ||
| 58 | + private boolean mReady; | ||
| 59 | + private boolean mSetupPending; | ||
| 60 | + | ||
| 61 | + public CircleImageView(Context context) { | ||
| 62 | + super(context); | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + public CircleImageView(Context context, AttributeSet attrs) { | ||
| 66 | + this(context, attrs, 0); | ||
| 67 | + } | ||
| 68 | + | ||
| 69 | + public CircleImageView(Context context, AttributeSet attrs, int defStyle) { | ||
| 70 | + super(context, attrs, defStyle); | ||
| 71 | + super.setScaleType(SCALE_TYPE); | ||
| 72 | + | ||
| 73 | + TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.CircleImageView, defStyle, 0); | ||
| 74 | + | ||
| 75 | + mBorderWidth = a.getDimensionPixelSize(R.styleable.CircleImageView_border_width, DEFAULT_BORDER_WIDTH); | ||
| 76 | + mBorderColor = a.getColor(R.styleable.CircleImageView_border_color, DEFAULT_BORDER_COLOR); | ||
| 77 | + | ||
| 78 | + a.recycle(); | ||
| 79 | + | ||
| 80 | + mReady = true; | ||
| 81 | + | ||
| 82 | + if (mSetupPending) { | ||
| 83 | + setup(); | ||
| 84 | + mSetupPending = false; | ||
| 85 | + } | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + @Override | ||
| 89 | + public ScaleType getScaleType() { | ||
| 90 | + return SCALE_TYPE; | ||
| 91 | + } | ||
| 92 | + | ||
| 93 | + @Override | ||
| 94 | + public void setScaleType(ScaleType scaleType) { | ||
| 95 | + if (scaleType != SCALE_TYPE) { | ||
| 96 | + throw new IllegalArgumentException(String.format("ScaleType %s not supported.", scaleType)); | ||
| 97 | + } | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + @Override | ||
| 101 | + protected void onDraw(Canvas canvas) { | ||
| 102 | + if (getDrawable() == null) { | ||
| 103 | + return; | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + canvas.drawCircle(getWidth() / 2, getHeight() / 2, mDrawableRadius, mBitmapPaint); | ||
| 107 | + canvas.drawCircle(getWidth() / 2, getHeight() / 2, mBorderRadius, mBorderPaint); | ||
| 108 | + } | ||
| 109 | + | ||
| 110 | + @Override | ||
| 111 | + protected void onSizeChanged(int w, int h, int oldw, int oldh) { | ||
| 112 | + super.onSizeChanged(w, h, oldw, oldh); | ||
| 113 | + setup(); | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + public int getBorderColor() { | ||
| 117 | + return mBorderColor; | ||
| 118 | + } | ||
| 119 | + | ||
| 120 | + public void setBorderColor(int borderColor) { | ||
| 121 | + if (borderColor == mBorderColor) { | ||
| 122 | + return; | ||
| 123 | + } | ||
| 124 | + | ||
| 125 | + mBorderColor = borderColor; | ||
| 126 | + mBorderPaint.setColor(mBorderColor); | ||
| 127 | + invalidate(); | ||
| 128 | + } | ||
| 129 | + | ||
| 130 | + public int getBorderWidth() { | ||
| 131 | + return mBorderWidth; | ||
| 132 | + } | ||
| 133 | + | ||
| 134 | + public void setBorderWidth(int borderWidth) { | ||
| 135 | + if (borderWidth == mBorderWidth) { | ||
| 136 | + return; | ||
| 137 | + } | ||
| 138 | + | ||
| 139 | + mBorderWidth = borderWidth; | ||
| 140 | + setup(); | ||
| 141 | + } | ||
| 142 | + | ||
| 143 | + @Override | ||
| 144 | + public void setImageBitmap(Bitmap bm) { | ||
| 145 | + super.setImageBitmap(bm); | ||
| 146 | + mBitmap = bm; | ||
| 147 | + setup(); | ||
| 148 | + } | ||
| 149 | + | ||
| 150 | + @Override | ||
| 151 | + public void setImageDrawable(Drawable drawable) { | ||
| 152 | + super.setImageDrawable(drawable); | ||
| 153 | + mBitmap = getBitmapFromDrawable(drawable); | ||
| 154 | + setup(); | ||
| 155 | + } | ||
| 156 | + | ||
| 157 | + @Override | ||
| 158 | + public void setImageResource(int resId) { | ||
| 159 | + super.setImageResource(resId); | ||
| 160 | + mBitmap = getBitmapFromDrawable(getDrawable()); | ||
| 161 | + setup(); | ||
| 162 | + } | ||
| 163 | + | ||
| 164 | + private Bitmap getBitmapFromDrawable(Drawable drawable) { | ||
| 165 | + if (drawable == null) { | ||
| 166 | + return null; | ||
| 167 | + } | ||
| 168 | + | ||
| 169 | + if (drawable instanceof BitmapDrawable) { | ||
| 170 | + return ((BitmapDrawable) drawable).getBitmap(); | ||
| 171 | + } | ||
| 172 | + | ||
| 173 | + try { | ||
| 174 | + Bitmap bitmap; | ||
| 175 | + | ||
| 176 | + if (drawable instanceof ColorDrawable) { | ||
| 177 | + bitmap = Bitmap.createBitmap(COLORDRAWABLE_DIMENSION, COLORDRAWABLE_DIMENSION, BITMAP_CONFIG); | ||
| 178 | + } else { | ||
| 179 | + bitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(), BITMAP_CONFIG); | ||
| 180 | + } | ||
| 181 | + | ||
| 182 | + Canvas canvas = new Canvas(bitmap); | ||
| 183 | + drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight()); | ||
| 184 | + drawable.draw(canvas); | ||
| 185 | + return bitmap; | ||
| 186 | + } catch (OutOfMemoryError e) { | ||
| 187 | + return null; | ||
| 188 | + } | ||
| 189 | + } | ||
| 190 | + | ||
| 191 | + private void setup() { | ||
| 192 | + if (!mReady) { | ||
| 193 | + mSetupPending = true; | ||
| 194 | + return; | ||
| 195 | + } | ||
| 196 | + | ||
| 197 | + if (mBitmap == null) { | ||
| 198 | + return; | ||
| 199 | + } | ||
| 200 | + | ||
| 201 | + mBitmapShader = new BitmapShader(mBitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP); | ||
| 202 | + | ||
| 203 | + mBitmapPaint.setAntiAlias(true); | ||
| 204 | + mBitmapPaint.setShader(mBitmapShader); | ||
| 205 | + | ||
| 206 | + mBorderPaint.setStyle(Paint.Style.STROKE); | ||
| 207 | + mBorderPaint.setAntiAlias(true); | ||
| 208 | + mBorderPaint.setColor(mBorderColor); | ||
| 209 | + mBorderPaint.setStrokeWidth(mBorderWidth); | ||
| 210 | + | ||
| 211 | + mBitmapHeight = mBitmap.getHeight(); | ||
| 212 | + mBitmapWidth = mBitmap.getWidth(); | ||
| 213 | + | ||
| 214 | + mBorderRect.set(0, 0, getWidth(), getHeight()); | ||
| 215 | + mBorderRadius = Math.min((mBorderRect.height() - mBorderWidth) / 2, (mBorderRect.width() - mBorderWidth) / 2); | ||
| 216 | + | ||
| 217 | + mDrawableRect.set(mBorderWidth, mBorderWidth, mBorderRect.width() - mBorderWidth, mBorderRect.height() - mBorderWidth); | ||
| 218 | + mDrawableRadius = Math.min(mDrawableRect.height() / 2, mDrawableRect.width() / 2); | ||
| 219 | + | ||
| 220 | + updateShaderMatrix(); | ||
| 221 | + invalidate(); | ||
| 222 | + } | ||
| 223 | + | ||
| 224 | + private void updateShaderMatrix() { | ||
| 225 | + float scale; | ||
| 226 | + float dx = 0; | ||
| 227 | + float dy = 0; | ||
| 228 | + | ||
| 229 | + mShaderMatrix.set(null); | ||
| 230 | + | ||
| 231 | + if (mBitmapWidth * mDrawableRect.height() > mDrawableRect.width() * mBitmapHeight) { | ||
| 232 | + scale = mDrawableRect.height() / (float) mBitmapHeight; | ||
| 233 | + dx = (mDrawableRect.width() - mBitmapWidth * scale) * 0.5f; | ||
| 234 | + } else { | ||
| 235 | + scale = mDrawableRect.width() / (float) mBitmapWidth; | ||
| 236 | + dy = (mDrawableRect.height() - mBitmapHeight * scale) * 0.5f; | ||
| 237 | + } | ||
| 238 | + | ||
| 239 | + mShaderMatrix.setScale(scale, scale); | ||
| 240 | + mShaderMatrix.postTranslate((int) (dx + 0.5f) + mBorderWidth, (int) (dy + 0.5f) + mBorderWidth); | ||
| 241 | + | ||
| 242 | + mBitmapShader.setLocalMatrix(mShaderMatrix); | ||
| 243 | + } | ||
| 244 | + | ||
| 245 | +} | ||
| 246 | + | ||
| 247 | + |
4.46 KB
4.12 KB
1.52 KB
2.3 KB
650 Bytes
883 Bytes
732 Bytes
999 Bytes
681 Bytes
931 Bytes
518 Bytes
692 Bytes
723 Bytes
1.89 KB
849 Bytes
2.01 KB
1.71 KB
2.02 KB
4.45 KB
4.12 KB
4.11 KB
3.91 KB
4.49 KB
5.06 KB
4.42 KB
4.09 KB
4.15 KB
4.05 KB
2.83 KB
2.5 KB
2.49 KB
2.29 KB
822 Bytes
1.18 KB
411 Bytes
564 Bytes
464 Bytes
632 Bytes
516 Bytes
717 Bytes
315 Bytes
425 Bytes
506 Bytes
1.3 KB
588 Bytes
1.16 KB
1.01 KB
1.09 KB
2.43 KB
2.25 KB
2.28 KB
2.21 KB
2.45 KB
2.8 KB
2.45 KB
2.26 KB
2.36 KB
2.26 KB
1.54 KB
1.36 KB
5.84 KB
5.52 KB
1.82 KB
2.63 KB
702 Bytes
910 Bytes
874 Bytes
1.16 KB
994 Bytes
1.3 KB
561 Bytes
729 Bytes
1.06 KB
2.92 KB
1.47 KB
3.38 KB
2.83 KB
2.58 KB
5.83 KB
5.44 KB
5.4 KB
5.26 KB
6.04 KB
6.82 KB
6.03 KB
5.55 KB
5.35 KB
5.36 KB
10.5 KB
9.94 KB
3.39 KB
4.77 KB
1.24 KB
1.56 KB
1.56 KB
2.07 KB
1.39 KB
1.79 KB
1.04 KB
1.29 KB
10.9 KB
10.1 KB
9.61 KB
9.46 KB
11.1 KB
12.5 KB
11.1 KB
10.1 KB
9.68 KB
9.55 KB
7.4 KB
6.79 KB
14.3 KB
13.8 KB
4 KB
5.42 KB
1.56 KB
1.96 KB
2.01 KB
2.49 KB
2.12 KB
2.69 KB
1.38 KB
1.65 KB
3.22 KB
8.37 KB
4.52 KB
9.8 KB
8 KB
7.44 KB
14.9 KB
14 KB
13.2 KB
13.3 KB
15.7 KB
17.7 KB
15.8 KB
14.4 KB
13 KB
13.4 KB
10.7 KB
9.92 KB
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <selector xmlns:android="http://schemas.android.com/apk/res/android"> | 2 | <selector xmlns:android="http://schemas.android.com/apk/res/android"> |
| 3 | - <item android:drawable="@drawable/ic_flash_on_sel" android:state_pressed="true" /> | ||
| 4 | - <item android:drawable="@drawable/ic_flash_on" android:state_pressed="false" /> | 3 | + |
| 4 | + <item android:drawable="@drawable/stream_close_on" android:state_pressed="true" /> | ||
| 5 | + <item android:drawable="@drawable/stream_close" android:state_pressed="false" /> | ||
| 5 | </selector> | 6 | </selector> |
| 6 | \ No newline at end of file | 7 | \ No newline at end of file |
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <selector xmlns:android="http://schemas.android.com/apk/res/android"> | 2 | <selector xmlns:android="http://schemas.android.com/apk/res/android"> |
| 3 | - <item android:drawable="@drawable/ic_meiyan_on_sel" android:state_pressed="true" /> | ||
| 4 | - <item android:drawable="@drawable/ic_meiyan_on" android:state_pressed="false" /> | 3 | + <item android:drawable="@drawable/stream_flash_on_sel" android:state_pressed="true" /> |
| 4 | + <item android:drawable="@drawable/stream_flash_on" android:state_pressed="false" /> | ||
| 5 | </selector> | 5 | </selector> |
| 6 | \ No newline at end of file | 6 | \ No newline at end of file |
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <selector xmlns:android="http://schemas.android.com/apk/res/android"> | 2 | <selector xmlns:android="http://schemas.android.com/apk/res/android"> |
| 3 | 3 | ||
| 4 | - <item android:drawable="@drawable/ic_close_on" android:state_pressed="true" /> | ||
| 5 | - <item android:drawable="@drawable/ic_close" android:state_pressed="false" /> | 4 | + <item android:drawable="@drawable/stream_switch_camera_sel" android:state_pressed="true" /> |
| 5 | + <item android:drawable="@drawable/stream_switch_camera" android:state_pressed="false" /> | ||
| 6 | </selector> | 6 | </selector> |
| 7 | \ No newline at end of file | 7 | \ No newline at end of file |
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <selector xmlns:android="http://schemas.android.com/apk/res/android"> | 2 | <selector xmlns:android="http://schemas.android.com/apk/res/android"> |
| 3 | - <item android:drawable="@drawable/ic_meiyan_sel" android:state_pressed="true" /> | ||
| 4 | - <item android:drawable="@drawable/ic_meiyan" android:state_pressed="false" /> | 3 | + <item android:drawable="@drawable/stream_meiyan_sel" android:state_pressed="true" /> |
| 4 | + <item android:drawable="@drawable/stream_meiyan" android:state_pressed="false" /> | ||
| 5 | </selector> | 5 | </selector> |
| 6 | \ No newline at end of file | 6 | \ No newline at end of file |
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <selector xmlns:android="http://schemas.android.com/apk/res/android"> | 2 | <selector xmlns:android="http://schemas.android.com/apk/res/android"> |
| 3 | - | ||
| 4 | - <item android:drawable="@drawable/ic_switch_camera_sel" android:state_pressed="true" /> | ||
| 5 | - <item android:drawable="@drawable/ic_switch_camera" android:state_pressed="false" /> | 3 | + <item android:drawable="@drawable/stream_meiyan_on_sel" android:state_pressed="true" /> |
| 4 | + <item android:drawable="@drawable/stream_meiyan_on" android:state_pressed="false" /> | ||
| 6 | </selector> | 5 | </selector> |
| 7 | \ No newline at end of file | 6 | \ No newline at end of file |
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <selector xmlns:android="http://schemas.android.com/apk/res/android"> | 2 | <selector xmlns:android="http://schemas.android.com/apk/res/android"> |
| 3 | <!-- Non focused states --> | 3 | <!-- Non focused states --> |
| 4 | - <item android:drawable="@drawable/ic_camera_sel" android:state_focused="false" android:state_pressed="false" android:state_selected="false" /> | ||
| 5 | - <item android:drawable="@drawable/ic_camera" android:state_focused="false" android:state_pressed="false" android:state_selected="true" /> | 4 | + <item android:drawable="@drawable/main_camera_sel" android:state_focused="false" android:state_pressed="false" android:state_selected="false" /> |
| 5 | + <item android:drawable="@drawable/main_camera" android:state_focused="false" android:state_pressed="false" android:state_selected="true" /> | ||
| 6 | <!-- Focused states --> | 6 | <!-- Focused states --> |
| 7 | - <item android:drawable="@drawable/ic_camera" android:state_focused="true" android:state_pressed="false" android:state_selected="false" /> | ||
| 8 | - <item android:drawable="@drawable/ic_camera" android:state_focused="true" android:state_pressed="false" android:state_selected="true" /> | 7 | + <item android:drawable="@drawable/main_camera" android:state_focused="true" android:state_pressed="false" android:state_selected="false" /> |
| 8 | + <item android:drawable="@drawable/main_camera" android:state_focused="true" android:state_pressed="false" android:state_selected="true" /> | ||
| 9 | <!-- Pressed --> | 9 | <!-- Pressed --> |
| 10 | - <item android:drawable="@drawable/ic_camera" android:state_pressed="true" android:state_selected="true" /> | ||
| 11 | - <item android:drawable="@drawable/ic_camera" android:state_pressed="true" /> | 10 | + <item android:drawable="@drawable/main_camera" android:state_pressed="true" android:state_selected="true" /> |
| 11 | + <item android:drawable="@drawable/main_camera" android:state_pressed="true" /> | ||
| 12 | 12 | ||
| 13 | </selector> | 13 | </selector> |
| 14 | \ No newline at end of file | 14 | \ No newline at end of file |
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <selector xmlns:android="http://schemas.android.com/apk/res/android"> | 2 | <selector xmlns:android="http://schemas.android.com/apk/res/android"> |
| 3 | <!-- Non focused states --> | 3 | <!-- Non focused states --> |
| 4 | - <item android:drawable="@drawable/ic_home" android:state_focused="false" android:state_pressed="false" android:state_selected="false" /> | ||
| 5 | - <item android:drawable="@drawable/ic_home_sel" android:state_focused="false" android:state_pressed="false" android:state_selected="true" /> | 4 | + <item android:drawable="@drawable/main_home" android:state_focused="false" android:state_pressed="false" android:state_selected="false" /> |
| 5 | + <item android:drawable="@drawable/main_home_sel" android:state_focused="false" android:state_pressed="false" android:state_selected="true" /> | ||
| 6 | <!-- Focused states --> | 6 | <!-- Focused states --> |
| 7 | - <item android:drawable="@drawable/ic_home_sel" android:state_focused="true" android:state_pressed="false" android:state_selected="false" /> | ||
| 8 | - <item android:drawable="@drawable/ic_home_sel" android:state_focused="true" android:state_pressed="false" android:state_selected="true" /> | 7 | + <item android:drawable="@drawable/main_home_sel" android:state_focused="true" android:state_pressed="false" android:state_selected="false" /> |
| 8 | + <item android:drawable="@drawable/main_home_sel" android:state_focused="true" android:state_pressed="false" android:state_selected="true" /> | ||
| 9 | <!-- Pressed --> | 9 | <!-- Pressed --> |
| 10 | - <item android:drawable="@drawable/ic_home_sel" android:state_pressed="true" android:state_selected="true" /> | ||
| 11 | - <item android:drawable="@drawable/ic_home_sel" android:state_pressed="true" /> | 10 | + <item android:drawable="@drawable/main_home_sel" android:state_pressed="true" android:state_selected="true" /> |
| 11 | + <item android:drawable="@drawable/main_home_sel" android:state_pressed="true" /> | ||
| 12 | 12 | ||
| 13 | </selector> | 13 | </selector> |
| 14 | \ No newline at end of file | 14 | \ No newline at end of file |
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <selector xmlns:android="http://schemas.android.com/apk/res/android"> | 2 | <selector xmlns:android="http://schemas.android.com/apk/res/android"> |
| 3 | <!-- Non focused states --> | 3 | <!-- Non focused states --> |
| 4 | - <item android:drawable="@drawable/ic_live_tv" android:state_focused="false" android:state_pressed="false" android:state_selected="false" /> | ||
| 5 | - <item android:drawable="@drawable/ic_live_tv_sel" android:state_focused="false" android:state_pressed="false" android:state_selected="true" /> | 4 | + <item android:drawable="@drawable/main_live_tv" android:state_focused="false" android:state_pressed="false" android:state_selected="false" /> |
| 5 | + <item android:drawable="@drawable/main_live_tv_sel" android:state_focused="false" android:state_pressed="false" android:state_selected="true" /> | ||
| 6 | <!-- Focused states --> | 6 | <!-- Focused states --> |
| 7 | - <item android:drawable="@drawable/ic_live_tv_sel" android:state_focused="true" android:state_pressed="false" android:state_selected="false" /> | ||
| 8 | - <item android:drawable="@drawable/ic_live_tv_sel" android:state_focused="true" android:state_pressed="false" android:state_selected="true" /> | 7 | + <item android:drawable="@drawable/main_live_tv_sel" android:state_focused="true" android:state_pressed="false" android:state_selected="false" /> |
| 8 | + <item android:drawable="@drawable/main_live_tv_sel" android:state_focused="true" android:state_pressed="false" android:state_selected="true" /> | ||
| 9 | <!-- Pressed --> | 9 | <!-- Pressed --> |
| 10 | - <item android:drawable="@drawable/ic_live_tv_sel" android:state_pressed="true" android:state_selected="true" /> | ||
| 11 | - <item android:drawable="@drawable/ic_live_tv_sel" android:state_pressed="true" /> | 10 | + <item android:drawable="@drawable/main_live_tv_sel" android:state_pressed="true" android:state_selected="true" /> |
| 11 | + <item android:drawable="@drawable/main_live_tv_sel" android:state_pressed="true" /> | ||
| 12 | 12 | ||
| 13 | </selector> | 13 | </selector> |
| 14 | \ No newline at end of file | 14 | \ No newline at end of file |
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <selector xmlns:android="http://schemas.android.com/apk/res/android"> | 2 | <selector xmlns:android="http://schemas.android.com/apk/res/android"> |
| 3 | <!-- Non focused states --> | 3 | <!-- Non focused states --> |
| 4 | - <item android:drawable="@drawable/ic_person" android:state_focused="false" android:state_pressed="false" android:state_selected="false" /> | ||
| 5 | - <item android:drawable="@drawable/ic_person_sel" android:state_focused="false" android:state_pressed="false" android:state_selected="true" /> | 4 | + <item android:drawable="@drawable/main_person" android:state_focused="false" android:state_pressed="false" android:state_selected="false" /> |
| 5 | + <item android:drawable="@drawable/main_person_sel" android:state_focused="false" android:state_pressed="false" android:state_selected="true" /> | ||
| 6 | <!-- Focused states --> | 6 | <!-- Focused states --> |
| 7 | - <item android:drawable="@drawable/ic_person_sel" android:state_focused="true" android:state_pressed="false" android:state_selected="false" /> | ||
| 8 | - <item android:drawable="@drawable/ic_person_sel" android:state_focused="true" android:state_pressed="false" android:state_selected="true" /> | 7 | + <item android:drawable="@drawable/main_person_sel" android:state_focused="true" android:state_pressed="false" android:state_selected="false" /> |
| 8 | + <item android:drawable="@drawable/main_person_sel" android:state_focused="true" android:state_pressed="false" android:state_selected="true" /> | ||
| 9 | <!-- Pressed --> | 9 | <!-- Pressed --> |
| 10 | - <item android:drawable="@drawable/ic_person_sel" android:state_pressed="true" android:state_selected="true" /> | ||
| 11 | - <item android:drawable="@drawable/ic_person_sel" android:state_pressed="true" /> | 10 | + <item android:drawable="@drawable/main_person_sel" android:state_pressed="true" android:state_selected="true" /> |
| 11 | + <item android:drawable="@drawable/main_person_sel" android:state_pressed="true" /> | ||
| 12 | 12 | ||
| 13 | </selector> | 13 | </selector> |
| 14 | \ No newline at end of file | 14 | \ No newline at end of file |
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <selector xmlns:android="http://schemas.android.com/apk/res/android"> | 2 | <selector xmlns:android="http://schemas.android.com/apk/res/android"> |
| 3 | <!-- Non focused states --> | 3 | <!-- Non focused states --> |
| 4 | - <item android:drawable="@drawable/ic_videocam" android:state_focused="false" android:state_pressed="false" android:state_selected="false" /> | ||
| 5 | - <item android:drawable="@drawable/ic_videocam_sel" android:state_focused="false" android:state_pressed="false" android:state_selected="true" /> | 4 | + <item android:drawable="@drawable/main_videocam" android:state_focused="false" android:state_pressed="false" android:state_selected="false" /> |
| 5 | + <item android:drawable="@drawable/main_videocam_sel" android:state_focused="false" android:state_pressed="false" android:state_selected="true" /> | ||
| 6 | <!-- Focused states --> | 6 | <!-- Focused states --> |
| 7 | - <item android:drawable="@drawable/ic_videocam_sel" android:state_focused="true" android:state_pressed="false" android:state_selected="false" /> | ||
| 8 | - <item android:drawable="@drawable/ic_videocam_sel" android:state_focused="true" android:state_pressed="false" android:state_selected="true" /> | 7 | + <item android:drawable="@drawable/main_videocam_sel" android:state_focused="true" android:state_pressed="false" android:state_selected="false" /> |
| 8 | + <item android:drawable="@drawable/main_videocam_sel" android:state_focused="true" android:state_pressed="false" android:state_selected="true" /> | ||
| 9 | <!-- Pressed --> | 9 | <!-- Pressed --> |
| 10 | - <item android:drawable="@drawable/ic_videocam_sel" android:state_pressed="true" android:state_selected="true" /> | ||
| 11 | - <item android:drawable="@drawable/ic_videocam_sel" android:state_pressed="true" /> | 10 | + <item android:drawable="@drawable/main_videocam_sel" android:state_pressed="true" android:state_selected="true" /> |
| 11 | + <item android:drawable="@drawable/main_videocam_sel" android:state_pressed="true" /> | ||
| 12 | 12 | ||
| 13 | </selector> | 13 | </selector> |
| 14 | \ No newline at end of file | 14 | \ No newline at end of file |
| @@ -125,7 +125,7 @@ | @@ -125,7 +125,7 @@ | ||
| 125 | android:layout_below="@+id/end_view" | 125 | android:layout_below="@+id/end_view" |
| 126 | android:layout_centerHorizontal="true" | 126 | android:layout_centerHorizontal="true" |
| 127 | android:layout_marginTop="48dp" | 127 | android:layout_marginTop="48dp" |
| 128 | - android:background="@drawable/btn_record_end" | 128 | + android:background="@drawable/record_end" |
| 129 | android:onClick="onClick" | 129 | android:onClick="onClick" |
| 130 | android:text="知道了" | 130 | android:text="知道了" |
| 131 | android:textColor="@android:color/white" | 131 | android:textColor="@android:color/white" |
| @@ -162,7 +162,7 @@ | @@ -162,7 +162,7 @@ | ||
| 162 | android:onClick="onClick" | 162 | android:onClick="onClick" |
| 163 | android:padding="5dp" | 163 | android:padding="5dp" |
| 164 | android:scaleType="fitCenter" | 164 | android:scaleType="fitCenter" |
| 165 | - android:src="@{isShow.beautifulBtn ? @drawable/icon_record_meiyan_on : @drawable/icon_record_meiyan}" /> | 165 | + android:src="@{isShow.beautifulBtn ? @drawable/record_meiyan_on : @drawable/record_meiyan}" /> |
| 166 | 166 | ||
| 167 | <ImageButton | 167 | <ImageButton |
| 168 | android:id="@+id/btn_flip" | 168 | android:id="@+id/btn_flip" |
| @@ -172,7 +172,7 @@ | @@ -172,7 +172,7 @@ | ||
| 172 | android:onClick="onClick" | 172 | android:onClick="onClick" |
| 173 | android:padding="5dp" | 173 | android:padding="5dp" |
| 174 | android:scaleType="fitCenter" | 174 | android:scaleType="fitCenter" |
| 175 | - android:src="@drawable/icon_record_flip" /> | 175 | + android:src="@drawable/record_flip" /> |
| 176 | 176 | ||
| 177 | <ImageButton | 177 | <ImageButton |
| 178 | android:id="@+id/btn_flash" | 178 | android:id="@+id/btn_flash" |
| @@ -182,7 +182,7 @@ | @@ -182,7 +182,7 @@ | ||
| 182 | android:onClick="onClick" | 182 | android:onClick="onClick" |
| 183 | android:padding="5dp" | 183 | android:padding="5dp" |
| 184 | android:scaleType="fitCenter" | 184 | android:scaleType="fitCenter" |
| 185 | - android:src="@drawable/icon_record_flash" | 185 | + android:src="@drawable/record_flash" |
| 186 | android:visibility="@{isShow.flashBtn ? 0 : 8}" /> | 186 | android:visibility="@{isShow.flashBtn ? 0 : 8}" /> |
| 187 | 187 | ||
| 188 | <ImageButton | 188 | <ImageButton |
| @@ -195,7 +195,7 @@ | @@ -195,7 +195,7 @@ | ||
| 195 | android:onClick="onClick" | 195 | android:onClick="onClick" |
| 196 | android:padding="5dp" | 196 | android:padding="5dp" |
| 197 | android:scaleType="fitCenter" | 197 | android:scaleType="fitCenter" |
| 198 | - android:src="@drawable/icon_record_close" /> | 198 | + android:src="@drawable/record_close" /> |
| 199 | </LinearLayout> | 199 | </LinearLayout> |
| 200 | 200 | ||
| 201 | <Button | 201 | <Button |
| @@ -203,7 +203,7 @@ | @@ -203,7 +203,7 @@ | ||
| 203 | android:layout_width="wrap_content" | 203 | android:layout_width="wrap_content" |
| 204 | android:layout_height="wrap_content" | 204 | android:layout_height="wrap_content" |
| 205 | android:layout_centerInParent="true" | 205 | android:layout_centerInParent="true" |
| 206 | - android:background="@drawable/anchor_retry_nor" | 206 | + android:background="@drawable/record_retry_nor" |
| 207 | android:onClick="onClick" | 207 | android:onClick="onClick" |
| 208 | android:padding="5dp" | 208 | android:padding="5dp" |
| 209 | android:text="开始直播" | 209 | android:text="开始直播" |
| @@ -244,7 +244,7 @@ | @@ -244,7 +244,7 @@ | ||
| 244 | android:layout_below="@+id/auto_reconnect_msg" | 244 | android:layout_below="@+id/auto_reconnect_msg" |
| 245 | android:layout_centerHorizontal="true" | 245 | android:layout_centerHorizontal="true" |
| 246 | android:layout_marginTop="8dp" | 246 | android:layout_marginTop="8dp" |
| 247 | - android:background="@drawable/anchor_retry_nor" | 247 | + android:background="@drawable/record_retry_nor" |
| 248 | android:onClick="onClick" | 248 | android:onClick="onClick" |
| 249 | android:paddingBottom="8dp" | 249 | android:paddingBottom="8dp" |
| 250 | android:paddingLeft="15dp" | 250 | android:paddingLeft="15dp" |
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <layout xmlns:android="http://schemas.android.com/apk/res/android" | 2 | <layout xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | > | 3 | > |
| 4 | - <ScrollView | ||
| 5 | - android:id="@+id/detail_view" | ||
| 6 | - android:layout_width="match_parent" | ||
| 7 | - android:layout_height="match_parent"> | ||
| 8 | 4 | ||
| 9 | <RelativeLayout | 5 | <RelativeLayout |
| 10 | android:layout_width="match_parent" | 6 | android:layout_width="match_parent" |
| @@ -27,6 +23,7 @@ | @@ -27,6 +23,7 @@ | ||
| 27 | <LinearLayout | 23 | <LinearLayout |
| 28 | android:layout_width="match_parent" | 24 | android:layout_width="match_parent" |
| 29 | android:layout_height="wrap_content" | 25 | android:layout_height="wrap_content" |
| 26 | + android:layout_marginTop="@dimen/_30px" | ||
| 30 | android:background="@android:color/white" | 27 | android:background="@android:color/white" |
| 31 | android:orientation="vertical"> | 28 | android:orientation="vertical"> |
| 32 | 29 | ||
| @@ -90,7 +87,7 @@ | @@ -90,7 +87,7 @@ | ||
| 90 | <RelativeLayout | 87 | <RelativeLayout |
| 91 | android:layout_width="match_parent" | 88 | android:layout_width="match_parent" |
| 92 | android:layout_height="wrap_content" | 89 | android:layout_height="wrap_content" |
| 93 | - android:layout_marginTop="24dp" | 90 | + android:layout_marginTop="40dp" |
| 94 | android:orientation="horizontal" | 91 | android:orientation="horizontal" |
| 95 | android:paddingLeft="10dp" | 92 | android:paddingLeft="10dp" |
| 96 | android:paddingRight="10dp"> | 93 | android:paddingRight="10dp"> |
| @@ -121,111 +118,21 @@ | @@ -121,111 +118,21 @@ | ||
| 121 | android:textSize="15sp" /> | 118 | android:textSize="15sp" /> |
| 122 | </RelativeLayout> | 119 | </RelativeLayout> |
| 123 | 120 | ||
| 124 | - <Button | ||
| 125 | - android:id="@+id/btn_login" | ||
| 126 | - style="@style/LoginButtonStyle" | ||
| 127 | - android:layout_width="match_parent" | ||
| 128 | - android:layout_height="wrap_content" | ||
| 129 | - android:layout_marginTop="59dp" | ||
| 130 | - android:background="@drawable/user_btn_login" | ||
| 131 | - android:gravity="center" | ||
| 132 | - android:onClick="onClick" | ||
| 133 | - android:text="@string/user_login" /> | ||
| 134 | - | ||
| 135 | - | ||
| 136 | - <TextView | ||
| 137 | - android:id="@+id/login_text" | ||
| 138 | - android:layout_width="match_parent" | ||
| 139 | - android:layout_height="wrap_content" | ||
| 140 | - android:layout_marginTop="100dp" | ||
| 141 | - android:gravity="center_horizontal" | ||
| 142 | - android:text="@string/user_login_third_part_login" | ||
| 143 | - android:textColor="@color/text_hint_color" | ||
| 144 | - android:textSize="15sp" /> | ||
| 145 | - | ||
| 146 | - <LinearLayout | ||
| 147 | - android:layout_width="match_parent" | ||
| 148 | - android:layout_height="wrap_content" | ||
| 149 | - android:layout_marginBottom="37dp" | ||
| 150 | - android:layout_marginTop="15dp" | ||
| 151 | - android:orientation="horizontal"> | ||
| 152 | - | ||
| 153 | - <LinearLayout | ||
| 154 | - android:layout_width="0dp" | ||
| 155 | - android:layout_height="wrap_content" | ||
| 156 | - android:layout_weight="1" | ||
| 157 | - android:gravity="center" | ||
| 158 | - android:orientation="vertical"> | ||
| 159 | - | ||
| 160 | - <ImageView | ||
| 161 | - android:id="@+id/rbtn_login_wechat" | ||
| 162 | - android:layout_width="50dp" | ||
| 163 | - android:layout_height="50dp" | ||
| 164 | - android:src="@drawable/share_btn_weixin" | ||
| 165 | - android:onClick="onClick" | ||
| 166 | - android:layout_marginBottom="4dp"/> | ||
| 167 | - | ||
| 168 | - <TextView | ||
| 169 | - android:layout_width="wrap_content" | ||
| 170 | - android:layout_height="wrap_content" | ||
| 171 | - android:text="@string/third_login_weixin" | ||
| 172 | - android:textColor="@color/text_hint_color" | ||
| 173 | - android:textSize="12sp" /> | ||
| 174 | - | ||
| 175 | - </LinearLayout> | ||
| 176 | - | ||
| 177 | - <LinearLayout | ||
| 178 | - android:layout_width="0dp" | ||
| 179 | - android:layout_height="wrap_content" | ||
| 180 | - android:layout_weight="1" | ||
| 181 | - android:gravity="center" | ||
| 182 | - android:orientation="vertical"> | ||
| 183 | - | ||
| 184 | - <ImageView | ||
| 185 | - android:id="@+id/rbtn_login_qq" | ||
| 186 | - android:layout_width="50dp" | ||
| 187 | - android:layout_height="50dp" | ||
| 188 | - android:src="@drawable/share_btn_tencent" | ||
| 189 | - android:onClick="onClick" | ||
| 190 | - android:layout_marginBottom="4dp"/> | ||
| 191 | - | ||
| 192 | - <TextView | ||
| 193 | - android:layout_width="wrap_content" | ||
| 194 | - android:layout_height="wrap_content" | ||
| 195 | - android:text="@string/third_login_qq" | ||
| 196 | - android:textColor="@color/text_hint_color" | ||
| 197 | - android:textSize="12sp" /> | ||
| 198 | - | ||
| 199 | - </LinearLayout> | ||
| 200 | - | ||
| 201 | - <LinearLayout | ||
| 202 | - android:layout_width="0dp" | ||
| 203 | - android:layout_height="wrap_content" | ||
| 204 | - android:layout_weight="1" | ||
| 205 | - android:gravity="center" | ||
| 206 | - android:orientation="vertical"> | ||
| 207 | - | ||
| 208 | - <ImageView | ||
| 209 | - android:id="@+id/rbtn_login_micro_blog" | ||
| 210 | - android:layout_width="50dp" | ||
| 211 | - android:layout_height="50dp" | ||
| 212 | - android:src="@drawable/share_btn_sina" | ||
| 213 | - android:onClick="onClick" | ||
| 214 | - android:layout_marginBottom="4dp"/> | ||
| 215 | - | ||
| 216 | - <TextView | ||
| 217 | - android:layout_width="wrap_content" | ||
| 218 | - android:layout_height="wrap_content" | ||
| 219 | - android:text="@string/third_login_sina" | ||
| 220 | - android:textColor="@color/text_hint_color" | ||
| 221 | - android:textSize="12sp" /> | ||
| 222 | - | ||
| 223 | - </LinearLayout> | ||
| 224 | - | ||
| 225 | - </LinearLayout> | ||
| 226 | 121 | ||
| 227 | </LinearLayout> | 122 | </LinearLayout> |
| 228 | 123 | ||
| 124 | + <Button | ||
| 125 | + android:id="@+id/btn_login" | ||
| 126 | + style="@style/LoginButtonStyle" | ||
| 127 | + android:layout_width="match_parent" | ||
| 128 | + android:layout_height="wrap_content" | ||
| 129 | + android:layout_marginBottom="200dp" | ||
| 130 | + android:layout_alignParentBottom="true" | ||
| 131 | + android:background="@drawable/user_btn_login" | ||
| 132 | + android:gravity="center" | ||
| 133 | + android:onClick="onClick" | ||
| 134 | + android:text="@string/user_login" /> | ||
| 135 | + | ||
| 229 | <ImageView | 136 | <ImageView |
| 230 | android:id="@+id/back_selector" | 137 | android:id="@+id/back_selector" |
| 231 | android:layout_width="30dp" | 138 | android:layout_width="30dp" |
| @@ -249,6 +156,6 @@ | @@ -249,6 +156,6 @@ | ||
| 249 | 156 | ||
| 250 | </RelativeLayout> | 157 | </RelativeLayout> |
| 251 | 158 | ||
| 252 | - </ScrollView> | 159 | + |
| 253 | 160 | ||
| 254 | </layout> | 161 | </layout> |
| 255 | \ No newline at end of file | 162 | \ No newline at end of file |
| @@ -25,6 +25,8 @@ | @@ -25,6 +25,8 @@ | ||
| 25 | android:id="@+id/feedback_textView" | 25 | android:id="@+id/feedback_textView" |
| 26 | android:layout_width="match_parent" | 26 | android:layout_width="match_parent" |
| 27 | android:layout_height="wrap_content" | 27 | android:layout_height="wrap_content" |
| 28 | + android:paddingTop="@dimen/_20px" | ||
| 29 | + android:paddingBottom="@dimen/_20px" | ||
| 28 | android:layout_centerVertical="true" | 30 | android:layout_centerVertical="true" |
| 29 | android:layout_marginLeft="@dimen/_30px" | 31 | android:layout_marginLeft="@dimen/_30px" |
| 30 | android:background="@null" | 32 | android:background="@null" |
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | 2 | ||
| 3 | <layout xmlns:android="http://schemas.android.com/apk/res/android" | 3 | <layout xmlns:android="http://schemas.android.com/apk/res/android" |
| 4 | + xmlns:cn="http://schemas.android.com/apk/res-auto" | ||
| 4 | > | 5 | > |
| 5 | 6 | ||
| 6 | <LinearLayout | 7 | <LinearLayout |
| @@ -10,124 +11,119 @@ | @@ -10,124 +11,119 @@ | ||
| 10 | 11 | ||
| 11 | <RelativeLayout | 12 | <RelativeLayout |
| 12 | android:layout_width="match_parent" | 13 | android:layout_width="match_parent" |
| 13 | - android:layout_height="100dp" | ||
| 14 | - > | 14 | + android:layout_height="48dp"> |
| 15 | + | ||
| 15 | <TextView | 16 | <TextView |
| 16 | android:layout_width="wrap_content" | 17 | android:layout_width="wrap_content" |
| 17 | android:layout_height="wrap_content" | 18 | android:layout_height="wrap_content" |
| 18 | android:layout_centerInParent="true" | 19 | android:layout_centerInParent="true" |
| 20 | + android:singleLine="true" | ||
| 19 | android:text="我的" | 21 | android:text="我的" |
| 20 | - android:textSize="@dimen/_30px" | ||
| 21 | - /> | 22 | + android:textColor="@color/config_black_color" |
| 23 | + android:textSize="22sp" /> | ||
| 22 | 24 | ||
| 23 | 25 | ||
| 24 | </RelativeLayout> | 26 | </RelativeLayout> |
| 27 | + | ||
| 25 | <View | 28 | <View |
| 26 | android:layout_width="match_parent" | 29 | android:layout_width="match_parent" |
| 27 | android:layout_height="1px" | 30 | android:layout_height="1px" |
| 31 | + android:layout_marginBottom="@dimen/_20px" | ||
| 28 | android:background="@color/gray_line_color" /> | 32 | android:background="@color/gray_line_color" /> |
| 29 | 33 | ||
| 30 | 34 | ||
| 31 | - <RelativeLayout | ||
| 32 | - android:id="@+id/config_header" | ||
| 33 | - android:layout_width="fill_parent" | ||
| 34 | - android:layout_height="85dp" | ||
| 35 | - android:gravity="center_vertical" | ||
| 36 | - style="@style/list_item_style"> | 35 | + <RelativeLayout |
| 36 | + android:id="@+id/config_header" | ||
| 37 | + style="@style/list_item_style" | ||
| 38 | + android:layout_width="fill_parent" | ||
| 39 | + android:layout_height="85dp" | ||
| 40 | + android:gravity="center_vertical"> | ||
| 41 | + | ||
| 42 | + <com.cnlive.gundam.user.view.CircleImageView | ||
| 43 | + android:id="@+id/head_img" | ||
| 44 | + android:layout_width="55dip" | ||
| 45 | + android:layout_height="55dip" | ||
| 46 | + android:layout_centerVertical="true" | ||
| 47 | + android:layout_marginLeft="11dp" | ||
| 48 | + android:layout_marginRight="16dp" | ||
| 49 | + cn:border_color="@android:color/transparent" | ||
| 50 | + android:src="@drawable/cnlive_user_header" /> | ||
| 37 | 51 | ||
| 38 | - <ImageView | ||
| 39 | - android:id="@+id/head_img" | ||
| 40 | - android:layout_width="55dip" | ||
| 41 | - android:layout_height="55dip" | ||
| 42 | - android:layout_centerVertical="true" | ||
| 43 | - android:layout_marginLeft="11dp" | ||
| 44 | - android:layout_marginRight="16dp" /> | 52 | + <LinearLayout |
| 53 | + android:layout_width="wrap_content" | ||
| 54 | + android:layout_height="wrap_content" | ||
| 55 | + android:layout_centerVertical="true" | ||
| 56 | + android:layout_toLeftOf="@+id/next" | ||
| 57 | + android:layout_toRightOf="@+id/head_img" | ||
| 58 | + android:orientation="vertical"> | ||
| 45 | 59 | ||
| 46 | - <LinearLayout | 60 | + <TextView |
| 61 | + android:id="@+id/tv_nickname" | ||
| 47 | android:layout_width="wrap_content" | 62 | android:layout_width="wrap_content" |
| 48 | android:layout_height="wrap_content" | 63 | android:layout_height="wrap_content" |
| 49 | - android:layout_centerVertical="true" | ||
| 50 | - android:layout_toRightOf="@+id/head_img" | ||
| 51 | - android:orientation="vertical" | ||
| 52 | - android:layout_toLeftOf="@+id/next"> | ||
| 53 | - | ||
| 54 | - <TextView | ||
| 55 | - android:id="@+id/tv_nickname" | ||
| 56 | - android:layout_width="wrap_content" | ||
| 57 | - android:layout_height="wrap_content" | ||
| 58 | - android:layout_margin="3dp" | ||
| 59 | - android:gravity="center_vertical" | ||
| 60 | - android:singleLine="true" | ||
| 61 | - android:text="@string/click_login" | ||
| 62 | - android:textColor="@color/config_black_color" | ||
| 63 | - android:textSize="17sp" /> | ||
| 64 | - <TextView | ||
| 65 | - android:id="@+id/point" | ||
| 66 | - android:layout_width="wrap_content" | ||
| 67 | - android:layout_height="wrap_content" | ||
| 68 | - android:layout_margin="3dp" | ||
| 69 | - android:text="@string/login_china_coin" | ||
| 70 | - android:textColor="@color/config_gray_color" | ||
| 71 | - android:textSize="12sp" /> | ||
| 72 | - </LinearLayout> | ||
| 73 | - | ||
| 74 | - <ImageView | ||
| 75 | - android:id="@+id/next" | ||
| 76 | - android:layout_width="@dimen/next_image_width" | ||
| 77 | - android:layout_height="@dimen/next_image_height" | ||
| 78 | - android:layout_alignParentRight="true" | ||
| 79 | - android:layout_centerVertical="true" | ||
| 80 | - android:layout_marginRight="@dimen/next_image_margin_right" | ||
| 81 | - android:contentDescription="@null" | ||
| 82 | - android:src="@drawable/btn_channel_more" /> | ||
| 83 | - </RelativeLayout> | 64 | + android:layout_margin="3dp" |
| 65 | + android:gravity="center_vertical" | ||
| 66 | + android:singleLine="true" | ||
| 67 | + android:text="@string/click_login" | ||
| 68 | + android:textColor="@color/config_black_color" | ||
| 69 | + android:textSize="17sp" /> | ||
| 84 | 70 | ||
| 71 | + </LinearLayout> | ||
| 85 | 72 | ||
| 86 | - | ||
| 87 | - | ||
| 88 | - | ||
| 89 | - <RelativeLayout | ||
| 90 | - android:layout_width="match_parent" | ||
| 91 | - android:layout_height="30dp" | ||
| 92 | - android:id="@+id/live" | ||
| 93 | - style="@style/list_item_style"> | ||
| 94 | <ImageView | 73 | <ImageView |
| 95 | - android:layout_width="20dp" | ||
| 96 | - android:layout_height="20dp" | ||
| 97 | - android:id="@+id/ic_config_history" | ||
| 98 | - android:layout_centerVertical="true" | ||
| 99 | - android:src="@drawable/ic_config_history"/> | ||
| 100 | - <TextView | ||
| 101 | - android:layout_width="wrap_content" | ||
| 102 | - android:layout_height="wrap_content" | 74 | + android:id="@+id/next" |
| 75 | + android:layout_width="@dimen/next_image_width" | ||
| 76 | + android:layout_height="@dimen/next_image_height" | ||
| 77 | + android:layout_alignParentRight="true" | ||
| 103 | android:layout_centerVertical="true" | 78 | android:layout_centerVertical="true" |
| 104 | - android:layout_toRightOf="@+id/ic_config_history" | ||
| 105 | - android:layout_marginLeft="20dp" | ||
| 106 | - android:text="我要直播"/> | 79 | + android:layout_marginRight="@dimen/next_image_margin_right" |
| 80 | + android:contentDescription="@null" | ||
| 81 | + android:src="@drawable/btn_channel_more" /> | ||
| 107 | </RelativeLayout> | 82 | </RelativeLayout> |
| 83 | + | ||
| 84 | + | ||
| 108 | <View | 85 | <View |
| 109 | android:layout_width="match_parent" | 86 | android:layout_width="match_parent" |
| 110 | android:layout_height="1px" | 87 | android:layout_height="1px" |
| 111 | android:background="@color/gray_line_color" /> | 88 | android:background="@color/gray_line_color" /> |
| 89 | + | ||
| 112 | <RelativeLayout | 90 | <RelativeLayout |
| 113 | - android:layout_width="match_parent" | ||
| 114 | - android:layout_height="30dp" | ||
| 115 | android:id="@+id/message" | 91 | android:id="@+id/message" |
| 116 | - style="@style/list_item_style"> | 92 | + style="@style/list_item_style" |
| 93 | + android:layout_width="match_parent" | ||
| 94 | + android:layout_height="50dp" | ||
| 95 | + android:layout_marginTop="@dimen/_20px"> | ||
| 117 | 96 | ||
| 118 | <ImageView | 97 | <ImageView |
| 119 | - android:layout_width="20dp" | ||
| 120 | - android:layout_height="20dp" | ||
| 121 | - android:layout_centerVertical="true" | ||
| 122 | android:id="@+id/ic_setting_opinion" | 98 | android:id="@+id/ic_setting_opinion" |
| 123 | - android:src="@drawable/ic_setting_opinion"/> | 99 | + android:layout_width="30dp" |
| 100 | + android:layout_height="30dp" | ||
| 101 | + android:layout_centerVertical="true" | ||
| 102 | + android:layout_marginLeft="@dimen/_20px" | ||
| 103 | + android:src="@drawable/ic_setting_opinion" /> | ||
| 104 | + | ||
| 124 | <TextView | 105 | <TextView |
| 125 | android:layout_width="wrap_content" | 106 | android:layout_width="wrap_content" |
| 126 | android:layout_height="wrap_content" | 107 | android:layout_height="wrap_content" |
| 127 | android:layout_centerVertical="true" | 108 | android:layout_centerVertical="true" |
| 109 | + android:layout_marginLeft="30dp" | ||
| 128 | android:layout_toRightOf="@+id/ic_setting_opinion" | 110 | android:layout_toRightOf="@+id/ic_setting_opinion" |
| 129 | - android:layout_marginLeft="20dp" | ||
| 130 | - android:text="意见反馈"/> | 111 | + android:gravity="center_vertical" |
| 112 | + android:singleLine="true" | ||
| 113 | + android:text="意见反馈" | ||
| 114 | + android:textColor="@color/config_black_color" | ||
| 115 | + android:textSize="17sp" /> | ||
| 116 | + | ||
| 117 | + | ||
| 118 | + <ImageView | ||
| 119 | + android:id="@+id/imv_message" | ||
| 120 | + android:layout_width="@dimen/next_image_width" | ||
| 121 | + android:layout_height="@dimen/next_image_height" | ||
| 122 | + android:layout_alignParentRight="true" | ||
| 123 | + android:layout_centerVertical="true" | ||
| 124 | + android:layout_marginRight="@dimen/next_image_margin_right" | ||
| 125 | + android:contentDescription="@null" | ||
| 126 | + android:src="@drawable/btn_channel_more" /> | ||
| 131 | 127 | ||
| 132 | </RelativeLayout> | 128 | </RelativeLayout> |
| 133 | 129 |
| @@ -37,70 +37,4 @@ | @@ -37,70 +37,4 @@ | ||
| 37 | <string name="request_state_error">获取活动状态失败</string> | 37 | <string name="request_state_error">获取活动状态失败</string> |
| 38 | <string name="request_state_play_error">此活动状态无法播放</string> | 38 | <string name="request_state_play_error">此活动状态无法播放</string> |
| 39 | 39 | ||
| 40 | - | ||
| 41 | - <string name="net_connect_toast">"你好像掉线了"</string> | ||
| 42 | - | ||
| 43 | - //我的 | ||
| 44 | - <string name="main_tab_config">我的</string> | ||
| 45 | - <string name="click_login">点击登录</string> | ||
| 46 | - <string name="login_china_coin">登录就送中国币哟</string> | ||
| 47 | - <string name="my_config_money_desc">中国币、兑换码、金额</string> | ||
| 48 | - <string name="logout">注销</string> | ||
| 49 | - | ||
| 50 | - //登录页面 | ||
| 51 | - <string name="user_login_account">账号:</string> | ||
| 52 | - <string name="user_login_account_hint">Email/手机号码</string> | ||
| 53 | - <string name="user_login_code">密码:</string> | ||
| 54 | - <string name="user_login_code_hint">6–20位字母或数字</string> | ||
| 55 | - <string name="user_login_recall_code">忘记密码?</string> | ||
| 56 | - <string name="string_fast_access">短信验证登录</string> | ||
| 57 | - <string name="user_login">登录</string> | ||
| 58 | - <string name="user_login_third_part_login">第三方账号登录</string> | ||
| 59 | - <string name="third_login_sina">微博</string> | ||
| 60 | - <string name="third_login_qq">QQ</string> | ||
| 61 | - <string name="third_login_weixin">微信</string> | ||
| 62 | - | ||
| 63 | - //注册页面 | ||
| 64 | - <string name="register_mobile_hint">请输入您的手机号</string> | ||
| 65 | - <string name="getmobile_identify_code">获取验证码</string> | ||
| 66 | - <string name="register_mobile_keycode_hint">请输入您收到的验证码</string> | ||
| 67 | - <string name="register_password_hint">请设置密码:6–20位字母或数字</string> | ||
| 68 | - <string name="register_show_password">显示密码</string> | ||
| 69 | - <string name="register_and_agree">我已阅读并同意</string> | ||
| 70 | - <string name="register_btn">注册</string> | ||
| 71 | - | ||
| 72 | - //找回密码页面 | ||
| 73 | - <string name="find_password_btn">找回密码</string> | ||
| 74 | - <string name="find_password_hint">请确认密码:6–20位字母或数字</string> | ||
| 75 | - <string name="save_btn">保存</string> | ||
| 76 | - | ||
| 77 | - //昵称修改页面 | ||
| 78 | - <string name="user_input_nickname">请输入昵称</string> | ||
| 79 | - | ||
| 80 | - //手机号修改页面 | ||
| 81 | - <string name="register_mobile">手机号:</string> | ||
| 82 | - <string name="user_personal_telephone_hint">手机号码</string> | ||
| 83 | - <string name="register_mobile_keycode">验证码:</string> | ||
| 84 | - <string name="hint_6_numbers_code">6位数字验证码</string> | ||
| 85 | - | ||
| 86 | - //邮箱修改页面 | ||
| 87 | - <string name="email_notify">修改后,您输入的邮箱将会收到确认邮件,请按邮件中的说明去完成验证,谢谢!</string> | ||
| 88 | - | ||
| 89 | - //关于我们页面 | ||
| 90 | - <string name="about_us_visit">访问视讯中国官网</string> | ||
| 91 | - <string name="about_us_call_phone">拨打客服电话</string> | ||
| 92 | - <string name="about_us_disclaimer">免责声明</string> | ||
| 93 | - <string name="about_us_company_name">北京中投视讯文化传媒股份有限公司</string> | ||
| 94 | - | ||
| 95 | - //分享 | ||
| 96 | - <string name="toast_msg_share_success">分享成功!</string> | ||
| 97 | - <string name="toast_msg_share_fail">分享失败,请再试一次</string> | ||
| 98 | - <string name="toast_msg_share_cancel">取消分享</string> | ||
| 99 | - <string name="share_program_download_targetUrl"> http://www.cnlive.com/web/guide.jsp</string> | ||
| 100 | - | ||
| 101 | - //AccountManager用户管理 | ||
| 102 | - <string name="ACCOUNT_TYPE">com.cnlive.libs.AccountType</string> | ||
| 103 | - <string name="ACCOUNT_LABEL">@string/app_name</string> | ||
| 104 | - | ||
| 105 | - <string name="verified_url" formatted="false">https://mobile.cnlive.com/CnliveMobile/web/review/review.jsp?sid=%s&plat=a&appId=%s </string> | ||
| 106 | </resources> | 40 | </resources> |
| @@ -23,10 +23,6 @@ android { | @@ -23,10 +23,6 @@ android { | ||
| 23 | 23 | ||
| 24 | dependencies { | 24 | dependencies { |
| 25 | compile fileTree(dir: 'libs', include: ['*.jar']) | 25 | compile fileTree(dir: 'libs', include: ['*.jar']) |
| 26 | - androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { | ||
| 27 | - exclude group: 'com.android.support', module: 'support-annotations' | ||
| 28 | - }) | ||
| 29 | compile 'com.android.support:appcompat-v7:26.+' | 26 | compile 'com.android.support:appcompat-v7:26.+' |
| 30 | - testCompile 'junit:junit:4.12' | ||
| 31 | 27 | ||
| 32 | } | 28 | } |
| 1 | -package cnlive.com.myuser; | ||
| 2 | - | ||
| 3 | -import android.content.Context; | ||
| 4 | -import android.support.test.InstrumentationRegistry; | ||
| 5 | -import android.support.test.runner.AndroidJUnit4; | ||
| 6 | - | ||
| 7 | -import org.junit.Test; | ||
| 8 | -import org.junit.runner.RunWith; | ||
| 9 | - | ||
| 10 | -import static org.junit.Assert.*; | ||
| 11 | - | ||
| 12 | -/** | ||
| 13 | - * Instrumentation test, which will execute on an Android device. | ||
| 14 | - * | ||
| 15 | - * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> | ||
| 16 | - */ | ||
| 17 | -@RunWith(AndroidJUnit4.class) | ||
| 18 | -public class ExampleInstrumentedTest { | ||
| 19 | - @Test | ||
| 20 | - public void useAppContext() throws Exception { | ||
| 21 | - // Context of the app under test. | ||
| 22 | - Context appContext = InstrumentationRegistry.getTargetContext(); | ||
| 23 | - | ||
| 24 | - assertEquals("cnlive.com.myuser.test", appContext.getPackageName()); | ||
| 25 | - } | ||
| 26 | -} |
6.29 KB
4.43 KB
4.51 KB
3.35 KB
3.4 KB
3.85 KB
3.88 KB
831 Bytes
831 Bytes
1.68 KB
2.04 KB
10.3 KB
5.37 KB
5.45 KB
5.04 KB
5.21 KB
4.84 KB
5.22 KB
4.54 KB
4.6 KB
1.15 KB
1.99 KB
1.89 KB
2.21 KB
1.88 KB
1.35 KB
2.21 KB
3.72 KB
4.57 KB
2.77 KB
2.49 KB
| 1 | -<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | - | ||
| 3 | - | ||
| 4 | -<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| 5 | - | ||
| 6 | - <item android:id="@android:id/background"> | ||
| 7 | - <shape> | ||
| 8 | - <corners android:radius="5dip" /> | ||
| 9 | - <gradient | ||
| 10 | - android:startColor="#D5D5D5" | ||
| 11 | - android:centerColor="#D5D5D5" | ||
| 12 | - android:endColor="#D5D5D5" /> | ||
| 13 | - </shape> | ||
| 14 | - </item> | ||
| 15 | - | ||
| 16 | - <item android:id="@android:id/progress"> | ||
| 17 | - <clip> | ||
| 18 | - <shape> | ||
| 19 | - <corners android:radius="5dip" /> | ||
| 20 | - <gradient | ||
| 21 | - android:startColor="@color/ff4e51" | ||
| 22 | - android:centerColor="@color/ff4e51" | ||
| 23 | - android:endColor="@color/ff4e51" /> | ||
| 24 | - </shape> | ||
| 25 | - </clip> | ||
| 26 | - </item> | ||
| 27 | - | ||
| 28 | -</layer-list> |
| 1 | -<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | - | ||
| 3 | -<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| 4 | - <item android:state_pressed="true" android:drawable="@drawable/btn_share_tengxun_sel" /> | ||
| 5 | - <item android:state_pressed="false" android:drawable="@drawable/btn_share_tengxun_nor" /> | ||
| 6 | -</selector> | ||
| 7 | \ No newline at end of file | 0 | \ No newline at end of file |
| 1 | -<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | - | ||
| 3 | -<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| 4 | - <item android:state_pressed="true" android:drawable="@drawable/btn_share_sina_sel" /> | ||
| 5 | - <item android:state_pressed="false" android:drawable="@drawable/btn_share_sina_nor" /> | ||
| 6 | -</selector> | ||
| 7 | \ No newline at end of file | 0 | \ No newline at end of file |
| 1 | -<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | - | ||
| 3 | -<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| 4 | - <item android:drawable="@drawable/share_btn_qq_sel" android:state_pressed="true" /> | ||
| 5 | - <item android:drawable="@drawable/share_btn_qq_nor" android:state_pressed="false" /> | ||
| 6 | -</selector> | ||
| 7 | \ No newline at end of file | 0 | \ No newline at end of file |
| 1 | -<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | - | ||
| 3 | -<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| 4 | - <item android:state_pressed="true" android:drawable="@drawable/btn_share_weixin_sel" /> | ||
| 5 | - <item android:state_pressed="false" android:drawable="@drawable/btn_share_weixin_nor" /> | ||
| 6 | -</selector> | ||
| 7 | \ No newline at end of file | 0 | \ No newline at end of file |
94 Bytes
| 1 | -<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | -<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| 3 | - | ||
| 4 | - <item android:state_selected="true" android:drawable="@drawable/user_btn_logout_sel" /> | ||
| 5 | - <item android:state_pressed="true" android:drawable="@drawable/user_btn_logout_sel" /> | ||
| 6 | - <item android:state_focused="true" android:drawable="@drawable/user_btn_logout_sel" /> | ||
| 7 | - <item android:state_checked="false" android:drawable="@drawable/user_btn_logout_nor" /> | ||
| 8 | - | ||
| 9 | -</selector> | ||
| 10 | \ No newline at end of file | 0 | \ No newline at end of file |
| 1 | -<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | -<shape | ||
| 3 | - xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 4 | - android:shape="rectangle" | ||
| 5 | - android:useLevel="false"> | ||
| 6 | - <solid android:color="#6e6e6e" /> | ||
| 7 | - | ||
| 8 | - <size | ||
| 9 | - android:height="40dp" /> | ||
| 10 | - | ||
| 11 | - <corners | ||
| 12 | - android:bottomLeftRadius="20dp" | ||
| 13 | - android:bottomRightRadius="20dp" | ||
| 14 | - android:topLeftRadius="20dp" | ||
| 15 | - android:topRightRadius="20dp" /> <!-- 设置四个角的半径 --> | ||
| 16 | - | ||
| 17 | -</shape> | ||
| 18 | \ No newline at end of file | 0 | \ No newline at end of file |
| 1 | -<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| 2 | - | ||
| 3 | - <item android:drawable="@drawable/user_micro_blog" android:state_enabled="false" android:state_focused="true" /> | ||
| 4 | - <item android:drawable="@drawable/user_micro_blog" android:state_pressed="true" /> | ||
| 5 | - <item android:drawable="@drawable/user_micro_blog" android:state_focused="true" /> | ||
| 6 | - <item android:drawable="@drawable/user_micro_blog_click" /> | ||
| 7 | - | ||
| 8 | -</selector> | ||
| 9 | \ No newline at end of file | 0 | \ No newline at end of file |
| 1 | -<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| 2 | - | ||
| 3 | - <item android:drawable="@drawable/user_qq" android:state_enabled="false" android:state_focused="true" /> | ||
| 4 | - <item android:drawable="@drawable/user_qq" android:state_pressed="true" /> | ||
| 5 | - <item android:drawable="@drawable/user_qq" android:state_focused="true" /> | ||
| 6 | - <item android:drawable="@drawable/user_qq_click" /> | ||
| 7 | - | ||
| 8 | -</selector> | ||
| 9 | \ No newline at end of file | 0 | \ No newline at end of file |
| 1 | -<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| 2 | - | ||
| 3 | - <item android:drawable="@drawable/user_wechat" android:state_enabled="false" android:state_focused="true" /> | ||
| 4 | - <item android:drawable="@drawable/user_wechat" android:state_pressed="true" /> | ||
| 5 | - <item android:drawable="@drawable/user_wechat" android:state_focused="true" /> | ||
| 6 | - <item android:drawable="@drawable/user_wechat_click" /> | ||
| 7 | - | ||
| 8 | -</selector> | ||
| 9 | \ No newline at end of file | 0 | \ No newline at end of file |
6.52 KB
| 1 | +<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | +<resources> | ||
| 3 | + <declare-styleable name="CircleImageView"> | ||
| 4 | + <attr name="border_width" format="dimension" /> | ||
| 5 | + <attr name="border_color" format="color" /> | ||
| 6 | + </declare-styleable> | ||
| 7 | +</resources> | ||
| 0 | \ No newline at end of file | 8 | \ No newline at end of file |
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <resources> | 2 | <resources> |
| 3 | - <color name="colorPrimary">#3F51B5</color> | ||
| 4 | - <color name="colorPrimaryDark">#303F9F</color> | ||
| 5 | - <color name="colorAccent">#FF4081</color> | ||
| 6 | 3 | ||
| 7 | <color name="gray_line_color">#dcdcdc</color> | 4 | <color name="gray_line_color">#dcdcdc</color> |
| 8 | <color name="config_black_color">#323333</color> | 5 | <color name="config_black_color">#323333</color> |
| @@ -18,8 +15,5 @@ | @@ -18,8 +15,5 @@ | ||
| 18 | //注册页面 | 15 | //注册页面 |
| 19 | <color name="text_white_color">#FFFFFF</color> | 16 | <color name="text_white_color">#FFFFFF</color> |
| 20 | 17 | ||
| 21 | - //关于我们页面 | ||
| 22 | - <color name="star_name_color">#323333</color> | ||
| 23 | - <color name="about_us_btn_text_color">#177bdf</color> | ||
| 24 | - <color name="about_us_company_name_color">#969797</color> | 18 | + |
| 25 | </resources> | 19 | </resources> |
| @@ -21,10 +21,7 @@ | @@ -21,10 +21,7 @@ | ||
| 21 | <dimen name="personal_text_size_14">14sp</dimen> | 21 | <dimen name="personal_text_size_14">14sp</dimen> |
| 22 | <dimen name="personal_text_size_18">18sp</dimen> | 22 | <dimen name="personal_text_size_18">18sp</dimen> |
| 23 | 23 | ||
| 24 | - //关于我们 | ||
| 25 | - <dimen name="about_us_text_size">17sp</dimen> | ||
| 26 | - <dimen name="about_us_btn_size">13sp</dimen> | ||
| 27 | - <dimen name="about_us_company_name_size">12sp</dimen> | 24 | + |
| 28 | 25 | ||
| 29 | //反馈意见 | 26 | //反馈意见 |
| 30 | <dimen name="text_size_15">15sp</dimen> | 27 | <dimen name="text_size_15">15sp</dimen> |
| @@ -20,9 +20,7 @@ | @@ -20,9 +20,7 @@ | ||
| 20 | <string name="string_fast_access">短信验证登录</string> | 20 | <string name="string_fast_access">短信验证登录</string> |
| 21 | <string name="user_login">登录</string> | 21 | <string name="user_login">登录</string> |
| 22 | <string name="user_login_third_part_login">第三方账号登录</string> | 22 | <string name="user_login_third_part_login">第三方账号登录</string> |
| 23 | - <string name="third_login_sina">微博</string> | ||
| 24 | - <string name="third_login_qq">QQ</string> | ||
| 25 | - <string name="third_login_weixin">微信</string> | 23 | + |
| 26 | 24 | ||
| 27 | //注册页面 | 25 | //注册页面 |
| 28 | <string name="register_mobile_hint">请输入您的手机号</string> | 26 | <string name="register_mobile_hint">请输入您的手机号</string> |
| @@ -38,34 +36,13 @@ | @@ -38,34 +36,13 @@ | ||
| 38 | <string name="find_password_hint">请确认密码:6–20位字母或数字</string> | 36 | <string name="find_password_hint">请确认密码:6–20位字母或数字</string> |
| 39 | <string name="save_btn">保存</string> | 37 | <string name="save_btn">保存</string> |
| 40 | 38 | ||
| 41 | - //昵称修改页面 | ||
| 42 | - <string name="user_input_nickname">请输入昵称</string> | 39 | + <string name="ACCOUNT_TYPE">com.cnlive.libs.AccountType</string> |
| 40 | + <string name="ACCOUNT_LABEL">@string/app_name</string> | ||
| 43 | 41 | ||
| 44 | - //手机号修改页面 | ||
| 45 | - <string name="register_mobile">手机号:</string> | ||
| 46 | - <string name="user_personal_telephone_hint">手机号码</string> | ||
| 47 | - <string name="register_mobile_keycode">验证码:</string> | ||
| 48 | - <string name="hint_6_numbers_code">6位数字验证码</string> | ||
| 49 | 42 | ||
| 50 | - //邮箱修改页面 | ||
| 51 | - <string name="email_notify">修改后,您输入的邮箱将会收到确认邮件,请按邮件中的说明去完成验证,谢谢!</string> | ||
| 52 | 43 | ||
| 53 | - //关于我们页面 | ||
| 54 | - <string name="about_us_visit">访问视讯中国官网</string> | ||
| 55 | - <string name="about_us_call_phone">拨打客服电话</string> | ||
| 56 | - <string name="about_us_disclaimer">免责声明</string> | ||
| 57 | - <string name="about_us_company_name">北京中投视讯文化传媒股份有限公司</string> | ||
| 58 | 44 | ||
| 59 | - //分享 | ||
| 60 | - <string name="toast_msg_share_success">分享成功!</string> | ||
| 61 | - <string name="toast_msg_share_fail">分享失败,请再试一次</string> | ||
| 62 | - <string name="toast_msg_share_cancel">取消分享</string> | ||
| 63 | - <string name="share_program_download_targetUrl"> http://www.cnlive.com/web/guide.jsp</string> | ||
| 64 | 45 | ||
| 65 | - //AccountManager用户管理 | ||
| 66 | - <string name="ACCOUNT_TYPE">com.cnlive.libs.AccountType</string> | ||
| 67 | - <string name="ACCOUNT_LABEL">@string/app_name</string> | ||
| 68 | 46 | ||
| 69 | - <string name="verified_url" formatted="false">https://mobile.cnlive.com/CnliveMobile/web/review/review.jsp?sid=%s&plat=a&appId=%s </string> | ||
| 70 | 47 | ||
| 71 | </resources> | 48 | </resources> |
| 1 | <resources> | 1 | <resources> |
| 2 | 2 | ||
| 3 | - <!-- Base application theme. --> | ||
| 4 | - <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> | ||
| 5 | - <!-- Customize your theme here. --> | ||
| 6 | - <item name="colorPrimary">@color/colorPrimary</item> | ||
| 7 | - <item name="colorPrimaryDark">@color/colorPrimaryDark</item> | ||
| 8 | - <item name="colorAccent">@color/colorAccent</item> | ||
| 9 | - </style> | ||
| 10 | 3 | ||
| 11 | <style name="ActionbarTitleStyle"> | 4 | <style name="ActionbarTitleStyle"> |
| 12 | <item name="android:textSize">22sp</item> | 5 | <item name="android:textSize">22sp</item> |
| @@ -81,11 +74,4 @@ | @@ -81,11 +74,4 @@ | ||
| 81 | <item name="android:windowCloseOnTouchOutside">true</item> | 74 | <item name="android:windowCloseOnTouchOutside">true</item> |
| 82 | </style> | 75 | </style> |
| 83 | 76 | ||
| 84 | - <style name="ActionBar" parent="Theme.AppCompat.Light.DarkActionBar"> | ||
| 85 | - <!-- Customize your theme here. --> | ||
| 86 | - <item name="colorPrimary">@color/colorPrimary</item> | ||
| 87 | - <item name="colorPrimaryDark">@color/colorPrimaryDark</item> | ||
| 88 | - <item name="colorAccent">@color/colorAccent</item> | ||
| 89 | - <item name="android:windowContentOverlay">@null</item> | ||
| 90 | - </style> | ||
| 91 | </resources> | 77 | </resources> |
| 1 | -package cnlive.com.myuser; | ||
| 2 | - | ||
| 3 | -import org.junit.Test; | ||
| 4 | - | ||
| 5 | -import static org.junit.Assert.*; | ||
| 6 | - | ||
| 7 | -/** | ||
| 8 | - * Example local unit test, which will execute on the development machine (host). | ||
| 9 | - * | ||
| 10 | - * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> | ||
| 11 | - */ | ||
| 12 | -public class ExampleUnitTest { | ||
| 13 | - @Test | ||
| 14 | - public void addition_isCorrect() throws Exception { | ||
| 15 | - assertEquals(4, 2 + 2); | ||
| 16 | - } | ||
| 17 | -} | ||
| 18 | \ No newline at end of file | 0 | \ No newline at end of file |