Comments (8)
Go to dua_detail_item_card.xml and do the following edit :
Basically for txtDuaReference, remove the top padding property and change bottom padding to 5dp, like this :
It should look better now.
from hisnulmuslim.
Actually I wanted the opposite. I want both the 'translation' and 'reference' to have 10dp padding on the top and bottom.
from hisnulmuslim.
Alright, here is the fix. There is a small trick. Your English translation is using the class TextViewEx and not the standard TextView. This is giving issues when you are adding padding above and below the english text. However, the reference text uses the standard TextView and padding is not an issue there. Therefore, the trick is to add 10dp margin to the divider grid above and below the English text... like this :
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="1dp"
android:layout_marginRight="1dp"
android:layout_marginBottom="10dp"
android:background="@color/card_divider_gray" />
<classes.TextViewEx
android:id="@+id/txtDuaTranslation"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:text="English Text"
android:textSize="14sp" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="1dp"
android:layout_marginRight="1dp"
android:layout_marginTop="10dp"
android:background="@color/card_divider_gray" />
<TextView
android:id="@+id/txtDuaReference"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="10dp"
android:paddingTop="10dp"
android:text="Dua Reference"
android:textSize="14sp" />
Now the result looks like this :
from hisnulmuslim.
Following your solution, this is what has been achieved:
I still don't understand why there is this extra spacing. I have a feeling that to creating an efficient solution involves editing TextViewEx.
JazakAllahu khayran for the effort.
from hisnulmuslim.
That's the 10dp padding. I thought you said you wanted 10dp padding at the top and bottom of translation and references?
from hisnulmuslim.
I've used the same padding settings for both the regular textView and the textView ex. The 10dp for the 'translation' is seen as the pink bars. In the image to the right, there is some extra spacing between the textView ex and the spacing/padding for the divider View. We need to find out where it is coming from and remove it.
from hisnulmuslim.
This has been fixed due to commit bc9f510
from hisnulmuslim.
Due to the update of the Text-Justify library to 2.0.4, this is back.
from hisnulmuslim.
Related Issues (20)
- Actionbar/toolbar has no drop shadow pre-Lollipop HOT 1
- App crashes when scrolling long list HOT 1
- Actionbar font size in Landscape orientation
- Crash when tap Search result on 4.4.2 (KitKat) HOT 1
- Font choice preference bug HOT 1
- Dua Content list
- Dua Group number and Dua Group title in Toolbar HOT 1
- Duplicate dua under group #1 : Waking up HOT 1
- Text in Search list is no longer highlighted
- Arabic tashkeel not appearing properly on 4.1.2 HOT 1
- Sharing dua to Facebook app results in blank post HOT 1
- RecyclerView in BookmarksDetail activity has rigid scroll bars
- In-app Search is ugly and disfunctional
- Dua group number is cut off
- I want to publish this application on Google Play Store. HOT 4
- Arabic font line height, and overlapping characters HOT 1
- Change dua language depending on phone's locale
- Any update? HOT 2
- Invalid SQL query: table not found
- What is the license for this project ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hisnulmuslim.