All Projects → samlss → LovelyView

samlss / LovelyView

Licence: Apache-2.0 license
🔗A view that combines pictures and texts.(一个组合图片和文本的view).

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to LovelyView

Panda
Create view hierarchies declaratively.
Stars: ✭ 69 (+1.47%)
Mutual labels:  view
view-admin-as
View the WordPress admin as a different role, switch between users, temporarily change your capabilities, set default screen settings for roles, manage your roles and capabilities.
Stars: ✭ 44 (-35.29%)
Mutual labels:  view
crab
JavaScript library for building user interfaces with Custom Elements, Shadow DOM and React like API
Stars: ✭ 22 (-67.65%)
Mutual labels:  view
AndroidUiKit
uikit widget common baseview Adapter faster develop
Stars: ✭ 48 (-29.41%)
Mutual labels:  view
RDGliderViewController
Control for a floating view gliding over a ViewController
Stars: ✭ 31 (-54.41%)
Mutual labels:  view
kyoto
Golang SSR-first Frontend Library
Stars: ✭ 543 (+698.53%)
Mutual labels:  view
react-native-math-view
Math view for react native! No WebView!
Stars: ✭ 49 (-27.94%)
Mutual labels:  view
SwiftyWave
Siri Waves View in Swift
Stars: ✭ 66 (-2.94%)
Mutual labels:  view
anchored-behavior
A CoordinatorLayout Behavior to anchor views with an animation.
Stars: ✭ 17 (-75%)
Mutual labels:  view
drag-to-close
Android library that provides a view group which allows to finish an activity by dragging a view.
Stars: ✭ 69 (+1.47%)
Mutual labels:  view
Twitch-View-Bot
First open-source really working view bot for Twitch
Stars: ✭ 63 (-7.35%)
Mutual labels:  view
chords
A Kotlin multi-platform view library for displaying stringed instrument chord diagrams
Stars: ✭ 25 (-63.24%)
Mutual labels:  view
ShadowDrawable
为View 和 ViewGroup 添加阴影效果--Android,Add shadow for single view or viewgroup layout.
Stars: ✭ 22 (-67.65%)
Mutual labels:  view
pulldownlayout
PullDownLayout is a small library that allows you to implement a view that can be dragged down your layout. PullDownLayout can also be used to implement Pull-To-Dismiss feature for your activities and fragments.
Stars: ✭ 16 (-76.47%)
Mutual labels:  view
shtm
No description or website provided.
Stars: ✭ 21 (-69.12%)
Mutual labels:  view
ProgressableImageView
Change your users progress capability with ProgressableImageView
Stars: ✭ 86 (+26.47%)
Mutual labels:  view
SlipperyLayout
A layout that supports sliding.
Stars: ✭ 44 (-35.29%)
Mutual labels:  view
AndroidSamples
Android例子----View、指纹、Canvas、RecyclerView、BottomSheet、PopupWindow、Broadcast、Service、Rxjava、Retrofit、Handler等
Stars: ✭ 107 (+57.35%)
Mutual labels:  view
IndicatorView
IndicatorView Library For Android
Stars: ✭ 41 (-39.71%)
Mutual labels:  view
cursive-tabs
Tabs for gyscos/cursive views 🖥️
Stars: ✭ 21 (-69.12%)
Mutual labels:  view

LovelyView

A view that combines images and texts, allowing you to save time by developing a list item like 'images + text' follow the display order of left, center, and right.

中文

Api reqeust Apache License 2.0 Blog

pic1


pic2

Use

Add it in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        //...
        maven { url 'https://jitpack.io' }
    }
}

Add it in your app build.gradle at the end of repositories:

dependencies {
    implementation 'com.github.samlss:LovelyView:1.0'
}

View diagram

pic4

  • Left:includes one ImageView and three TextViews
  • center:includes one TextView
  • Right:includes one ImageView and three TextViews
  • Top and bottom both contain a split line (View)

Attributes description:

ImageView

attr description
leftImage/rightImage ImageView resources, for example: @mipmap/ic_launcher
leftImageWidth/rightImageWidth ImageView width
leftImageHeight/rightImageHeight ImageView's height
leftImageScaleType/rightImageScaleType ImageView's ScaleType
leftImageMarginLeft/rightImageMarginLeft ImageView's marginLeft distance
leftImageMarginRight/rightImageMarginRight ImageView's marginRight distance
leftImageMarginTop/rightImageMarginTop ImageView's marginTop distance
leftImageMarginBottom/rightImageMarginBottom ImageView's marginBottom distance

TextView

attr description
leftText/rightText/centerText TextView stringId or string
leftTextSize/rightTextSize/centerTextSize TextView's size
leftTextColor/rightTextColor/centerTextColor TextView's color
leftTextMarginLeft/rightTextMarginLeft TextView's marginLeft distance
leftTextMarginRight/rightTextMarginRight TextView's marginRight distance
leftTextMarginTop/rightTextMarginTop TextView's marginTop distance
leftTextMarginBottom/rightTextMarginBottom TextView's marginBottom distance

More attrs


View(split line)

attr description
topLineDisplay/bottomLineDisplay Whether to display the line, false will be set to invisible
topLineColor/bottomLineColor the color of split line
topLineHeight/bottomLineHeight the height of split line
topLineMarginLeft/bottomLineMarginLeft marginLeft distance
topLineMarginRight/bottomLineMarginRight marginRight distance
topLineMarginTop/bottomLineMarginTop marginTop distance
topLineMarginBottom/bottomLineMarginBottom marginBottom distance

in layout.xml:

      <com.iigo.library.LovelyView
                android:background="@android:color/white"
                app:leftImage="@mipmap/ic_launcher"
                app:leftImageWidth="50dp"
                app:leftImageHeight="50dp"
                app:leftImageMarginLeft="10dp"
                app:leftText="Left"
                app:leftTextSize="16sp"
                app:leftTextMarginLeft="10dp"
                app:leftTextColor="@android:color/holo_orange_light"
                app:leftTopText="Left Top"
                app:leftTopTextSize="16sp"
                app:leftTopTextMarginLeft="10dp"
                app:leftTopTextColor="@android:color/holo_orange_light"
                app:leftBottomText="Left Bottom"
                app:leftBottomTextSize="16sp"
                app:leftBottomTextMarginLeft="10dp"
                app:leftBottomTextColor="@android:color/holo_orange_light"
                app:centerText="All Attr"
                app:centerTextSize="16sp"
                app:centerTextColor="@android:color/black"
                app:rightText="Right"
                app:rightTextSize="16sp"
                app:rightTextColor="@android:color/holo_blue_dark"
                app:rightTextMarginRight="10dp"
                app:rightTopText="Right Top"
                app:rightTopTextSize="16sp"
                app:rightTopTextColor="@android:color/holo_blue_dark"
                app:rightTopTextMarginRight="10dp"
                app:rightBottomText="Right Top"
                app:rightBottomTextSize="16sp"
                app:rightBottomTextColor="@android:color/holo_blue_dark"
                app:rightBottomTextMarginRight="10dp"
                app:rightImage="@mipmap/ic_launcher"
                app:rightImageWidth="50dp"
                app:rightImageHeight="50dp"
                app:rightImageMarginRight="10dp"
                android:layout_width="match_parent"
                android:layout_height="100dp"/>

in code:

        lovelyView.getRightTextView().setText("right"); 
        lovelyView.getRightTextView().setTextSize(20);

        lovelyView.getRightTopTextView().setText("right");
        lovelyView.getRightTopTextView().setTextSize(20);

        lovelyView.getRightBottomTextView().setText("right");
        lovelyView.getRightBottomTextView().setTextSize(20);

        lovelyView.getLeftTopTextView().setText("left top");
        lovelyView.getLeftTextView().setText("left");
        lovelyView.getLeftBottomTextView().setText("left bottom");

        lovelyView.getLeftImageView().setImageResource(R.mipmap.icon_cab);
        lovelyView.getRightImageView().setImageResource(R.mipmap.icon_cab);

        lovelyView.getCenterTextView().setText("center");
  • If the attribute specified in the layout.xml does not meet your requirements, you can directly using get...View() to do more.

License

Copyright 2018 samlss

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].